From 82465190c2be4addd416eddbca27413659d34a8d Mon Sep 17 00:00:00 2001 From: dylan Date: Tue, 19 May 2026 12:44:22 -0600 Subject: [PATCH] feat: add Gouda testnet support to SignetL2 constructor - New chains/Gouda.sol with rollup chain ID 792669 and Gouda host deployment addresses (host chain shared with Parmigiana). - SignetL2 constructor adds an `else if` branch for Gouda's rollup chain ID, matching the existing Parmigiana pattern. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/chains/Gouda.sol | 33 +++++++++++++++++++++++++++++++++ src/l2/Signet.sol | 10 ++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/chains/Gouda.sol diff --git a/src/chains/Gouda.sol b/src/chains/Gouda.sol new file mode 100644 index 0000000..986890b --- /dev/null +++ b/src/chains/Gouda.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.13; + +import {HostOrders} from "zenith/src/orders/HostOrders.sol"; +import {Passage} from "zenith/src/passage/Passage.sol"; + +/// @title GoudaConstants +/// @author init4 +/// @notice Constants for the Gouda testnet. +/// @dev Gouda runs on the Parmigiana host chain, so HOST_CHAIN_ID matches +/// Parmigiana's. Rollup chain ID and on-host contract deployments are +/// gouda-specific. Used by `SignetL2` when block.chainid == ROLLUP_CHAIN_ID. +library GoudaConstants { + /// @notice The Gouda host chain ID (shared with Parmigiana). + uint32 constant HOST_CHAIN_ID = 3151908; + /// @notice The Gouda Rollup chain ID. + uint32 constant ROLLUP_CHAIN_ID = 792669; + + /// @notice The Passage contract for the Gouda host chain. + Passage constant HOST_PASSAGE = Passage(payable(0x57348c54e3F89097579dFcD4F5d2700ca2EB1906)); + + /// @notice The HostOrders contract for the Gouda host chain. + HostOrders constant HOST_ORDERS = HostOrders(0x5C5cd1F1c35227b14F6A94c6e05347403F4C963E); + + /// USDC token for the Gouda host chain. + address constant HOST_USDC = 0x6A27cc6968b1d08cd04a656075cc25905156827E; + /// USDT token for the Gouda host chain. + address constant HOST_USDT = 0x3Aad2B8D721bB2F7F79356515D15AAd3F8d6a32d; + /// WBTC token for the Gouda host chain. + address constant HOST_WBTC = 0x260fDcb6e6e2c1C5f96647ee0FaE34E7E92e6f28; + /// WETH token for the Gouda host chain. + address constant HOST_WETH = 0xD1278f17e86071f1E658B656084c65b7FD3c90eF; +} diff --git a/src/l2/Signet.sol b/src/l2/Signet.sol index 9897d53..cf3db15 100644 --- a/src/l2/Signet.sol +++ b/src/l2/Signet.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.13; import {RollupOrders} from "zenith/src/orders/RollupOrders.sol"; import {RollupConstants} from "../chains/L2.sol"; +import {GoudaConstants} from "../chains/Gouda.sol"; import {ParmigianaConstants} from "../chains/Parmigiana.sol"; import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol"; @@ -43,6 +44,15 @@ contract SignetL2 is RollupConstants { HOST_USDT = ParmigianaConstants.HOST_USDT; HOST_WBTC = ParmigianaConstants.HOST_WBTC; HOST_WETH = ParmigianaConstants.HOST_WETH; + } else if (block.chainid == GoudaConstants.ROLLUP_CHAIN_ID) { + HOST_CHAIN_ID = GoudaConstants.HOST_CHAIN_ID; + + HOST_PASSAGE = address(GoudaConstants.HOST_PASSAGE); + + HOST_USDC = GoudaConstants.HOST_USDC; + HOST_USDT = GoudaConstants.HOST_USDT; + HOST_WBTC = GoudaConstants.HOST_WBTC; + HOST_WETH = GoudaConstants.HOST_WETH; } else { revert UnsupportedChain(block.chainid); }