Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kleros/vea-contracts

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kleros/vea-contracts - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

arbitrumToEth/VeaInboxArbToEth.sol

126

deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json
{
"address": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55",
"address": "0xE99C6177CD8731DE6F108443CcAf7449074f6aED",
"abi": [

@@ -38,2 +38,14 @@ {

"indexed": false,
"internalType": "bytes32",
"name": "_snapshot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_epoch",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint64",

@@ -80,8 +92,27 @@ "name": "_count",

{
"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"

@@ -94,15 +125,22 @@ }

{
"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"
}

@@ -170,3 +208,3 @@ ],

"internalType": "uint32",
"name": "timestamp",
"name": "timestampClaimed",
"type": "uint32"

@@ -176,6 +214,11 @@ },

"internalType": "uint32",
"name": "blocknumber",
"name": "timestampVerification",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "blocknumberVerification",
"type": "uint32"
},
{
"internalType": "enum Party",

@@ -234,15 +277,15 @@ "name": "honest",

],
"transactionHash": "0x64bc94d437cf6d16a7bb3604d87200a18828231fe64a8c66d6a1caf68b428795",
"transactionHash": "0xd1811f4a9df21c2275106cbb76fecb4742b1b4922b329639a6f49d2594a104d0",
"receipt": {
"to": null,
"from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a",
"contractAddress": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55",
"contractAddress": "0xE99C6177CD8731DE6F108443CcAf7449074f6aED",
"transactionIndex": 1,
"gasUsed": "656379",
"gasUsed": "682997",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xe0176ec49d91883d3eb5be0653db1d675bd508d8c8f5941a6d5a8791704fca37",
"transactionHash": "0x64bc94d437cf6d16a7bb3604d87200a18828231fe64a8c66d6a1caf68b428795",
"blockHash": "0xf7bd950a57276b9f81f3f8f8b98c4cc97356e15f07c7d210d706e0fc0f9f1a82",
"transactionHash": "0xd1811f4a9df21c2275106cbb76fecb4742b1b4922b329639a6f49d2594a104d0",
"logs": [],
"blockNumber": 21520024,
"cumulativeGasUsed": "656379",
"blockNumber": 29413389,
"cumulativeGasUsed": "682997",
"status": 1,

@@ -253,10 +296,11 @@ "byzantium": true

1800,
"0x9235A379950B9f01fb3e2961C06912A96DCcef0e"
"0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032"
],
"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": 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",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033",
"devdoc": {
"details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.",
"events": {

@@ -269,5 +313,7 @@ "MessageSent(bytes)": {

},
"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."
}

@@ -292,7 +338,28 @@ },

},
"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."
"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": {

@@ -307,3 +374,3 @@ "_data": "The message calldata, abi.encode(param1, param2, ...)",

},
"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.",

@@ -320,3 +387,3 @@ "params": {

"events": {
"SnapshotSaved(uint64)": {
"SnapshotSaved(bytes32,uint256,uint64)": {
"notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox."

@@ -327,3 +394,2 @@ }

"methods": {},
"notice": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.",
"version": 1

@@ -330,0 +396,0 @@ },

{
"address": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c",
"address": "0xf38b8739635d2F4cb38Bd453453AB9d41fD16300",
"abi": [

@@ -38,2 +38,14 @@ {

"indexed": false,
"internalType": "bytes32",
"name": "_snapshot",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_epoch",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint64",

@@ -80,8 +92,27 @@ "name": "_count",

{
"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"

@@ -94,15 +125,22 @@ }

{
"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"
}

@@ -170,2 +208,7 @@ ],

{
"internalType": "uint256",
"name": "_gasLimit",
"type": "uint256"
},
{
"components": [

@@ -184,3 +227,3 @@ {

"internalType": "uint32",
"name": "timestamp",
"name": "timestampClaimed",
"type": "uint32"

@@ -190,6 +233,11 @@ },

"internalType": "uint32",
"name": "blocknumber",
"name": "timestampVerification",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "blocknumberVerification",
"type": "uint32"
},
{
"internalType": "enum Party",

@@ -235,15 +283,15 @@ "name": "honest",

],
"transactionHash": "0x68aa646f6b36c052ab7783e8c7a69f1f8386635bb9f4f64f1980cea7c34ea8f0",
"transactionHash": "0x3def95203f24ea92bc30bade034551bf02663c35879a48c851126c75fb4c8d53",
"receipt": {
"to": null,
"from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a",
"contractAddress": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c",
"transactionIndex": 2,
"gasUsed": "651662",
"contractAddress": "0xf38b8739635d2F4cb38Bd453453AB9d41fD16300",
"transactionIndex": 1,
"gasUsed": "687557",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x6068d09be0fd1224cb5811ce5fefa9641571a0687a50110b75daf794652b5bb4",
"transactionHash": "0x68aa646f6b36c052ab7783e8c7a69f1f8386635bb9f4f64f1980cea7c34ea8f0",
"blockHash": "0x04372f62a3f701826ace773d1ae03bb9534cc04169175744a04f2a697ee161d5",
"transactionHash": "0x3def95203f24ea92bc30bade034551bf02663c35879a48c851126c75fb4c8d53",
"logs": [],
"blockNumber": 21519249,
"cumulativeGasUsed": "790580",
"blockNumber": 29413437,
"cumulativeGasUsed": "687557",
"status": 1,

@@ -254,20 +302,23 @@ "byzantium": true

1800,
"0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D"
"0x9481b3A49ac67d03D9022E6200eFD81850BADDB4"
],
"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": "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": {
"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)"
"_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."
}

@@ -292,7 +343,28 @@ },

},
"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."
"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": {

@@ -307,7 +379,8 @@ "_data": "The message calldata, abi.encode(param1, param2, ...)",

},
"sendSnapshot(uint256,(bytes32,address,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."
"_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."
}

@@ -320,3 +393,3 @@ }

"events": {
"SnapshotSaved(uint64)": {
"SnapshotSaved(bytes32,uint256,uint64)": {
"notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox."

@@ -327,3 +400,2 @@ }

"methods": {},
"notice": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.",
"version": 1

@@ -334,3 +406,3 @@ },

{
"astId": 1627,
"astId": 432,
"contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis",

@@ -343,3 +415,3 @@ "label": "snapshots",

{
"astId": 1631,
"astId": 436,
"contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis",

@@ -352,3 +424,3 @@ "label": "inbox",

{
"astId": 1633,
"astId": 438,
"contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis",

@@ -355,0 +427,0 @@ "label": "count",

{
"address": "0xD4847f86Ed2E9D03839B15fd0818759861c063a8",
"address": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1",
"abi": [

@@ -50,2 +50,41 @@ {

{
"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": [],

@@ -77,2 +116,9 @@ "name": "amb",

{
"inputs": [],
"name": "executeSequencerDelayLimitDecreaseRequest",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [

@@ -90,2 +136,7 @@ {

{
"internalType": "uint256",
"name": "_gasLimit",
"type": "uint256"
},
{
"components": [

@@ -104,3 +155,3 @@ {

"internalType": "uint32",
"name": "timestamp",
"name": "timestampClaimed",
"type": "uint32"

@@ -110,6 +161,11 @@ },

"internalType": "uint32",
"name": "blocknumber",
"name": "timestampVerification",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "blocknumberVerification",
"type": "uint32"
},
{
"internalType": "enum Party",

@@ -137,2 +193,40 @@ "name": "honest",

"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",

@@ -163,15 +257,15 @@ "outputs": [

],
"transactionHash": "0x1d4a99de35b479ca1602e8cdd592fa84d0aa2851769bdd9e30bbe8e622129630",
"transactionHash": "0x2ed8eaef653ae04c762d19ac691e8b70bf768cdc9f945d606b20dc64d3c6d8c0",
"receipt": {
"to": null,
"from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a",
"contractAddress": "0xD4847f86Ed2E9D03839B15fd0818759861c063a8",
"transactionIndex": 32,
"gasUsed": "413720",
"contractAddress": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1",
"transactionIndex": 57,
"gasUsed": "866941",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x770c8831e04e125123a645cf4b42243b34b2f10dc4e7eeefd2a85c501a4fba35",
"transactionHash": "0x1d4a99de35b479ca1602e8cdd592fa84d0aa2851769bdd9e30bbe8e622129630",
"blockHash": "0xc3b2c08e2e233274be1c5646494ffe622c03cb0554db08e8adb5259bd7a16723",
"transactionHash": "0x2ed8eaef653ae04c762d19ac691e8b70bf768cdc9f945d606b20dc64d3c6d8c0",
"logs": [],
"blockNumber": 9050719,
"cumulativeGasUsed": "5199553",
"blockNumber": 9292613,
"cumulativeGasUsed": "17269640",
"status": 1,

@@ -181,13 +275,14 @@ "byzantium": true

"args": [
"0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd",
"0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72",
"0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a",
"0x660daB9A6436A814a6ae3a6f27b309356a4bE78c",
"0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D"
"0xf38b8739635d2F4cb38Bd453453AB9d41fD16300",
"0x9481b3A49ac67d03D9022E6200eFD81850BADDB4"
],
"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",
"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": {

@@ -200,2 +295,20 @@ "Routed(uint256,bytes32)": {

}
},
"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."
}
}

@@ -214,3 +327,6 @@ },

},
"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": {
"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'.",

@@ -220,4 +336,8 @@ "params": {

"_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."
}

@@ -230,13 +350,58 @@ },

"methods": {
"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": {
"route(uint256,bytes32,uint256,(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": 1466,
"contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis",
"label": "sequencerDelayLimit",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 1469,
"contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis",
"label": "sequencerDelayLimitDecreaseRequest",
"offset": 0,
"slot": "1",
"type": "t_struct(SequencerLimitDecreaseRequest)1474_storage"
}
],
"types": {
"t_struct(SequencerLimitDecreaseRequest)1474_storage": {
"encoding": "inplace",
"label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest",
"members": [
{
"astId": 1471,
"contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis",
"label": "requestedSequencerLimit",
"offset": 0,
"slot": "0",
"type": "t_uint256"
},
{
"astId": 1473,
"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"
}
}
}
}
{
"name": "@kleros/vea-contracts",
"version": "0.3.2",
"version": "0.4.0",
"description": "Smart contracts for Vea",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"repository": {

@@ -24,9 +21,9 @@ "type": "git",

],
"packageManager": "yarn@3.3.1",
"packageManager": "yarn@4.2.2",
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"volta": {
"node": "16.20.0",
"yarn": "3.3.1"
"node": "18.20.3",
"yarn": "4.2.2"
},

@@ -39,10 +36,28 @@ "publishConfig": {

"build": "hardhat compile",
"clean": "hardhat clean && rm -rf dist typechain-types",
"clean": "hardhat clean",
"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",
"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 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": "hardhat etherscan-verify",
"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:sepolia": "hardhat etherscan-verify --network sepolia",
"etherscan-verify:arbitrum": "hardhat etherscan-verify --network arbitrum",
"etherscan-verify:arbitrumSepolia": "hardhat etherscan-verify --network arbitrumSepolia",
"sourcify": "hardhat sourcify --write-failing-metadata",

@@ -52,9 +67,9 @@ "size": "hardhat size-contracts --no-compile",

"docgen": "hardhat docgen",
"release:patch": "yarn version patch && yarn npm publish",
"release:minor": "yarn version minor && yarn npm publish",
"release:major": "yarn version major && yarn npm publish",
"prepublish": "./scripts/prepublish.sh"
"release:patch": "scripts/publish.sh patch",
"release:minor": "scripts/publish.sh minor",
"release:major": "scripts/publish.sh major"
},
"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",

@@ -85,2 +100,3 @@ "@typechain/ethers-v5": "^10.2.0",

"node-fetch": "^3.3.1",
"shelljs": "^0.8.5",
"solhint": "^3.4.1",

@@ -91,20 +107,3 @@ "solidity-coverage": "^0.8.2",

"typescript": "^4.9.5"
},
"dependencies": {
"@openzeppelin/contracts": "^4.8.3"
},
"files": [
"src",
"deployments",
"typechain-types",
"!hardhat.config.*",
"!src/test",
"!typechain-types/test",
"!typechain-types/factories/test",
"!test",
"!deploy",
"!deployments/localhost",
"!deployments/hardhat",
"!deployments/**/solcInputs"
]
}
}
}

@@ -11,15 +11,16 @@ # @kleros/vea-contracts

#### Goerli
#### Sepolia
- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xAb53e341121448Ae259Da8fa17f216Cb0e21199C)
- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x906dE43dBef27639b1688Ac46532a16dc07Ce410)
- [VeaOutboxArbToEthDevnet](https://sepolia.etherscan.io/address/0x5AD255400913515C8DA7E82E6b8A109fA5c46135)
#### Arbitrum Goerli
#### Arbitrum Sepolia
- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x906dE43dBef27639b1688Ac46532a16dc07Ce410)
- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xAb53e341121448Ae259Da8fa17f216Cb0e21199C)
- [VeaInboxArbToEthDevnet](https://sepolia.arbiscan.io/address/0x77e95F54032f467eC45c48C6affc203f93858783)
#### Chiado
- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xAb53e341121448Ae259Da8fa17f216Cb0e21199C)
- [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)

@@ -90,9 +91,9 @@ ## Getting Started

```bash
# ArbitrumGoerli -> Goerli
yarn deploy --network goerli --tags ArbGoerliToGoerliOutbox
yarn deploy --network arbitrumGoerli --tags ArbGoerliToGoerliInbox
# arbitrumSepolia -> Sepolia
yarn deploy --network sepolia --tags ArbSepoliaToSepoliaOutbox
yarn deploy --network arbitrumSepolia --tags ArbSepoliaToSepoliaInbox
# ArbitrumGoerli -> Chiado
yarn deploy --network chiado --tags ArbGoerliToChiadoOutbox
yarn deploy --network arbitrumGoerli --tags ArbGoerliToChiadoInbox
# arbitrumSepolia -> Chiado
yarn deploy --network chiado --tags ArbSepoliaToChiadoOutbox
yarn deploy --network arbitrumSepolia --tags ArbSepoliaToChiadoInbox
```

@@ -127,6 +128,6 @@

# explorer
yarn etherscan-verify --network <arbitrumGoerli|arbitrum|goerli|mainnet|chiado|gnosischain>
yarn etherscan-verify --network <arbitrumSepolia|arbitrum|sepolia|mainnet|chiado|gnosischain>
# sourcify
yarn sourcify --network <arbitrumGoerli|arbitrum|goerli|mainnet|chiado|gnosischain>
yarn sourcify --network <arbitrumSepolia|arbitrum|sepolia|mainnet|chiado|gnosischain>
```

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc