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
@@ -18,21 +17,9 @@ contract SignetL2 {
1817 /// @notice The chain ID of the host network.
1918 uint32 internal immutable HOST_CHAIN_ID;
2019
21- /// @notice The Rollup Passage contract.
22- RollupPassage internal immutable PASSAGE;
23- /// @notice The Rollup Orders contract.
24- RollupOrders internal immutable ORDERS;
25-
2620 /// @notice The address of the Rollup Passage on the host network.
2721 address immutable HOST_PASSAGE;
2822
29- /// @notice The WETH token address.
30- IERC20 internal immutable WETH;
31- /// @notice The WBTC token address.
32- IERC20 internal immutable WBTC;
33- /// @notice The WUSD token address.
34- IERC20 internal immutable WUSD;
35-
3623 /// @notice The USDC token address on the host network.
3724 address internal immutable HOST_USDC;
3825 /// @notice The USDT token address on the host network.
@@ -52,13 +39,6 @@ contract SignetL2 {
5239
5340 HOST_PASSAGE = address (ParmigianaConstants.HOST_PASSAGE);
5441
55- PASSAGE = ParmigianaConstants.ROLLUP_PASSAGE;
56- ORDERS = ParmigianaConstants.ROLLUP_ORDERS;
57-
58- WETH = ParmigianaConstants.WETH;
59- WBTC = ParmigianaConstants.WBTC;
60- WUSD = ParmigianaConstants.WUSD;
61-
6242 HOST_USDC = ParmigianaConstants.HOST_USDC;
6343 HOST_USDT = ParmigianaConstants.HOST_USDT;
6444 HOST_WBTC = ParmigianaConstants.HOST_WBTC;
@@ -91,12 +71,15 @@ contract SignetL2 {
9171 input.amount = amount;
9272 }
9373
94- function makeWethInput (uint256 amount ) internal view returns (RollupOrders.Input memory input ) {
74+ /// @notice Creates an Input struct for the WETH token.
75+ /// @param amount The amount of WETH.
76+ /// @return input The created Input struct for WETH.
77+ function makeWethInput (uint256 amount ) internal pure returns (RollupOrders.Input memory input ) {
9578 input.token = address (WETH);
9679 input.amount = amount;
9780 }
9881
99- function makeWbtcInput (uint256 amount ) internal view returns (RollupOrders.Input memory input ) {
82+ function makeWbtcInput (uint256 amount ) internal pure returns (RollupOrders.Input memory input ) {
10083 input.token = address (WBTC);
10184 input.amount = amount;
10285 }
0 commit comments