22pragma solidity ^ 0.8.13 ;
33
44import {RollupOrders} from "zenith/src/orders/RollupOrders.sol " ;
5- import {RollupPassage} from "zenith/src/passage/RollupPassage.sol " ;
6- import {IERC20 } from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol " ;
75
6+ import {RollupConstants} from "../chains/L2.sol " ;
87import {ParmigianaConstants} from "../chains/Parmigiana.sol " ;
98import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol " ;
109
11- contract SignetL2 {
10+ contract SignetL2 is RollupConstants {
1211 /// @notice Sentinal value for the native asset in order inputs/outputs
1312 address constant NATIVE_ASSET = address (0 );
1413
1514 /// @notice The chain ID of the host network.
1615 uint32 internal immutable HOST_CHAIN_ID;
1716
18- /// @notice The Rollup Passage contract.
19- RollupPassage internal immutable PASSAGE;
20- /// @notice The Rollup Orders contract.
21- RollupOrders internal immutable ORDERS;
22-
2317 /// @notice The address of the Rollup Passage on the host network.
2418 address immutable HOST_PASSAGE;
2519
26- /// @notice The WETH token address.
27- IERC20 internal immutable WETH;
28- /// @notice The WBTC token address.
29- IERC20 internal immutable WBTC;
30- /// @notice The WUSD token address.
31- IERC20 internal immutable WUSD;
32-
3320 /// @notice The USDC token address on the host network.
3421 address internal immutable HOST_USDC;
3522 /// @notice The USDT token address on the host network.
@@ -49,13 +36,6 @@ contract SignetL2 {
4936
5037 HOST_PASSAGE = address (ParmigianaConstants.HOST_PASSAGE);
5138
52- PASSAGE = ParmigianaConstants.ROLLUP_PASSAGE;
53- ORDERS = ParmigianaConstants.ROLLUP_ORDERS;
54-
55- WETH = ParmigianaConstants.WETH;
56- WBTC = ParmigianaConstants.WBTC;
57- WUSD = ParmigianaConstants.WUSD;
58-
5939 HOST_USDC = ParmigianaConstants.HOST_USDC;
6040 HOST_USDT = ParmigianaConstants.HOST_USDT;
6141 HOST_WBTC = ParmigianaConstants.HOST_WBTC;
@@ -88,12 +68,15 @@ contract SignetL2 {
8868 input.amount = amount;
8969 }
9070
91- function makeWethInput (uint256 amount ) internal view returns (RollupOrders.Input memory input ) {
71+ /// @notice Creates an Input struct for the WETH token.
72+ /// @param amount The amount of WETH.
73+ /// @return input The created Input struct for WETH.
74+ function makeWethInput (uint256 amount ) internal pure returns (RollupOrders.Input memory input ) {
9275 input.token = address (WETH);
9376 input.amount = amount;
9477 }
9578
96- function makeWbtcInput (uint256 amount ) internal view returns (RollupOrders.Input memory input ) {
79+ function makeWbtcInput (uint256 amount ) internal pure returns (RollupOrders.Input memory input ) {
9780 input.token = address (WBTC);
9881 input.amount = amount;
9982 }
0 commit comments