Sitelet https://github.com/init4tech/signet-sol/commit/ea6cbe763f2e99cfcdd816b038de379bcd7d6547
Skip to content

Commit ea6cbe7

Browse files
authored
feat: add Gouda testnet support (#13)
## Summary - Adds \`chains/Gouda.sol\` with rollup chain ID 792669, deployed Passage/Orders addresses on the Gouda host (`0x57348c54e3F89097579dFcD4F5d2700ca2EB1906` / `0x5C5cd1F1c35227b14F6A94c6e05347403F4C963E`), and Gouda host token addresses. \`HOST_CHAIN_ID\` matches Parmigiana's (3151908) — Gouda runs on the Parmigiana host chain. - Adds a Gouda \`else if\` branch in \`SignetL2\`'s constructor, mirroring the existing Parmigiana pattern, so contracts inheriting \`Flash\`/\`PayMe\`/etc compile and deploy on Gouda. ## Test plan - [x] \`forge build\` clean - [x] \`FlashProbe\` (from signet-e2e/contracts) deploys to Gouda RU at \`0x28436307Eb88e4b571EbD866435dFC634CD345C9\` against this branch — previously reverted with \`UnsupportedChain(792669)\`. ## Related - init4tech/signet-sdk#236 (adds \`signet_constants::gouda\`) - init4tech/node-components#144 (adds gouda.genesis.json) - init4tech/bin-base#149 (KnownChains::Gouda) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent a13f759 commit ea6cbe7

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

‎src/chains/Gouda.sol‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
7+
/// @title GoudaConstants
8+
/// @author init4
9+
/// @notice Constants for the Gouda testnet.
10+
/// @dev Gouda runs on the Parmigiana host chain, so HOST_CHAIN_ID matches
11+
/// Parmigiana's. Rollup chain ID and on-host contract deployments are
12+
/// gouda-specific. Used by `SignetL2` when block.chainid == ROLLUP_CHAIN_ID.
13+
library GoudaConstants {
14+
/// @notice The Gouda host chain ID (shared with Parmigiana).
15+
uint32 constant HOST_CHAIN_ID = 3151908;
16+
/// @notice The Gouda Rollup chain ID.
17+
uint32 constant ROLLUP_CHAIN_ID = 792669;
18+
19+
/// @notice The Passage contract for the Gouda host chain.
20+
Passage constant HOST_PASSAGE = Passage(payable(0x57348c54e3F89097579dFcD4F5d2700ca2EB1906));
21+
22+
/// @notice The HostOrders contract for the Gouda host chain.
23+
HostOrders constant HOST_ORDERS = HostOrders(0x5C5cd1F1c35227b14F6A94c6e05347403F4C963E);
24+
25+
/// USDC token for the Gouda host chain.
26+
address constant HOST_USDC = 0x6A27cc6968b1d08cd04a656075cc25905156827E;
27+
/// USDT token for the Gouda host chain.
28+
address constant HOST_USDT = 0x3Aad2B8D721bB2F7F79356515D15AAd3F8d6a32d;
29+
/// WBTC token for the Gouda host chain.
30+
address constant HOST_WBTC = 0x260fDcb6e6e2c1C5f96647ee0FaE34E7E92e6f28;
31+
/// WETH token for the Gouda host chain.
32+
address constant HOST_WETH = 0xD1278f17e86071f1E658B656084c65b7FD3c90eF;
33+
}

‎src/l2/Signet.sol‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pragma solidity ^0.8.13;
44
import {RollupOrders} from "zenith/src/orders/RollupOrders.sol";
55

66
import {RollupConstants} from "../chains/L2.sol";
7+
import {GoudaConstants} from "../chains/Gouda.sol";
78
import {ParmigianaConstants} from "../chains/Parmigiana.sol";
89
import {AddressAliasHelper} from "../vendor/AddressAliasHelper.sol";
910

@@ -43,6 +44,15 @@ contract SignetL2 is RollupConstants {
4344
HOST_USDT = ParmigianaConstants.HOST_USDT;
4445
HOST_WBTC = ParmigianaConstants.HOST_WBTC;
4546
HOST_WETH = ParmigianaConstants.HOST_WETH;
47+
} else if (block.chainid == GoudaConstants.ROLLUP_CHAIN_ID) {
48+
HOST_CHAIN_ID = GoudaConstants.HOST_CHAIN_ID;
49+
50+
HOST_PASSAGE = address(GoudaConstants.HOST_PASSAGE);
51+
52+
HOST_USDC = GoudaConstants.HOST_USDC;
53+
HOST_USDT = GoudaConstants.HOST_USDT;
54+
HOST_WBTC = GoudaConstants.HOST_WBTC;
55+
HOST_WETH = GoudaConstants.HOST_WETH;
4656
} else {
4757
revert UnsupportedChain(block.chainid);
4858
}

0 commit comments

Comments
 (0)