|
| 1 | +// SPDX-License-Identifier: UNLICENSED |
| 2 | +pragma solidity ^0.8.13; |
| 3 | + |
| 4 | +import {HostOrders} from "zenith/src/orders/HostOrders.sol"; |
| 5 | +import {Passage} from "zenith/src/passage/Passage.sol"; |
| 6 | +import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; |
| 7 | + |
| 8 | +import {PecorinoConstants} from "../chains/Pecorino.sol"; |
| 9 | + |
| 10 | +abstract contract SignetL1 { |
| 11 | + /// @notice Sentinal value for the native asset in order inputs/outputs |
| 12 | + address constant NATIVE_ASSET = address(0); |
| 13 | + |
| 14 | + /// @notice The Passage address |
| 15 | + Passage internal immutable PASSAGE; |
| 16 | + /// @notice The Host Orders address |
| 17 | + HostOrders internal immutable ORDERS; |
| 18 | + |
| 19 | + /// @notice The WETH token address. |
| 20 | + IERC20 internal immutable WETH; |
| 21 | + /// @notice The WBTC token address. |
| 22 | + IERC20 internal immutable WBTC; |
| 23 | + /// @notice The USDC token address. |
| 24 | + IERC20 internal immutable USDC; |
| 25 | + /// @notice The USDT token address. |
| 26 | + IERC20 internal immutable USDT; |
| 27 | + |
| 28 | + /// @notice The Rollup WUSD token address. |
| 29 | + address internal immutable RU_WUSD; |
| 30 | + /// @notice The Rollup WBTC token address. |
| 31 | + address internal immutable RU_WBTC; |
| 32 | + /// @notice The Rollup WETH token address. |
| 33 | + address internal immutable RU_WETH; |
| 34 | + |
| 35 | + /// @notice Error for unsupported chain IDs. |
| 36 | + error UnsupportedChain(uint256); |
| 37 | + |
| 38 | + constructor() { |
| 39 | + if (block.chainid == PecorinoConstants.HOST_CHAIN_ID) { |
| 40 | + PASSAGE = PecorinoConstants.HOST_PASSAGE; |
| 41 | + ORDERS = PecorinoConstants.HOST_ORDERS; |
| 42 | + |
| 43 | + WETH = IERC20(PecorinoConstants.HOST_WETH); |
| 44 | + WBTC = IERC20(PecorinoConstants.HOST_WBTC); |
| 45 | + USDC = IERC20(PecorinoConstants.HOST_USDC); |
| 46 | + USDT = IERC20(PecorinoConstants.HOST_USDT); |
| 47 | + |
| 48 | + RU_WUSD = address(PecorinoConstants.WUSD); |
| 49 | + RU_WBTC = address(PecorinoConstants.WBTC); |
| 50 | + RU_WETH = address(PecorinoConstants.WETH); |
| 51 | + } else { |
| 52 | + revert UnsupportedChain(block.chainid); |
| 53 | + } |
| 54 | + } |
| 55 | +} |
0 commit comments