From 3b65a0bdb6bdcef2901038594103facbcb1c144c Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:26:34 +0200 Subject: [PATCH 1/7] feat: Support Zora --- package.json | 6 ++--- src/clients/bridges/AdapterManager.ts | 11 ++++++++- src/common/Constants.ts | 33 +++++++++++++++++++++++++ src/common/ContractAddresses.ts | 14 +++++++++++ yarn.lock | 35 ++++++++++++--------------- 5 files changed, 75 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index f468c59ca..8db33a7d3 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "node": ">=20" }, "dependencies": { - "@across-protocol/constants": "^3.1.11", - "@across-protocol/contracts": "^3.0.6", - "@across-protocol/sdk": "^3.1.14", + "@across-protocol/constants": "^3.1.13", + "@across-protocol/contracts": "^3.0.8", + "@across-protocol/sdk": "^3.1.17", "@arbitrum/sdk": "^3.1.3", "@consensys/linea-sdk": "^0.2.1", "@defi-wonderland/smock": "^2.3.5", diff --git a/src/clients/bridges/AdapterManager.ts b/src/clients/bridges/AdapterManager.ts index d76ac9c76..5fcd03c8a 100644 --- a/src/clients/bridges/AdapterManager.ts +++ b/src/clients/bridges/AdapterManager.ts @@ -39,7 +39,7 @@ export class AdapterManager { ); }; - const { OPTIMISM, ARBITRUM, POLYGON, ZK_SYNC, BASE, MODE, LINEA, LISK, BLAST, SCROLL } = CHAIN_IDs; + const { OPTIMISM, ARBITRUM, POLYGON, ZK_SYNC, BASE, MODE, LINEA, LISK, BLAST, SCROLL, ZORA } = CHAIN_IDs; if (this.spokePoolClients[OPTIMISM] !== undefined) { this.adapters[OPTIMISM] = new OpStackAdapter( OPTIMISM, @@ -100,6 +100,15 @@ export class AdapterManager { if (this.spokePoolClients[SCROLL] !== undefined) { this.adapters[SCROLL] = new ScrollAdapter(logger, spokePoolClients, filterMonitoredAddresses(SCROLL)); } + if (this.spokePoolClients[ZORA] !== undefined) { + this.adapters[ZORA] = new OpStackAdapter( + ZORA, + logger, + SUPPORTED_TOKENS[ZORA], + spokePoolClients, + filterMonitoredAddresses(ZORA) + ); + } logger.debug({ at: "AdapterManager#constructor", diff --git a/src/common/Constants.ts b/src/common/Constants.ts index 80f960a8f..355d14aa2 100644 --- a/src/common/Constants.ts +++ b/src/common/Constants.ts @@ -48,6 +48,7 @@ export const DATAWORKER_FAST_LOOKBACK: { [chainId: number]: number } = { [CHAIN_IDs.POLYGON]: 138240, [CHAIN_IDs.SCROLL]: 115200, // 4 * 24 * 20 * 60, [CHAIN_IDs.ZK_SYNC]: 345600, // 4 * 24 * 60 * 60, + [CHAIN_IDs.ZORA]: 172800, // OP stack }; // Target ~14 days per chain. Should cover all events that could be finalized, so 2x the optimistic @@ -83,6 +84,7 @@ export const MIN_DEPOSIT_CONFIRMATIONS: { [threshold: number | string]: { [chain [CHAIN_IDs.POLYGON]: 128, // Commonly used finality level for CEX's that accept Polygon deposits [CHAIN_IDs.SCROLL]: 30, [CHAIN_IDs.ZK_SYNC]: 120, + [CHAIN_IDs.ZORA]: 120, }, 1000: { [CHAIN_IDs.ARBITRUM]: 0, @@ -96,6 +98,7 @@ export const MIN_DEPOSIT_CONFIRMATIONS: { [threshold: number | string]: { [chain [CHAIN_IDs.POLYGON]: 100, // Probabilistically safe level based on historic Polygon reorgs [CHAIN_IDs.SCROLL]: 1, [CHAIN_IDs.ZK_SYNC]: 0, + [CHAIN_IDs.ZORA]: 60, }, 100: { [CHAIN_IDs.ARBITRUM]: 0, @@ -109,6 +112,7 @@ export const MIN_DEPOSIT_CONFIRMATIONS: { [threshold: number | string]: { [chain [CHAIN_IDs.POLYGON]: 80, [CHAIN_IDs.SCROLL]: 1, [CHAIN_IDs.ZK_SYNC]: 0, + [CHAIN_IDs.ZORA]: 60, }, }; @@ -132,6 +136,7 @@ export const CHAIN_MAX_BLOCK_LOOKBACK = { [CHAIN_IDs.POLYGON]: 10000, [CHAIN_IDs.SCROLL]: 10000, [CHAIN_IDs.ZK_SYNC]: 10000, + [CHAIN_IDs.ZORA]: 10000, // Testnets: [CHAIN_IDs.ARBITRUM_SEPOLIA]: 10000, [CHAIN_IDs.BASE_SEPOLIA]: 10000, @@ -160,6 +165,7 @@ export const BUNDLE_END_BLOCK_BUFFERS = { [CHAIN_IDs.POLYGON]: 128, // 2s/block. Polygon reorgs often so this number is set larger than the largest observed reorg. [CHAIN_IDs.SCROLL]: 40, // ~3s/block [CHAIN_IDs.ZK_SYNC]: 120, // ~1s/block. ZkSync is a centralized sequencer but is relatively unstable so this is kept higher than 0 + [CHAIN_IDs.ZORA]: 60, // 2s/block // Testnets: [CHAIN_IDs.ARBITRUM_SEPOLIA]: 0, [CHAIN_IDs.BASE_SEPOLIA]: 0, @@ -202,6 +208,7 @@ export const CHAIN_CACHE_FOLLOW_DISTANCE: { [chainId: number]: number } = { [CHAIN_IDs.POLYGON]: 256, [CHAIN_IDs.SCROLL]: 100, [CHAIN_IDs.ZK_SYNC]: 512, + [CHAIN_IDs.ZORA]: 120, // Testnets: [CHAIN_IDs.ARBITRUM_SEPOLIA]: 0, [CHAIN_IDs.BASE_SEPOLIA]: 0, @@ -229,6 +236,7 @@ export const DEFAULT_NO_TTL_DISTANCE: { [chainId: number]: number } = { [CHAIN_IDs.POLYGON]: 86400, [CHAIN_IDs.SCROLL]: 57600, [CHAIN_IDs.ZK_SYNC]: 172800, + [CHAIN_IDs.ZORA]: 86400, }; // Reasonable default maxFeePerGas and maxPriorityFeePerGas scalers for each chain. @@ -241,6 +249,7 @@ export const DEFAULT_GAS_FEE_SCALERS: { [CHAIN_IDs.MAINNET]: { maxFeePerGasScaler: 3, maxPriorityFeePerGasScaler: 1.2 }, [CHAIN_IDs.MODE]: { maxFeePerGasScaler: 2, maxPriorityFeePerGasScaler: 0.01 }, [CHAIN_IDs.OPTIMISM]: { maxFeePerGasScaler: 2, maxPriorityFeePerGasScaler: 0.01 }, + [CHAIN_IDs.ZORA]: { maxFeePerGasScaler: 2, maxPriorityFeePerGasScaler: 0.01 }, }; // This is how many seconds stale the block number can be for us to use it for evaluating the reorg distance in the cache provider. @@ -263,6 +272,7 @@ export const multicall3Addresses = { [CHAIN_IDs.POLYGON]: "0xcA11bde05977b3631167028862bE2a173976CA11", [CHAIN_IDs.SCROLL]: "0xcA11bde05977b3631167028862bE2a173976CA11", [CHAIN_IDs.ZK_SYNC]: "0xF9cda624FBC7e059355ce98a31693d299FACd963", + [CHAIN_IDs.ZORA]: "0xcA11bde05977b3631167028862bE2a173976CA11", // Testnet: [CHAIN_IDs.POLYGON_AMOY]: "0xcA11bde05977b3631167028862bE2a173976CA11", [CHAIN_IDs.BASE_SEPOLIA]: "0xcA11bde05977b3631167028862bE2a173976CA11", @@ -288,6 +298,7 @@ export const spokesThatHoldEthAndWeth = [ CHAIN_IDs.OPTIMISM, CHAIN_IDs.SCROLL, CHAIN_IDs.ZK_SYNC, + CHAIN_IDs.ZORA, ]; /** @@ -321,6 +332,7 @@ export const SUPPORTED_TOKENS: { [chainId: number]: string[] } = { [CHAIN_IDs.POLYGON]: ["USDC", "USDT", "WETH", "DAI", "WBTC", "UMA", "BAL", "ACX", "POOL"], [CHAIN_IDs.SCROLL]: ["WETH", "USDC", "USDT", "WBTC"], [CHAIN_IDs.ZK_SYNC]: ["USDC", "USDT", "WETH", "WBTC", "DAI"], + [CHAIN_IDs.ZORA]: ["USDC", "WETH"], // Testnets: [CHAIN_IDs.ARBITRUM_SEPOLIA]: ["USDC", "USDT", "WETH", "DAI", "WBTC", "UMA", "ACX"], @@ -371,6 +383,7 @@ export const CANONICAL_BRIDGE: { [CHAIN_IDs.POLYGON]: PolygonERC20Bridge, [CHAIN_IDs.SCROLL]: ScrollERC20Bridge, [CHAIN_IDs.ZK_SYNC]: ZKSyncBridge, + [CHAIN_IDs.ZORA]: OpStackDefaultERC20Bridge, }; // Custom Bridges are all bridges between chains which only support a small number (typically one) of tokens. @@ -422,6 +435,9 @@ export const CUSTOM_BRIDGE: { [CHAIN_IDs.ZK_SYNC]: { [TOKEN_SYMBOLS_MAP.WETH.addresses[CHAIN_IDs.MAINNET]]: ZKSyncWethBridge, }, + [CHAIN_IDs.ZORA]: { + [TOKEN_SYMBOLS_MAP.WETH.addresses[CHAIN_IDs.MAINNET]]: OpStackWethBridge, + }, }; // Path to the external SpokePool indexer. Must be updated if src/libexec/* files are relocated or if the `outputDir` on TSC has been modified. @@ -480,6 +496,7 @@ export const EXPECTED_L1_TO_L2_MESSAGE_TIME = { [CHAIN_IDs.POLYGON]: 60 * 60, [CHAIN_IDs.SCROLL]: 60 * 60, [CHAIN_IDs.ZK_SYNC]: 60 * 60, + [CHAIN_IDs.ZORA]: 20 * 60, }; export const OPSTACK_CONTRACT_OVERRIDES = { @@ -517,10 +534,26 @@ export const OPSTACK_CONTRACT_OVERRIDES = { }, l2: DEFAULT_L2_CONTRACT_ADDRESSES, }, + [CHAIN_IDs.ZORA]: { + l1: { + AddressManager: "0xEF8115F2733fb2033a7c756402Fc1deaa56550Ef", + L1CrossDomainMessenger: "0x363B4B1ADa52E50353f746999bd9E94395190d2C", + L1StandardBridge: CONTRACT_ADDRESSES[CHAIN_IDs.MAINNET].ovmStandardBridge_7777777.address, + StateCommitmentChain: ZERO_ADDRESS, + CanonicalTransactionChain: ZERO_ADDRESS, + BondManager: ZERO_ADDRESS, + OptimismPortal: "0x1a0ad011913A150f69f6A19DF447A0CfD9551054", + L2OutputOracle: "0x89336159Edd615260a95309e46343602D6b6489e", + OptimismPortal2: ZERO_ADDRESS, + DisputeGameFactory: ZERO_ADDRESS, + }, + l2: DEFAULT_L2_CONTRACT_ADDRESSES, + }, }; export const DEFAULT_GAS_MULTIPLIER: { [chainId: number]: number } = { [CHAIN_IDs.OPTIMISM]: 1.5, [CHAIN_IDs.BASE]: 1.5, [CHAIN_IDs.MODE]: 1.5, + [CHAIN_IDs.ZORA]: 1.5, }; diff --git a/src/common/ContractAddresses.ts b/src/common/ContractAddresses.ts index 0c359c291..65d6de270 100644 --- a/src/common/ContractAddresses.ts +++ b/src/common/ContractAddresses.ts @@ -1,3 +1,4 @@ +import { CHAIN_IDs } from "../utils"; import CCTP_MESSAGE_TRANSMITTER_ABI from "./abi/CctpMessageTransmitter.json"; import CCTP_TOKEN_MESSENGER_ABI from "./abi/CctpTokenMessenger.json"; import ATOMIC_DEPOSITOR_ABI from "./abi/AtomicDepositor.json"; @@ -96,6 +97,10 @@ export const CONTRACT_ADDRESSES: { address: "0x697402166Fbf2F22E970df8a6486Ef171dbfc524", abi: OVM_L1_STANDARD_BRIDGE_ABI, }, + ovmStandardBridge_7777777: { + address: "0xbF6acaF315477b15D638bf4d91eA48FA79b58335", + abi: OVM_L1_STANDARD_BRIDGE_ABI, + }, polygonRootChainManager: { address: "0xA0c68C638235ee32657e8f720a23ceC1bFc77C77", abi: POLYGON_ROOT_CHAIN_MANAGER_ABI, @@ -297,6 +302,15 @@ export const CONTRACT_ADDRESSES: { address: "0x0000000000000000000000000000000000000000", }, }, + [CHAIN_IDs.ZORA]: { + ovmStandardBridge: { + address: "0x4200000000000000000000000000000000000010", + abi: OVM_L2_STANDARD_BRIDGE_ABI, + }, + eth: { + address: "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", + }, + }, // Testnets 11155111: { cctpMessageTransmitter: { diff --git a/yarn.lock b/yarn.lock index f511205d2..388b80014 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11,15 +11,10 @@ "@uma/common" "^2.17.0" hardhat "^2.9.3" -"@across-protocol/constants@^3.1.11": - version "3.1.11" - resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.11.tgz#8a55347fd058e1bfad6320f69f13eb5a06399bc6" - integrity sha512-AevN1x1acJVbi6zlH6M8eEKqzANO+H7nfLCChXlrS5vZi8QINs9RvSZX/U/j0UDW1tCbEKszKZcnL1ZM+Pgb0A== - -"@across-protocol/constants@^3.1.9": - version "3.1.10" - resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.10.tgz#37d4f391dc68719c224634073dc8e1ef0445b75d" - integrity sha512-sG1QXVIZAMFsxURMz8U0ZJ2dfX72yjnE/0OGJTcDNcPvuK0MMDU9mFdSZWBtMwIxt0UZSIG/A5059UstT7+Cfg== +"@across-protocol/constants@^3.1.13": + version "3.1.13" + resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.13.tgz#b4caf494e9d9fe50290cca91b7883ea408fdb90a" + integrity sha512-EsTJgQL5p+XXs40aBxOSbMOpQr/f4ty+Iyget8Oh6MT/cncCa2+W8a78fbqYqTtSpH6Sm7E8nvT8gPuSS6ef1w== "@across-protocol/contracts@^0.1.4": version "0.1.4" @@ -30,12 +25,12 @@ "@openzeppelin/contracts" "4.1.0" "@uma/core" "^2.18.0" -"@across-protocol/contracts@^3.0.6": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-3.0.6.tgz#7508fc52db50cfa670edc7c4e9e615ad25cdd56c" - integrity sha512-hN/Qbg3YlZyVnJfqhK97WJHlvUv2Agncm0eaLOPlRy++CZ1rP++cDWPa2souE8iYEl0APj1c4U4REe8qSw9zlA== +"@across-protocol/contracts@^3.0.8": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-3.0.8.tgz#ec9f72584048e5db3ee3a4dc5e214561101a5ffb" + integrity sha512-JG3Jt+itG+f9ZcUK1K/SFy6xlmCjCxsf99+Ffp11rPN6FUvDNgscRCoizLlBmibzRbXkR6r6r5F2iPbIPX/gxw== dependencies: - "@across-protocol/constants" "^3.1.9" + "@across-protocol/constants" "^3.1.13" "@defi-wonderland/smock" "^2.3.4" "@eth-optimism/contracts" "^0.5.40" "@ethersproject/abstract-provider" "5.7.0" @@ -50,14 +45,14 @@ axios "^1.6.2" zksync-web3 "^0.14.3" -"@across-protocol/sdk@^3.1.14": - version "3.1.14" - resolved "https://registry.yarnpkg.com/@across-protocol/sdk/-/sdk-3.1.14.tgz#511bba54fcc26daaeeafecf7418f18ef1cc845d9" - integrity sha512-qLq3C8SJnZb5r3n2YBNXDQekgwVw06oRjpGmm3lsZq76kiTtTvb8v5E6nnZEYAbqxCnVJOk5f0GyGxfUzLsCaw== +"@across-protocol/sdk@^3.1.17": + version "3.1.17" + resolved "https://registry.yarnpkg.com/@across-protocol/sdk/-/sdk-3.1.17.tgz#492e4e734015a5c8473674b69b2878162fd467f6" + integrity sha512-szc8o3sEcfRlP2K6vQ2Jl9YhEMjS8Ckt/xpj8/R5fY3f46su553kucoxBEe3kUq7P9J9aqgQu1RSvPR1q9gfeA== dependencies: "@across-protocol/across-token" "^1.0.0" - "@across-protocol/constants" "^3.1.11" - "@across-protocol/contracts" "^3.0.6" + "@across-protocol/constants" "^3.1.13" + "@across-protocol/contracts" "^3.0.8" "@eth-optimism/sdk" "^3.3.1" "@pinata/sdk" "^2.1.0" "@types/mocha" "^10.0.1" From ed95545a5dff47c969a60ba52887a05dd7184b3b Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:22:50 +0200 Subject: [PATCH 2/7] Nuke custom Zora definition --- src/common/Constants.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/common/Constants.ts b/src/common/Constants.ts index 355d14aa2..7a333086b 100644 --- a/src/common/Constants.ts +++ b/src/common/Constants.ts @@ -534,21 +534,6 @@ export const OPSTACK_CONTRACT_OVERRIDES = { }, l2: DEFAULT_L2_CONTRACT_ADDRESSES, }, - [CHAIN_IDs.ZORA]: { - l1: { - AddressManager: "0xEF8115F2733fb2033a7c756402Fc1deaa56550Ef", - L1CrossDomainMessenger: "0x363B4B1ADa52E50353f746999bd9E94395190d2C", - L1StandardBridge: CONTRACT_ADDRESSES[CHAIN_IDs.MAINNET].ovmStandardBridge_7777777.address, - StateCommitmentChain: ZERO_ADDRESS, - CanonicalTransactionChain: ZERO_ADDRESS, - BondManager: ZERO_ADDRESS, - OptimismPortal: "0x1a0ad011913A150f69f6A19DF447A0CfD9551054", - L2OutputOracle: "0x89336159Edd615260a95309e46343602D6b6489e", - OptimismPortal2: ZERO_ADDRESS, - DisputeGameFactory: ZERO_ADDRESS, - }, - l2: DEFAULT_L2_CONTRACT_ADDRESSES, - }, }; export const DEFAULT_GAS_MULTIPLIER: { [chainId: number]: number } = { From 9756da08f59fda1335246dc9c75587ec7d45156f Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:22:55 +0200 Subject: [PATCH 3/7] Correct L1StandardBridge address --- src/common/ContractAddresses.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ContractAddresses.ts b/src/common/ContractAddresses.ts index 65d6de270..7516e0ac6 100644 --- a/src/common/ContractAddresses.ts +++ b/src/common/ContractAddresses.ts @@ -98,7 +98,7 @@ export const CONTRACT_ADDRESSES: { abi: OVM_L1_STANDARD_BRIDGE_ABI, }, ovmStandardBridge_7777777: { - address: "0xbF6acaF315477b15D638bf4d91eA48FA79b58335", + address: "0x3e2Ea9B92B7E48A52296fD261dc26fd995284631", abi: OVM_L1_STANDARD_BRIDGE_ABI, }, polygonRootChainManager: { From c7e6eff2f421fadd1dd933535d6018c57c08bee2 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:28:18 +0200 Subject: [PATCH 4/7] Revert "improve(wethdepositor): make OP-Stack generic (#1548)" This reverts commit f42853e28747010111941073e54d3d9d8a3f3a09. --- contracts/AtomicWethDepositor.sol | 141 ++++++++---------------------- 1 file changed, 35 insertions(+), 106 deletions(-) diff --git a/contracts/AtomicWethDepositor.sol b/contracts/AtomicWethDepositor.sol index 01fecaf54..df54fae38 100644 --- a/contracts/AtomicWethDepositor.sol +++ b/contracts/AtomicWethDepositor.sol @@ -1,13 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.0; -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@uma/core/contracts/common/implementation/MultiCaller.sol"; - -/////////////////////////////// -// Interfaces for Bridges // -/////////////////////////////// - interface Weth { function withdraw(uint256 _wad) external; @@ -48,126 +41,62 @@ interface LineaL1MessageService { * @notice Contract deployed on Ethereum helps relay bots atomically unwrap and bridge WETH over the canonical chain * bridges for Optimism, Base, Boba, ZkSync, Linea, and Polygon. Needed as these chains only support bridging of ETH, * not WETH. - * @dev This contract is ownable so that the owner can update the OvmL1Bridge contracts for new chains. */ -contract AtomicWethDepositor is Ownable, MultiCaller { - /////////////////////////////// - // Hardcoded Addresses // - /////////////////////////////// +contract AtomicWethDepositor { Weth public immutable weth = Weth(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); + OvmL1Bridge public immutable optimismL1Bridge = OvmL1Bridge(0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1); + OvmL1Bridge public immutable modeL1Bridge = OvmL1Bridge(0x735aDBbE72226BD52e818E7181953f42E3b0FF21); + OvmL1Bridge public immutable bobaL1Bridge = OvmL1Bridge(0xdc1664458d2f0B6090bEa60A8793A4E66c2F1c00); + OvmL1Bridge public immutable baseL1Bridge = OvmL1Bridge(0x3154Cf16ccdb4C6d922629664174b904d80F2C35); + OvmL1Bridge public immutable liskL1Bridge = OvmL1Bridge(0x2658723Bf70c7667De6B25F99fcce13A16D25d08); + OvmL1Bridge public immutable blastL1Bridge = OvmL1Bridge(0x697402166Fbf2F22E970df8a6486Ef171dbfc524); PolygonL1Bridge public immutable polygonL1Bridge = PolygonL1Bridge(0xA0c68C638235ee32657e8f720a23ceC1bFc77C77); ZkSyncL1Bridge public immutable zkSyncL1Bridge = ZkSyncL1Bridge(0x32400084C286CF3E17e7B677ea9583e60a000324); LineaL1MessageService public immutable lineaL1MessageService = LineaL1MessageService(0xd19d4B5d358258f05D7B411E21A1460D11B0876F); - /////////////////////////////// - // Dynamic Variables // - /////////////////////////////// - - /** - * @notice All OVM Chains have an OvmL1Bridge contract that can be called to deposit ETH. - * @notice This mapping is a convenience to allow for easy lookup of the OvmL1Bridge contract for a given chainId. - */ - mapping(uint256 => OvmL1Bridge) public ovmChainIdToBridge; - - /////////////////////////////// - // Events // - /////////////////////////////// - event ZkSyncEthDepositInitiated(address indexed from, address indexed to, uint256 amount); event LineaEthDepositInitiated(address indexed from, address indexed to, uint256 amount); - event OVMEthDepositInitiated(uint256 indexed chainId, address indexed from, address indexed to, uint256 amount); - event PolygonEthDepositInitiated(address indexed from, address indexed to, uint256 amount); - event OVML1BridgeModified(uint256 indexed chainId, address indexed newBridge, address oldBridge); + event OvmEthDepositInitiated(uint256 indexed chainId, address indexed from, address indexed to, uint256 amount); - /////////////////////////////// - // Errors // - /////////////////////////////// - - error InvalidOvmChainId(); - - /////////////////////////////// - // Internal Functions // - /////////////////////////////// - - /** - * @notice Transfers WETH to this contract and withdraws it to ETH. - * @param amount The amount of WETH to withdraw. - */ - function _withdrawWeth(uint256 amount) internal { + function bridgeWethToOvm(address to, uint256 amount, uint32 l2Gas, uint256 chainId) public { weth.transferFrom(msg.sender, address(this), amount); weth.withdraw(amount); - } - /////////////////////////////// - // Admin Functions // - /////////////////////////////// - - /** - * @notice Sets the OvmL1Bridge contract for a given chainId. - * @dev Supplying a zero address will disable the bridge. - * @param chainId The chainId of the OVM chain. - * @param newBridge The address of the OvmL1Bridge contract for the given chainId. - */ - function setOvmL1Bridge(uint256 chainId, OvmL1Bridge newBridge) public onlyOwner { - OvmL1Bridge oldBridge = ovmChainIdToBridge[chainId]; - ovmChainIdToBridge[chainId] = newBridge; - emit OVML1BridgeModified(chainId, address(newBridge), address(oldBridge)); - } - - /////////////////////////////// - // Public Functions // - /////////////////////////////// - - /** - * @notice Initiates a WETH deposit to an OVM chain. - * @param to The address on the OVM chain to receive the WETH. - * @param amount The amount of WETH to deposit. - * @param l2Gas The amount of gas to send with the deposit transaction. - * @param chainId The chainId of the OVM chain to deposit to. - * @dev throws InvalidOvmChainId if the chainId provided is not a valid OVM chainId. - */ - function bridgeWethToOvm(address to, uint256 amount, uint32 l2Gas, uint256 chainId) public { - OvmL1Bridge ovmL1Bridge = ovmChainIdToBridge[chainId]; - if (address(ovmL1Bridge) == address(0)) { - revert InvalidOvmChainId(); + if (chainId == 10) { + optimismL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 8453) { + baseL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 34443) { + modeL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 1135) { + liskL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 81457) { + blastL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 288) { + bobaL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else { + revert("Invalid OVM chainId"); } - _withdrawWeth(amount); - ovmL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); - emit OVMEthDepositInitiated(chainId, msg.sender, to, amount); + + emit OvmEthDepositInitiated(chainId, msg.sender, to, amount); } - /** - * @notice Initiates a WETH deposit to Polygon. - * @param to The address on Polygon to receive the WETH. - * @param amount The amount of WETH to deposit. - */ function bridgeWethToPolygon(address to, uint256 amount) public { - _withdrawWeth(amount); + weth.transferFrom(msg.sender, address(this), amount); + weth.withdraw(amount); polygonL1Bridge.depositEtherFor{ value: amount }(to); - emit PolygonEthDepositInitiated(msg.sender, to, amount); } - /** - * @notice Initiates a WETH deposit to Linea. - * @param to The address on Linea to receive the WETH. - * @param amount The amount of WETH to deposit. - */ function bridgeWethToLinea(address to, uint256 amount) public payable { - _withdrawWeth(amount); + weth.transferFrom(msg.sender, address(this), amount); + weth.withdraw(amount); lineaL1MessageService.sendMessage{ value: amount + msg.value }(to, msg.value, ""); + // Emit an event that we can easily track in the Linea-related adapters/finalizers emit LineaEthDepositInitiated(msg.sender, to, amount); } - /** - * @notice Initiates a WETH deposit to ZkSync. - * @param to The address on ZkSync to receive the WETH. - * @param amount The amount of WETH to deposit. - * @param l2GasLimit The amount of gas to send with the deposit transaction. - * @param l2GasPerPubdataByteLimit The amount of gas per pubdata byte to send with the deposit transaction. - * @param refundRecipient The address to refund any excess gas to. - */ function bridgeWethToZkSync( address to, uint256 amount, @@ -186,7 +115,8 @@ contract AtomicWethDepositor is Ownable, MultiCaller { l2GasPerPubdataByteLimit ); uint256 valueToSubmitXChainMessage = l2TransactionBaseCost + amount; - _withdrawWeth(valueToSubmitXChainMessage); + weth.transferFrom(msg.sender, address(this), valueToSubmitXChainMessage); + weth.withdraw(valueToSubmitXChainMessage); zkSyncL1Bridge.requestL2Transaction{ value: valueToSubmitXChainMessage }( to, amount, @@ -196,13 +126,12 @@ contract AtomicWethDepositor is Ownable, MultiCaller { new bytes[](0), refundRecipient ); + + // Emit an event that we can easily track in the ZkSyncAdapter because otherwise there is no easy event to + // track ETH deposit initiations. emit ZkSyncEthDepositInitiated(msg.sender, to, amount); } - /////////////////////////////// - // Fallback // - /////////////////////////////// - fallback() external payable {} // Included to remove a compilation warning. From 6d5b061a6052d17218f2f868f89ac3aac75f8bc9 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:32:33 +0200 Subject: [PATCH 5/7] Add Zora & re-add Redstone --- contracts/AtomicWethDepositor.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contracts/AtomicWethDepositor.sol b/contracts/AtomicWethDepositor.sol index df54fae38..41680f5ec 100644 --- a/contracts/AtomicWethDepositor.sol +++ b/contracts/AtomicWethDepositor.sol @@ -50,7 +50,9 @@ contract AtomicWethDepositor { OvmL1Bridge public immutable bobaL1Bridge = OvmL1Bridge(0xdc1664458d2f0B6090bEa60A8793A4E66c2F1c00); OvmL1Bridge public immutable baseL1Bridge = OvmL1Bridge(0x3154Cf16ccdb4C6d922629664174b904d80F2C35); OvmL1Bridge public immutable liskL1Bridge = OvmL1Bridge(0x2658723Bf70c7667De6B25F99fcce13A16D25d08); + OvmL1Bridge public immutable redstoneL1Bridge = OvmL1Bridge(0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69); OvmL1Bridge public immutable blastL1Bridge = OvmL1Bridge(0x697402166Fbf2F22E970df8a6486Ef171dbfc524); + OvmL1Bridge public immutable zoraL1Bridge = OvmL1Bridge(0x3e2Ea9B92B7E48A52296fD261dc26fd995284631); PolygonL1Bridge public immutable polygonL1Bridge = PolygonL1Bridge(0xA0c68C638235ee32657e8f720a23ceC1bFc77C77); ZkSyncL1Bridge public immutable zkSyncL1Bridge = ZkSyncL1Bridge(0x32400084C286CF3E17e7B677ea9583e60a000324); LineaL1MessageService public immutable lineaL1MessageService = @@ -74,6 +76,10 @@ contract AtomicWethDepositor { liskL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); } else if (chainId == 81457) { blastL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 690) { + redstoneL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); + } else if (chainId == 7777777) { + zoraL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); } else if (chainId == 288) { bobaL1Bridge.depositETHTo{ value: amount }(to, l2Gas, ""); } else { From d8f9ba76881a43bddabf12e0f9f866baaad4e3cf Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:36:24 +0200 Subject: [PATCH 6/7] Deploy AtomicWethDepositor --- deployments/mainnet/AtomicWethDepositor.json | 41 ++++++++++++------- .../dfa1a8c5a6b030fb38fb617a6ddc8435.json | 21 ++++++++++ src/common/ContractAddresses.ts | 2 +- 3 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 deployments/mainnet/solcInputs/dfa1a8c5a6b030fb38fb617a6ddc8435.json diff --git a/deployments/mainnet/AtomicWethDepositor.json b/deployments/mainnet/AtomicWethDepositor.json index f0bbe7779..ccd2388ee 100644 --- a/deployments/mainnet/AtomicWethDepositor.json +++ b/deployments/mainnet/AtomicWethDepositor.json @@ -1,5 +1,5 @@ { - "address": "0xCDE73483E965371cB1D1ffA99931400F123DD8D5", + "address": "0xE48278aD2b9b402A8E3C2E0ffbaD7EEe3905bf94", "abi": [ { "anonymous": false, @@ -326,31 +326,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "zoraL1Bridge", + "outputs": [ + { + "internalType": "contract OvmL1Bridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "stateMutability": "payable", "type": "receive" } ], - "transactionHash": "0x1e554d77fa623b559eba586db5b2e7fdc0edba6566b8b6a03641ebda87aa9131", + "transactionHash": "0xe66a3a0652de755c60dfb9631a85d0a691362b8b3168845b0a98e140976d8fc8", "receipt": { "to": null, "from": "0x9A8f92a830A5cB89a3816e3D267CB7791c16b04D", - "contractAddress": "0xCDE73483E965371cB1D1ffA99931400F123DD8D5", - "transactionIndex": 96, - "gasUsed": "1256122", + "contractAddress": "0xE48278aD2b9b402A8E3C2E0ffbaD7EEe3905bf94", + "transactionIndex": 120, + "gasUsed": "1317812", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb82f50809ab0f01de806d2f315d2fa91ea73c4ce477decfc0daf33bdac31279e", - "transactionHash": "0x1e554d77fa623b559eba586db5b2e7fdc0edba6566b8b6a03641ebda87aa9131", + "blockHash": "0x42c5ec9b27101c0ec10f47883073ed42b147572414e2ae70e19082b578abc7ac", + "transactionHash": "0xe66a3a0652de755c60dfb9631a85d0a691362b8b3168845b0a98e140976d8fc8", "logs": [], - "blockNumber": 20433667, - "cumulativeGasUsed": "9381630", + "blockNumber": 20512566, + "cumulativeGasUsed": "13084477", "status": 1, "byzantium": true }, "args": [], - "numDeployments": 7, - "solcInputHash": "63eb8725c3059aee5e8fb438aa6ee9ba", - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LineaEthDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"OvmEthDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ZkSyncEthDepositInitiated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"baseL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blastL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bobaL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"bridgeWethToLinea\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"l2Gas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"bridgeWethToOvm\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"bridgeWethToPolygon\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2GasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2GasPerPubdataByteLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundRecipient\",\"type\":\"address\"}],\"name\":\"bridgeWethToZkSync\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lineaL1MessageService\",\"outputs\":[{\"internalType\":\"contract LineaL1MessageService\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liskL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"modeL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optimismL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"polygonL1Bridge\",\"outputs\":[{\"internalType\":\"contract PolygonL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redstoneL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract Weth\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zkSyncL1Bridge\",\"outputs\":[{\"internalType\":\"contract ZkSyncL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Contract deployed on Ethereum helps relay bots atomically unwrap and bridge WETH over the canonical chain bridges for Optimism, Base, Boba, ZkSync, Linea, and Polygon. Needed as these chains only support bridging of ETH, not WETH.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/AtomicWethDepositor.sol\":\"AtomicWethDepositor\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/AtomicWethDepositor.sol\":{\"keccak256\":\"0xc5ccd82e6884ca68f4600a34e7444ab3823eb8a6bb0f69c5c6c46194a77649ee\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://d14a888da621d59a07d26afb6d011dc3bb4431bd1ed4d6bdb7c1542e3d95ca99\",\"dweb:/ipfs/QmNSMur2zGgBvQUC77SM6Vhni3KVGHBNi6jbXUAVpFhxNb\"]}},\"version\":1}", - "bytecode": "0x6101e080604052346101f65773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2608052733154cf16ccdb4c6d922629664174b904d80f2c3560a05273697402166fbf2f22e970df8a6486ef171dbfc52460c05273dc1664458d2f0b6090bea60a8793a4e66c2f1c0060e05261010090732658723bf70c7667de6b25f99fcce13a16d25d08825261012073735adbbe72226bd52e818e7181953f42e3b0ff2181526101407399c9fc46f92e8a1c0dec1b1747d010903e884be1815261016073c473ca7e02af24c129c2eef51f2adf0411c1df6981526101809073a0c68c638235ee32657e8f720a23cec1bfc77c7782526101a0927332400084c286cf3e17e7b677ea9583e60a00032484526101c09473d19d4b5d358258f05d7b411e21a1460d11b0876f86526115e897886101fb89396080518881816101b001528181610ab901528181610de301528181610e590152611104015260a05188818161039701526109d0015260c05188818161050a0152610d05015260e0518881816106fc01526114f001525187818161011d01526105ae0152518681816104650152610c9601525185818161028901526108830152518481816106520152610a3f0152518381816108f20152610b8a015251828181610d74015281816110c4015281816111fa01526112b90152518181816109610152610f2a0152f35b5f80fdfe6080806040526004908136101561001d575b5050361561001b57005b005b5f915f3560e01c918263019f8e81146114a857508163128d5f681461101f57816336918a9714610e075781633fc8cef314610d985781635970eafa14610d2957816362c8eb5c14610cba578163645b6f1114610c4b57828263b3d5ccc314610a6357508163b6865d6e146109f4578163b745c3f314610985578163c04b953414610916578163c80dcc38146108a7578163d3cdc8f914610838578163e88650c414610144575063f43873c4146100d35780610011565b3461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b9050346108345760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108345761017d611514565b604435916024359163ffffffff8416840361037857846064359473ffffffffffffffffffffffffffffffffffffffff93847f000000000000000000000000000000000000000000000000000000000000000016803b1561038757604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523384820190815230602082015291820189905290859082908190606001038183865af1908115610829578591610815575b5050803b15610387578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528c888401525af190811561080a5784916107f2575b5050600a870361038b57847f00000000000000000000000000000000000000000000000000000000000000001691823b15610387576103219285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af1801561037c57610364575b50505b60405192835216917fcde53d24289bf7d0b2baeea6140c533d8388fb574b055364d718f637bedea7a460203393a480f35b61036d90611537565b61037857845f610330565b8480fd5b6040513d84823e3d90fd5b8380fd5b612105870361045957847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af1801561037c57610445575b5050610333565b61044e90611537565b61037857845f61043e565b61868b87036104fd57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b62013e3187036105a257847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b61046f870361064657847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6102b287036106ea57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b909150610120860361079457908691847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6064906020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601360248201527f496e76616c6964204f564d20636861696e4964000000000000000000000000006044820152fd5b6107fb90611537565b61080657825f61027c565b8280fd5b6040513d86823e3d90fd5b61081e90611537565b61038757835f61022f565b6040513d87823e3d90fd5b5080fd5b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b915034610c485760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610c4857610a9c611514565b6024359073ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b15610c0657604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523387820190815230602082015291820186905290879082908190606001038183865af1908115610c3d578791610c29575b5050803b15610c06578580916024604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1908115610c1e578691610c0a575b5050817f00000000000000000000000000000000000000000000000000000000000000001690813b15610c0657859360249260405196879586947f4faa8a2600000000000000000000000000000000000000000000000000000000865216908401525af1801561037c57610bf65750f35b610bff90611537565b6101415780f35b8580fd5b610c1390611537565b61037857845f610b85565b6040513d88823e3d90fd5b610c3290611537565b610c0657855f610b38565b6040513d89823e3d90fd5b50fd5b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b905060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261083457610e3b611514565b826024359173ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b1561038757604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523388820190815230602082015291820187905290859082908190606001038183865af190811561082957859161100b575b5050803b15610387578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528a8c8401525af190811561080a578491610ff7575b5050817f00000000000000000000000000000000000000000000000000000000000000001691610f553486611578565b833b1561037857849260849160405195869485937f9f3ce55a00000000000000000000000000000000000000000000000000000000855216809a840152346024840152606060448401528560648401525af1801561037c57610fe3575b50506040519081527f61ed67a945fe5f4d777919629ad666c7e81d66dc5fbaf4c143edd000c15d67dd60203392a380f35b610fec90611537565b61080657825f610fb2565b61100090611537565b61080657825f610f25565b61101490611537565b61038757835f610ed8565b823461143c5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261143c57611057611514565b602490604435906064359460843573ffffffffffffffffffffffffffffffffffffffff9384821680920361143c576040517fb473318e0000000000000000000000000000000000000000000000000000000081523a848201528187820152886044820152602081606481897f0000000000000000000000000000000000000000000000000000000000000000165afa8015611431575f90611440575b6111009150873590611578565b91857f000000000000000000000000000000000000000000000000000000000000000016803b1561143c57604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233878201908152306020820152918201869052905f9082908190606001038183865af180156114315761141e575b50803b1561141a5788809189604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1801561140f579089916113fb575b505060405191602083019280841067ffffffffffffffff8511176113d057899a8460409b98999a9b52878252897f0000000000000000000000000000000000000000000000000000000000000000163b156113cc5760409a989695949a99979951957feb6724190000000000000000000000000000000000000000000000000000000087528888169087015288358987015260e060448701528960e48701526101048601926064870152608486015261010060a48601525180915261012490818501918160051b860101999189905b82821061132e575050505082809281808b8b979560c4899701520391887f0000000000000000000000000000000000000000000000000000000000000000165af1801561037c5761131a575b50506040519235835216907fa3e601130860a6f97b42655ad74f631ddf0c8e5adaa98402fded9c09bc35a44060203392a380f35b61132390611537565b6103875783856112e6565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc878d969596030181528b855180518092528c5b8281106113b6575050808d0160209081018d9052601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909c018c019b9394840193600192909201910161129a565b808f602082818095870101519201015201611362565b8780fd5b886041877f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b61140490611537565b6113cc57878a6111cb565b6040513d8b823e3d90fd5b8880fd5b611429919950611537565b5f978a611180565b6040513d5f823e3d90fd5b5f80fd5b5060203d6020116114a1575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff8211176113d05760209183916040528101031261143c5761110090516110f3565b503d61144c565b3461143c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261143c5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361143c57565b67ffffffffffffffff811161154b57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b9190820180921161158557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffdfea2646970667358221220fd70271e00a1c5b8b24489b0ebe8ae2d82f582512d3726ad5dfc582dba70993964736f6c63430008170033", - "deployedBytecode": "0x6080806040526004908136101561001d575b5050361561001b57005b005b5f915f3560e01c918263019f8e81146114a857508163128d5f681461101f57816336918a9714610e075781633fc8cef314610d985781635970eafa14610d2957816362c8eb5c14610cba578163645b6f1114610c4b57828263b3d5ccc314610a6357508163b6865d6e146109f4578163b745c3f314610985578163c04b953414610916578163c80dcc38146108a7578163d3cdc8f914610838578163e88650c414610144575063f43873c4146100d35780610011565b3461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b9050346108345760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108345761017d611514565b604435916024359163ffffffff8416840361037857846064359473ffffffffffffffffffffffffffffffffffffffff93847f000000000000000000000000000000000000000000000000000000000000000016803b1561038757604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523384820190815230602082015291820189905290859082908190606001038183865af1908115610829578591610815575b5050803b15610387578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528c888401525af190811561080a5784916107f2575b5050600a870361038b57847f00000000000000000000000000000000000000000000000000000000000000001691823b15610387576103219285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af1801561037c57610364575b50505b60405192835216917fcde53d24289bf7d0b2baeea6140c533d8388fb574b055364d718f637bedea7a460203393a480f35b61036d90611537565b61037857845f610330565b8480fd5b6040513d84823e3d90fd5b8380fd5b612105870361045957847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af1801561037c57610445575b5050610333565b61044e90611537565b61037857845f61043e565b61868b87036104fd57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b62013e3187036105a257847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b61046f870361064657847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6102b287036106ea57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b909150610120860361079457908691847f00000000000000000000000000000000000000000000000000000000000000001691823b156103875761042f9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6064906020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601360248201527f496e76616c6964204f564d20636861696e4964000000000000000000000000006044820152fd5b6107fb90611537565b61080657825f61027c565b8280fd5b6040513d86823e3d90fd5b61081e90611537565b61038757835f61022f565b6040513d87823e3d90fd5b5080fd5b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b915034610c485760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610c4857610a9c611514565b6024359073ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b15610c0657604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523387820190815230602082015291820186905290879082908190606001038183865af1908115610c3d578791610c29575b5050803b15610c06578580916024604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1908115610c1e578691610c0a575b5050817f00000000000000000000000000000000000000000000000000000000000000001690813b15610c0657859360249260405196879586947f4faa8a2600000000000000000000000000000000000000000000000000000000865216908401525af1801561037c57610bf65750f35b610bff90611537565b6101415780f35b8580fd5b610c1390611537565b61037857845f610b85565b6040513d88823e3d90fd5b610c3290611537565b610c0657855f610b38565b6040513d89823e3d90fd5b50fd5b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014157807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014157602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b905060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261083457610e3b611514565b826024359173ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b1561038757604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523388820190815230602082015291820187905290859082908190606001038183865af190811561082957859161100b575b5050803b15610387578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528a8c8401525af190811561080a578491610ff7575b5050817f00000000000000000000000000000000000000000000000000000000000000001691610f553486611578565b833b1561037857849260849160405195869485937f9f3ce55a00000000000000000000000000000000000000000000000000000000855216809a840152346024840152606060448401528560648401525af1801561037c57610fe3575b50506040519081527f61ed67a945fe5f4d777919629ad666c7e81d66dc5fbaf4c143edd000c15d67dd60203392a380f35b610fec90611537565b61080657825f610fb2565b61100090611537565b61080657825f610f25565b61101490611537565b61038757835f610ed8565b823461143c5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261143c57611057611514565b602490604435906064359460843573ffffffffffffffffffffffffffffffffffffffff9384821680920361143c576040517fb473318e0000000000000000000000000000000000000000000000000000000081523a848201528187820152886044820152602081606481897f0000000000000000000000000000000000000000000000000000000000000000165afa8015611431575f90611440575b6111009150873590611578565b91857f000000000000000000000000000000000000000000000000000000000000000016803b1561143c57604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233878201908152306020820152918201869052905f9082908190606001038183865af180156114315761141e575b50803b1561141a5788809189604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1801561140f579089916113fb575b505060405191602083019280841067ffffffffffffffff8511176113d057899a8460409b98999a9b52878252897f0000000000000000000000000000000000000000000000000000000000000000163b156113cc5760409a989695949a99979951957feb6724190000000000000000000000000000000000000000000000000000000087528888169087015288358987015260e060448701528960e48701526101048601926064870152608486015261010060a48601525180915261012490818501918160051b860101999189905b82821061132e575050505082809281808b8b979560c4899701520391887f0000000000000000000000000000000000000000000000000000000000000000165af1801561037c5761131a575b50506040519235835216907fa3e601130860a6f97b42655ad74f631ddf0c8e5adaa98402fded9c09bc35a44060203392a380f35b61132390611537565b6103875783856112e6565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc878d969596030181528b855180518092528c5b8281106113b6575050808d0160209081018d9052601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909c018c019b9394840193600192909201910161129a565b808f602082818095870101519201015201611362565b8780fd5b886041877f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b61140490611537565b6113cc57878a6111cb565b6040513d8b823e3d90fd5b8880fd5b611429919950611537565b5f978a611180565b6040513d5f823e3d90fd5b5f80fd5b5060203d6020116114a1575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff8211176113d05760209183916040528101031261143c5761110090516110f3565b503d61144c565b3461143c575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261143c5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361143c57565b67ffffffffffffffff811161154b57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b9190820180921161158557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffdfea2646970667358221220fd70271e00a1c5b8b24489b0ebe8ae2d82f582512d3726ad5dfc582dba70993964736f6c63430008170033" + "numDeployments": 8, + "solcInputHash": "dfa1a8c5a6b030fb38fb617a6ddc8435", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"LineaEthDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"OvmEthDepositInitiated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ZkSyncEthDepositInitiated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"baseL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blastL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bobaL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"bridgeWethToLinea\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"l2Gas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"bridgeWethToOvm\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"bridgeWethToPolygon\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2GasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l2GasPerPubdataByteLimit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundRecipient\",\"type\":\"address\"}],\"name\":\"bridgeWethToZkSync\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lineaL1MessageService\",\"outputs\":[{\"internalType\":\"contract LineaL1MessageService\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liskL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"modeL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"optimismL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"polygonL1Bridge\",\"outputs\":[{\"internalType\":\"contract PolygonL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redstoneL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract Weth\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zkSyncL1Bridge\",\"outputs\":[{\"internalType\":\"contract ZkSyncL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"zoraL1Bridge\",\"outputs\":[{\"internalType\":\"contract OvmL1Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Contract deployed on Ethereum helps relay bots atomically unwrap and bridge WETH over the canonical chain bridges for Optimism, Base, Boba, ZkSync, Linea, and Polygon. Needed as these chains only support bridging of ETH, not WETH.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/AtomicWethDepositor.sol\":\"AtomicWethDepositor\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"contracts/AtomicWethDepositor.sol\":{\"keccak256\":\"0xf3a524efe64fbe7ec5fc1635059a8852ab919eff0edddd4c5397fdd306685f0e\",\"license\":\"GPL-3.0-only\",\"urls\":[\"bzz-raw://5448a851d7804aba3805779e13489e3a8b1546f701bb408628fbe414917c5bc3\",\"dweb:/ipfs/QmfP1BybGNvXiBbd5ba2EXNBvr3w1YyoZAWiAUEV3wt9US\"]}},\"version\":1}", + "bytecode": "0x610200806040523461021e5773c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26080527399c9fc46f92e8a1c0dec1b1747d010903e884be160a05273735adbbe72226bd52e818e7181953f42e3b0ff2160c05273dc1664458d2f0b6090bea60a8793a4e66c2f1c0060e05261010090733154cf16ccdb4c6d922629664174b904d80f2c358252610120732658723bf70c7667de6b25f99fcce13a16d25d08815261014073c473ca7e02af24c129c2eef51f2adf0411c1df69815261016073697402166fbf2f22e970df8a6486ef171dbfc5248152610180733e2ea9b92b7e48a52296fd261dc26fd99528463181526101a09173a0c68c638235ee32657e8f720a23cec1bfc77c7783526101c0937332400084c286cf3e17e7b677ea9583e60a00032485526101e09573d19d4b5d358258f05d7b411e21a1460d11b0876f875261170798896102238a396080518981816101bb01528181610b6901528181610f0201528181610f780152611223015260a0518981816102940152610933015260c0518981816104700152610d46015260e0518981816107ac015261160f0152518881816103a20152610a80015251878181610128015261051401525186818161065d0152610aef0152518581816105b90152610db50152518481816107020152610e930152518381816109a20152610c3a015251828181610e24015281816111e30152818161131901526113d8015251818181610a1101526110490152f35b5f80fdfe6080806040526004908136101561001d575b5050361561001b57005b005b5f915f3560e01c918263019f8e81146115c757508163128d5f681461113e57816336918a9714610f265781633fc8cef314610eb75781634fbf95d714610e485781635970eafa14610dd957816362c8eb5c14610d6a578163645b6f1114610cfb57828263b3d5ccc314610b1357508163b6865d6e14610aa4578163b745c3f314610a35578163c04b9534146109c6578163c80dcc3814610957578163d3cdc8f9146108e8578163e88650c41461014f575063f43873c4146100de5780610011565b3461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b9050346108e45760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108e457610188611633565b604435916024359163ffffffff8416840361038357846064359473ffffffffffffffffffffffffffffffffffffffff93847f000000000000000000000000000000000000000000000000000000000000000016803b1561039257604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523384820190815230602082015291820189905290859082908190606001038183865af19081156108d95785916108c5575b5050803b15610392578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528c888401525af19081156108ba5784916108a2575b5050600a870361039657847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761032c9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af180156103875761036f575b50505b60405192835216917fcde53d24289bf7d0b2baeea6140c533d8388fb574b055364d718f637bedea7a460203393a480f35b61037890611656565b61038357845f61033b565b8480fd5b6040513d84823e3d90fd5b8380fd5b612105870361046457847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af1801561038757610450575b505061033e565b61045990611656565b61038357845f610449565b61868b870361050857847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b61046f87036105ac57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b62013e31870361065157847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6102b287036106f557847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6276adf1870361079a57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b909150610120860361084457908691847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6064906020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601360248201527f496e76616c6964204f564d20636861696e4964000000000000000000000000006044820152fd5b6108ab90611656565b6108b657825f610287565b8280fd5b6040513d86823e3d90fd5b6108ce90611656565b61039257835f61023a565b6040513d87823e3d90fd5b5080fd5b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b915034610cf85760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610cf857610b4c611633565b6024359073ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b15610cb657604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523387820190815230602082015291820186905290879082908190606001038183865af1908115610ced578791610cd9575b5050803b15610cb6578580916024604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1908115610cce578691610cba575b5050817f00000000000000000000000000000000000000000000000000000000000000001690813b15610cb657859360249260405196879586947f4faa8a2600000000000000000000000000000000000000000000000000000000865216908401525af1801561038757610ca65750f35b610caf90611656565b61014c5780f35b8580fd5b610cc390611656565b61038357845f610c35565b6040513d88823e3d90fd5b610ce290611656565b610cb657855f610be8565b6040513d89823e3d90fd5b50fd5b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b905060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108e457610f5a611633565b826024359173ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b1561039257604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523388820190815230602082015291820187905290859082908190606001038183865af19081156108d957859161112a575b5050803b15610392578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528a8c8401525af19081156108ba578491611116575b5050817f000000000000000000000000000000000000000000000000000000000000000016916110743486611697565b833b1561038357849260849160405195869485937f9f3ce55a00000000000000000000000000000000000000000000000000000000855216809a840152346024840152606060448401528560648401525af1801561038757611102575b50506040519081527f61ed67a945fe5f4d777919629ad666c7e81d66dc5fbaf4c143edd000c15d67dd60203392a380f35b61110b90611656565b6108b657825f6110d1565b61111f90611656565b6108b657825f611044565b61113390611656565b61039257835f610ff7565b823461155b5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261155b57611176611633565b602490604435906064359460843573ffffffffffffffffffffffffffffffffffffffff9384821680920361155b576040517fb473318e0000000000000000000000000000000000000000000000000000000081523a848201528187820152886044820152602081606481897f0000000000000000000000000000000000000000000000000000000000000000165afa8015611550575f9061155f575b61121f9150873590611697565b91857f000000000000000000000000000000000000000000000000000000000000000016803b1561155b57604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233878201908152306020820152918201869052905f9082908190606001038183865af180156115505761153d575b50803b156115395788809189604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1801561152e5790899161151a575b505060405191602083019280841067ffffffffffffffff8511176114ef57899a8460409b98999a9b52878252897f0000000000000000000000000000000000000000000000000000000000000000163b156114eb5760409a989695949a99979951957feb6724190000000000000000000000000000000000000000000000000000000087528888169087015288358987015260e060448701528960e48701526101048601926064870152608486015261010060a48601525180915261012490818501918160051b860101999189905b82821061144d575050505082809281808b8b979560c4899701520391887f0000000000000000000000000000000000000000000000000000000000000000165af1801561038757611439575b50506040519235835216907fa3e601130860a6f97b42655ad74f631ddf0c8e5adaa98402fded9c09bc35a44060203392a380f35b61144290611656565b610392578385611405565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc878d969596030181528b855180518092528c5b8281106114d5575050808d0160209081018d9052601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909c018c019b939484019360019290920191016113b9565b808f602082818095870101519201015201611481565b8780fd5b886041877f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b61152390611656565b6114eb57878a6112ea565b6040513d8b823e3d90fd5b8880fd5b611548919950611656565b5f978a61129f565b6040513d5f823e3d90fd5b5f80fd5b5060203d6020116115c0575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff8211176114ef5760209183916040528101031261155b5761121f9051611212565b503d61156b565b3461155b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261155b5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361155b57565b67ffffffffffffffff811161166a57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b919082018092116116a457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffdfea26469706673582212205888bf681cf0d9036082fce3d2d0a7cbdfb2d39c83fdb5d03d2fff0b90c6af1064736f6c63430008170033", + "deployedBytecode": "0x6080806040526004908136101561001d575b5050361561001b57005b005b5f915f3560e01c918263019f8e81146115c757508163128d5f681461113e57816336918a9714610f265781633fc8cef314610eb75781634fbf95d714610e485781635970eafa14610dd957816362c8eb5c14610d6a578163645b6f1114610cfb57828263b3d5ccc314610b1357508163b6865d6e14610aa4578163b745c3f314610a35578163c04b9534146109c6578163c80dcc3814610957578163d3cdc8f9146108e8578163e88650c41461014f575063f43873c4146100de5780610011565b3461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b9050346108e45760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108e457610188611633565b604435916024359163ffffffff8416840361038357846064359473ffffffffffffffffffffffffffffffffffffffff93847f000000000000000000000000000000000000000000000000000000000000000016803b1561039257604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523384820190815230602082015291820189905290859082908190606001038183865af19081156108d95785916108c5575b5050803b15610392578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528c888401525af19081156108ba5784916108a2575b5050600a870361039657847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761032c9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af180156103875761036f575b50505b60405192835216917fcde53d24289bf7d0b2baeea6140c533d8388fb574b055364d718f637bedea7a460203393a480f35b61037890611656565b61038357845f61033b565b8480fd5b6040513d84823e3d90fd5b8380fd5b612105870361046457847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b03925af1801561038757610450575b505061033e565b61045990611656565b61038357845f610449565b61868b870361050857847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b61046f87036105ac57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b62013e31870361065157847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6102b287036106f557847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6276adf1870361079a57847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b909150610120860361084457908691847f00000000000000000000000000000000000000000000000000000000000000001691823b156103925761043a9285888694604051968795869485937f9a2ac6d500000000000000000000000000000000000000000000000000000000855284019060809273ffffffffffffffffffffffffffffffffffffffff63ffffffff92168352166020820152606060408201525f60608201520190565b6064906020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601360248201527f496e76616c6964204f564d20636861696e4964000000000000000000000000006044820152fd5b6108ab90611656565b6108b657825f610287565b8280fd5b6040513d86823e3d90fd5b6108ce90611656565b61039257835f61023a565b6040513d87823e3d90fd5b5080fd5b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b915034610cf85760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610cf857610b4c611633565b6024359073ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b15610cb657604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523387820190815230602082015291820186905290879082908190606001038183865af1908115610ced578791610cd9575b5050803b15610cb6578580916024604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1908115610cce578691610cba575b5050817f00000000000000000000000000000000000000000000000000000000000000001690813b15610cb657859360249260405196879586947f4faa8a2600000000000000000000000000000000000000000000000000000000865216908401525af1801561038757610ca65750f35b610caf90611656565b61014c5780f35b8580fd5b610cc390611656565b61038357845f610c35565b6040513d88823e3d90fd5b610ce290611656565b610cb657855f610be8565b6040513d89823e3d90fd5b50fd5b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461014c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261014c57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b905060407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108e457610f5a611633565b826024359173ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b1561039257604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523388820190815230602082015291820187905290859082908190606001038183865af19081156108d957859161112a575b5050803b15610392578380916024604051809481937f2e1a7d4d0000000000000000000000000000000000000000000000000000000083528a8c8401525af19081156108ba578491611116575b5050817f000000000000000000000000000000000000000000000000000000000000000016916110743486611697565b833b1561038357849260849160405195869485937f9f3ce55a00000000000000000000000000000000000000000000000000000000855216809a840152346024840152606060448401528560648401525af1801561038757611102575b50506040519081527f61ed67a945fe5f4d777919629ad666c7e81d66dc5fbaf4c143edd000c15d67dd60203392a380f35b61110b90611656565b6108b657825f6110d1565b61111f90611656565b6108b657825f611044565b61113390611656565b61039257835f610ff7565b823461155b5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261155b57611176611633565b602490604435906064359460843573ffffffffffffffffffffffffffffffffffffffff9384821680920361155b576040517fb473318e0000000000000000000000000000000000000000000000000000000081523a848201528187820152886044820152602081606481897f0000000000000000000000000000000000000000000000000000000000000000165afa8015611550575f9061155f575b61121f9150873590611697565b91857f000000000000000000000000000000000000000000000000000000000000000016803b1561155b57604080517f23b872dd00000000000000000000000000000000000000000000000000000000815233878201908152306020820152918201869052905f9082908190606001038183865af180156115505761153d575b50803b156115395788809189604051809481937f2e1a7d4d000000000000000000000000000000000000000000000000000000008352898b8401525af1801561152e5790899161151a575b505060405191602083019280841067ffffffffffffffff8511176114ef57899a8460409b98999a9b52878252897f0000000000000000000000000000000000000000000000000000000000000000163b156114eb5760409a989695949a99979951957feb6724190000000000000000000000000000000000000000000000000000000087528888169087015288358987015260e060448701528960e48701526101048601926064870152608486015261010060a48601525180915261012490818501918160051b860101999189905b82821061144d575050505082809281808b8b979560c4899701520391887f0000000000000000000000000000000000000000000000000000000000000000165af1801561038757611439575b50506040519235835216907fa3e601130860a6f97b42655ad74f631ddf0c8e5adaa98402fded9c09bc35a44060203392a380f35b61144290611656565b610392578385611405565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc878d969596030181528b855180518092528c5b8281106114d5575050808d0160209081018d9052601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909c018c019b939484019360019290920191016113b9565b808f602082818095870101519201015201611481565b8780fd5b886041877f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b61152390611656565b6114eb57878a6112ea565b6040513d8b823e3d90fd5b8880fd5b611548919950611656565b5f978a61129f565b6040513d5f823e3d90fd5b5f80fd5b5060203d6020116115c0575b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f820116820182811067ffffffffffffffff8211176114ef5760209183916040528101031261155b5761121f9051611212565b503d61156b565b3461155b575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261155b5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361155b57565b67ffffffffffffffff811161166a57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b919082018092116116a457565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffdfea26469706673582212205888bf681cf0d9036082fce3d2d0a7cbdfb2d39c83fdb5d03d2fff0b90c6af1064736f6c63430008170033" } diff --git a/deployments/mainnet/solcInputs/dfa1a8c5a6b030fb38fb617a6ddc8435.json b/deployments/mainnet/solcInputs/dfa1a8c5a6b030fb38fb617a6ddc8435.json new file mode 100644 index 000000000..1925918c8 --- /dev/null +++ b/deployments/mainnet/solcInputs/dfa1a8c5a6b030fb38fb617a6ddc8435.json @@ -0,0 +1,21 @@ +{ + "language": "Solidity", + "sources": { + "contracts/AtomicWethDepositor.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-only\npragma solidity ^0.8.0;\n\ninterface Weth {\n function withdraw(uint256 _wad) external;\n\n function transferFrom(address _from, address _to, uint256 _wad) external;\n}\n\ninterface OvmL1Bridge {\n function depositETHTo(address _to, uint32 _l2Gas, bytes calldata _data) external payable;\n}\n\ninterface PolygonL1Bridge {\n function depositEtherFor(address _to) external payable;\n}\n\ninterface ZkSyncL1Bridge {\n function requestL2Transaction(\n address _contractL2,\n uint256 _l2Value,\n bytes calldata _calldata,\n uint256 _l2GasLimit,\n uint256 _l2GasPerPubdataByteLimit,\n bytes[] calldata _factoryDeps,\n address _refundRecipient\n ) external payable;\n\n function l2TransactionBaseCost(\n uint256 _gasPrice,\n uint256 _l2GasLimit,\n uint256 _l2GasPerPubdataByteLimit\n ) external pure returns (uint256);\n}\n\ninterface LineaL1MessageService {\n function sendMessage(address _to, uint256 _fee, bytes calldata _calldata) external payable;\n}\n\n/**\n * @notice Contract deployed on Ethereum helps relay bots atomically unwrap and bridge WETH over the canonical chain\n * bridges for Optimism, Base, Boba, ZkSync, Linea, and Polygon. Needed as these chains only support bridging of ETH,\n * not WETH.\n */\n\ncontract AtomicWethDepositor {\n Weth public immutable weth = Weth(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);\n OvmL1Bridge public immutable optimismL1Bridge = OvmL1Bridge(0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1);\n OvmL1Bridge public immutable modeL1Bridge = OvmL1Bridge(0x735aDBbE72226BD52e818E7181953f42E3b0FF21);\n OvmL1Bridge public immutable bobaL1Bridge = OvmL1Bridge(0xdc1664458d2f0B6090bEa60A8793A4E66c2F1c00);\n OvmL1Bridge public immutable baseL1Bridge = OvmL1Bridge(0x3154Cf16ccdb4C6d922629664174b904d80F2C35);\n OvmL1Bridge public immutable liskL1Bridge = OvmL1Bridge(0x2658723Bf70c7667De6B25F99fcce13A16D25d08);\n OvmL1Bridge public immutable redstoneL1Bridge = OvmL1Bridge(0xc473ca7E02af24c129c2eEf51F2aDf0411c1Df69);\n OvmL1Bridge public immutable blastL1Bridge = OvmL1Bridge(0x697402166Fbf2F22E970df8a6486Ef171dbfc524);\n OvmL1Bridge public immutable zoraL1Bridge = OvmL1Bridge(0x3e2Ea9B92B7E48A52296fD261dc26fd995284631);\n PolygonL1Bridge public immutable polygonL1Bridge = PolygonL1Bridge(0xA0c68C638235ee32657e8f720a23ceC1bFc77C77);\n ZkSyncL1Bridge public immutable zkSyncL1Bridge = ZkSyncL1Bridge(0x32400084C286CF3E17e7B677ea9583e60a000324);\n LineaL1MessageService public immutable lineaL1MessageService =\n LineaL1MessageService(0xd19d4B5d358258f05D7B411E21A1460D11B0876F);\n\n event ZkSyncEthDepositInitiated(address indexed from, address indexed to, uint256 amount);\n event LineaEthDepositInitiated(address indexed from, address indexed to, uint256 amount);\n event OvmEthDepositInitiated(uint256 indexed chainId, address indexed from, address indexed to, uint256 amount);\n\n function bridgeWethToOvm(address to, uint256 amount, uint32 l2Gas, uint256 chainId) public {\n weth.transferFrom(msg.sender, address(this), amount);\n weth.withdraw(amount);\n\n if (chainId == 10) {\n optimismL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 8453) {\n baseL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 34443) {\n modeL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 1135) {\n liskL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 81457) {\n blastL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 690) {\n redstoneL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 7777777) {\n zoraL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else if (chainId == 288) {\n bobaL1Bridge.depositETHTo{ value: amount }(to, l2Gas, \"\");\n } else {\n revert(\"Invalid OVM chainId\");\n }\n\n emit OvmEthDepositInitiated(chainId, msg.sender, to, amount);\n }\n\n function bridgeWethToPolygon(address to, uint256 amount) public {\n weth.transferFrom(msg.sender, address(this), amount);\n weth.withdraw(amount);\n polygonL1Bridge.depositEtherFor{ value: amount }(to);\n }\n\n function bridgeWethToLinea(address to, uint256 amount) public payable {\n weth.transferFrom(msg.sender, address(this), amount);\n weth.withdraw(amount);\n lineaL1MessageService.sendMessage{ value: amount + msg.value }(to, msg.value, \"\");\n // Emit an event that we can easily track in the Linea-related adapters/finalizers\n emit LineaEthDepositInitiated(msg.sender, to, amount);\n }\n\n function bridgeWethToZkSync(\n address to,\n uint256 amount,\n uint256 l2GasLimit,\n uint256 l2GasPerPubdataByteLimit,\n address refundRecipient\n ) public {\n // The ZkSync Mailbox contract checks that the msg.value of the transaction is enough to cover the transaction base\n // cost. The transaction base cost can be queried from the Mailbox by passing in an L1 \"executed\" gas price,\n // which is the priority fee plus base fee. This is the same as calling tx.gasprice on-chain as the Mailbox\n // contract does here:\n // https://github.com/matter-labs/era-contracts/blob/3a4506522aaef81485d8abb96f5a6394bd2ba69e/ethereum/contracts/zksync/facets/Mailbox.sol#L287\n uint256 l2TransactionBaseCost = zkSyncL1Bridge.l2TransactionBaseCost(\n tx.gasprice,\n l2GasLimit,\n l2GasPerPubdataByteLimit\n );\n uint256 valueToSubmitXChainMessage = l2TransactionBaseCost + amount;\n weth.transferFrom(msg.sender, address(this), valueToSubmitXChainMessage);\n weth.withdraw(valueToSubmitXChainMessage);\n zkSyncL1Bridge.requestL2Transaction{ value: valueToSubmitXChainMessage }(\n to,\n amount,\n \"\",\n l2GasLimit,\n l2GasPerPubdataByteLimit,\n new bytes[](0),\n refundRecipient\n );\n\n // Emit an event that we can easily track in the ZkSyncAdapter because otherwise there is no easy event to\n // track ETH deposit initiations.\n emit ZkSyncEthDepositInitiated(msg.sender, to, amount);\n }\n\n fallback() external payable {}\n\n // Included to remove a compilation warning.\n // NOTE: this should not affect behavior.\n receive() external payable {}\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 1000000 + }, + "viaIR": true, + "outputSelection": { + "*": { + "*": ["abi", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "metadata"], + "": ["ast"] + } + } + } +} diff --git a/src/common/ContractAddresses.ts b/src/common/ContractAddresses.ts index c8a137d5d..89bd11b2c 100644 --- a/src/common/ContractAddresses.ts +++ b/src/common/ContractAddresses.ts @@ -73,7 +73,7 @@ export const CONTRACT_ADDRESSES: { // OVM, ZkSync, Linea, and Polygon can't deposit WETH directly so we use an atomic depositor contract that unwraps WETH and // bridges ETH other the canonical bridge. atomicDepositor: { - address: "0xCDE73483E965371cB1D1ffA99931400F123DD8D5", + address: "0xE48278aD2b9b402A8E3C2E0ffbaD7EEe3905bf94", abi: ATOMIC_DEPOSITOR_ABI, }, // Since there are multiple ovmStandardBridges on mainnet for different OP Stack chains, we append the chain id of the Op From 389f16dfb477cbc2ca11f235eef1adf267bcf409 Mon Sep 17 00:00:00 2001 From: Paul <108695806+pxrl@users.noreply.github.com> Date: Wed, 14 Aug 2024 19:14:27 +0200 Subject: [PATCH 7/7] Bump contracts & sdk --- package.json | 4 ++-- yarn.lock | 31 +++++++++++++++++-------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 2a033f3ad..799421218 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ }, "dependencies": { "@across-protocol/constants": "^3.1.13", - "@across-protocol/contracts": "^3.0.9", - "@across-protocol/sdk": "^3.1.18", + "@across-protocol/contracts": "^3.0.10", + "@across-protocol/sdk": "^3.1.20", "@arbitrum/sdk": "^3.1.3", "@consensys/linea-sdk": "^0.2.1", "@defi-wonderland/smock": "^2.3.5", diff --git a/yarn.lock b/yarn.lock index b7f39ee40..ca0837aea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,11 +16,6 @@ resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.13.tgz#b4caf494e9d9fe50290cca91b7883ea408fdb90a" integrity sha512-EsTJgQL5p+XXs40aBxOSbMOpQr/f4ty+Iyget8Oh6MT/cncCa2+W8a78fbqYqTtSpH6Sm7E8nvT8gPuSS6ef1w== -"@across-protocol/constants@^3.1.13": - version "3.1.13" - resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.13.tgz#b4caf494e9d9fe50290cca91b7883ea408fdb90a" - integrity sha512-EsTJgQL5p+XXs40aBxOSbMOpQr/f4ty+Iyget8Oh6MT/cncCa2+W8a78fbqYqTtSpH6Sm7E8nvT8gPuSS6ef1w== - "@across-protocol/contracts@^0.1.4": version "0.1.4" resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-0.1.4.tgz#64b3d91e639d2bb120ea94ddef3d160967047fa5" @@ -30,10 +25,10 @@ "@openzeppelin/contracts" "4.1.0" "@uma/core" "^2.18.0" -"@across-protocol/contracts@^3.0.9": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-3.0.9.tgz#26a738e95ddcc433bc1beeb7367f379886d0f037" - integrity sha512-8eoq2/+2GTVSg4t8mEjFtX7OqG92v5JMGKbwGp47/ucQZt1Hat5OocdqcGbpz3QUOPXmF7RU+1RP5TIei28ohA== +"@across-protocol/contracts@^3.0.10": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@across-protocol/contracts/-/contracts-3.0.10.tgz#965baa824b53af09cd4fb755dadf23776214ef77" + integrity sha512-qZBIkvuU1faZYUj0qFTWN7DVHfkEFK4jn7u5SMHBtAFEtbW2kSIREbE8afWPbhXa5Zah409nQINzYkcfo/I5rw== dependencies: "@across-protocol/constants" "^3.1.13" "@defi-wonderland/smock" "^2.3.4" @@ -50,23 +45,26 @@ axios "^1.6.2" zksync-web3 "^0.14.3" -"@across-protocol/sdk@^3.1.18": - version "3.1.18" - resolved "https://registry.yarnpkg.com/@across-protocol/sdk/-/sdk-3.1.18.tgz#1056dfb286e444c100d993a8dbb6095e8309ca5d" - integrity sha512-fyvMmt+bq3qYaVXpSskAtxo1bY2fr81Fw6gTvXnNOxSB4zk2Ier4/Rooy+31Bbc27ZBIZ5IttLbuqo2R2cDxZw== +"@across-protocol/sdk@^3.1.20": + version "3.1.20" + resolved "https://registry.yarnpkg.com/@across-protocol/sdk/-/sdk-3.1.20.tgz#f9631b5aab7f78e3bab37ce3210860df98a4e2ce" + integrity sha512-b83gi1/VIHVGFFUrcHD2vag4MzJBoH4U5FydZzYxbhWJ5nYRl30PjW+aIwZo76M31a8+86Dqfm/QtUwI4Rkfrw== dependencies: "@across-protocol/across-token" "^1.0.0" "@across-protocol/constants" "^3.1.13" - "@across-protocol/contracts" "^3.0.9" + "@across-protocol/contracts" "^3.0.10" "@eth-optimism/sdk" "^3.3.1" "@pinata/sdk" "^2.1.0" "@types/mocha" "^10.0.1" + "@uma/logger" "^1.3.0" "@uma/sdk" "^0.34.1" arweave "^1.14.4" + async "^3.2.5" axios "^0.27.2" big-number "^2.0.0" decimal.js "^10.3.1" ethers "^5.7.2" + lodash "^4.17.21" lodash.get "^4.4.2" superstruct "^0.15.4" tslib "^2.6.2" @@ -3948,6 +3946,11 @@ async@^3.2.3, async@^3.2.4: resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== +async@^3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"