@rhinestone/shared-configs 2.17.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/chains.json +8 -1
- package/dist/scripts/__tests__/validation.test.js +2 -26
- package/dist/scripts/validation.js +1 -7
- package/dist/src/__tests__/solanaDevnet.test.js +29 -3
- package/dist/src/chains.js +8 -1
- package/dist/src/generated/packageVersion.d.ts +1 -1
- package/dist/src/generated/packageVersion.js +1 -1
- package/package.json +1 -1
package/dist/configs/chains.json
CHANGED
|
@@ -3219,7 +3219,14 @@
|
|
|
3219
3219
|
"zerion": null
|
|
3220
3220
|
},
|
|
3221
3221
|
"sessionCapable": false,
|
|
3222
|
-
"
|
|
3222
|
+
"settlementConfig": {
|
|
3223
|
+
"cctp": {
|
|
3224
|
+
"domain": 5
|
|
3225
|
+
}
|
|
3226
|
+
},
|
|
3227
|
+
"settlementLayers": [
|
|
3228
|
+
"CCTP"
|
|
3229
|
+
],
|
|
3223
3230
|
"stack": "vanilla",
|
|
3224
3231
|
"swapQuoters": [],
|
|
3225
3232
|
"tokens": [
|
|
@@ -344,30 +344,7 @@ function errorsFor(chain) {
|
|
|
344
344
|
(0, bun_test_1.expect)(result.issues[0].message).toContain("no settlement layers");
|
|
345
345
|
(0, bun_test_1.expect)(result.hasErrors).toBe(true);
|
|
346
346
|
});
|
|
347
|
-
(0, bun_test_1.it)("
|
|
348
|
-
const devnet = validChain({
|
|
349
|
-
name: "Solana Devnet",
|
|
350
|
-
vmType: "svm",
|
|
351
|
-
network: "testnet",
|
|
352
|
-
caip2: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
|
|
353
|
-
settlementLayers: [],
|
|
354
|
-
providerIds: { alchemy: null, zerion: null },
|
|
355
|
-
sessionCapable: false,
|
|
356
|
-
});
|
|
357
|
-
(0, bun_test_1.expect)((0, validation_1.validateChainConfig)({ "792703810": devnet }).issues).toEqual([]);
|
|
358
|
-
for (const [chainId, overrides] of [
|
|
359
|
-
["792703811", {}],
|
|
360
|
-
["792703810", { caip2: "solana:wrong" }],
|
|
361
|
-
["792703810", { network: "mainnet" }],
|
|
362
|
-
["792703810", { vmType: "evm" }],
|
|
363
|
-
]) {
|
|
364
|
-
const result = (0, validation_1.validateChainConfig)({
|
|
365
|
-
[chainId]: { ...devnet, ...overrides },
|
|
366
|
-
});
|
|
367
|
-
(0, bun_test_1.expect)(result.issues.some((issue) => issue.message.includes("no settlement layers"))).toBe(true);
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
(0, bun_test_1.it)("still reports structural errors on the exempt Devnet entry", () => {
|
|
347
|
+
(0, bun_test_1.it)("has no per-chain exemption from the zero-settlement-layer rule", () => {
|
|
371
348
|
const result = (0, validation_1.validateChainConfig)({
|
|
372
349
|
"792703810": validChain({
|
|
373
350
|
name: "Solana Devnet",
|
|
@@ -375,10 +352,9 @@ function errorsFor(chain) {
|
|
|
375
352
|
network: "testnet",
|
|
376
353
|
caip2: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
|
|
377
354
|
settlementLayers: [],
|
|
378
|
-
tokens: {},
|
|
379
355
|
}),
|
|
380
356
|
});
|
|
381
|
-
(0, bun_test_1.expect)(result.issues.some((issue) => issue.message
|
|
357
|
+
(0, bun_test_1.expect)(result.issues.some((issue) => issue.message.includes("no settlement layers"))).toBe(true);
|
|
382
358
|
(0, bun_test_1.expect)(result.hasErrors).toBe(true);
|
|
383
359
|
});
|
|
384
360
|
(0, bun_test_1.it)("returns warning for chain with single settlement layer", () => {
|
|
@@ -1119,13 +1119,7 @@ function validateChainConfig(chains) {
|
|
|
1119
1119
|
// Already reported structurally; skip the reachability checks below.
|
|
1120
1120
|
continue;
|
|
1121
1121
|
}
|
|
1122
|
-
|
|
1123
|
-
chain.caip2 === 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1' &&
|
|
1124
|
-
chain.vmType === 'svm' &&
|
|
1125
|
-
chain.network === 'testnet' &&
|
|
1126
|
-
!chain.virtual;
|
|
1127
|
-
// Devnet exists for same-chain execution only; it has no bridge route by design.
|
|
1128
|
-
if (layers.length === 0 && !isSameChainOnlySolanaDevnet) {
|
|
1122
|
+
if (layers.length === 0) {
|
|
1129
1123
|
issues.push({
|
|
1130
1124
|
severity: 'error',
|
|
1131
1125
|
chainId,
|
|
@@ -7,6 +7,10 @@ const DEVNET_ID = 792_703_810;
|
|
|
7
7
|
const NATIVE_SOL = '11111111111111111111111111111111';
|
|
8
8
|
const WRAPPED_SOL = 'So11111111111111111111111111111111111111112';
|
|
9
9
|
const DEVNET_USDC = '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU';
|
|
10
|
+
const BASE_SEPOLIA_ID = 84_532;
|
|
11
|
+
const BASE_SEPOLIA_USDC = '0x036CbD53842c5426634e7929541eC2318f3dCF7e';
|
|
12
|
+
const BASE_ID = 8453;
|
|
13
|
+
const SOLANA_ID = 792_703_809;
|
|
10
14
|
(0, bun_test_1.describe)('Solana Devnet registry', () => {
|
|
11
15
|
(0, bun_test_1.it)('publishes the exact testnet identity without a viem chain', () => {
|
|
12
16
|
(0, bun_test_1.expect)(index_1.TestnetNetwork.SOLANA_DEVNET).toBe(DEVNET_ID);
|
|
@@ -67,12 +71,14 @@ const DEVNET_USDC = '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU';
|
|
|
67
71
|
},
|
|
68
72
|
]);
|
|
69
73
|
});
|
|
70
|
-
(0, bun_test_1.it)('
|
|
74
|
+
(0, bun_test_1.it)('advertises CCTP coverage and nothing else', () => {
|
|
71
75
|
const entry = index_1.chainRegistry[String(DEVNET_ID)];
|
|
72
|
-
(0, bun_test_1.expect)(entry.settlementLayers).toEqual([]);
|
|
76
|
+
(0, bun_test_1.expect)(entry.settlementLayers).toEqual(['CCTP']);
|
|
73
77
|
(0, bun_test_1.expect)(entry.swapQuoters).toEqual([]);
|
|
74
|
-
(0, bun_test_1.expect)(entry.settlementConfig).
|
|
78
|
+
(0, bun_test_1.expect)(entry.settlementConfig).toEqual({ cctp: { domain: 5 } });
|
|
75
79
|
(0, bun_test_1.expect)(entry.paymentTokens).toBeUndefined();
|
|
80
|
+
// Token-level CCTP coverage is authored registry-wide in a later pass;
|
|
81
|
+
// absent here means "no opinion", not "routes nothing".
|
|
76
82
|
(0, bun_test_1.expect)(entry.tokens.every((token) => token.settlementLayers === undefined)).toBe(true);
|
|
77
83
|
(0, bun_test_1.expect)(oft_1.OFT_PROGRAM_IDS[DEVNET_ID]).toBeUndefined();
|
|
78
84
|
for (const config of Object.values(oft_1.OFT_REGISTRY)) {
|
|
@@ -83,4 +89,24 @@ const DEVNET_USDC = '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU';
|
|
|
83
89
|
(0, bun_test_1.expect)((0, index_1.canBeOrigin)(DEVNET_ID)).toBe(true);
|
|
84
90
|
(0, bun_test_1.expect)((0, index_1.canBeDestination)(DEVNET_ID)).toBe(true);
|
|
85
91
|
});
|
|
92
|
+
(0, bun_test_1.it)('pairs with Base Sepolia over CCTP on Circle test USDC', () => {
|
|
93
|
+
const baseSepolia = index_1.chainRegistry[String(BASE_SEPOLIA_ID)];
|
|
94
|
+
const devnet = index_1.chainRegistry[String(DEVNET_ID)];
|
|
95
|
+
(0, bun_test_1.expect)(baseSepolia.settlementLayers).toContain('CCTP');
|
|
96
|
+
(0, bun_test_1.expect)(baseSepolia.settlementConfig?.cctp).toEqual({ domain: 6 });
|
|
97
|
+
(0, bun_test_1.expect)(baseSepolia.tokens.some((token) => token.symbol === 'USDC' && token.address === BASE_SEPOLIA_USDC)).toBe(true);
|
|
98
|
+
(0, bun_test_1.expect)(devnet.tokens.some((token) => token.symbol === 'USDC' && token.address === DEVNET_USDC)).toBe(true);
|
|
99
|
+
// Circle assigns domains per blockchain, not per network, so a testnet
|
|
100
|
+
// domain equals its mainnet counterpart and `network` is the only
|
|
101
|
+
// discriminator between the two environments.
|
|
102
|
+
// https://developers.circle.com/cctp/concepts/supported-chains-and-domains
|
|
103
|
+
(0, bun_test_1.expect)(baseSepolia.network).toBe('testnet');
|
|
104
|
+
(0, bun_test_1.expect)(devnet.network).toBe('testnet');
|
|
105
|
+
(0, bun_test_1.expect)(index_1.chainRegistry[String(BASE_ID)].settlementConfig?.cctp).toEqual({
|
|
106
|
+
domain: 6,
|
|
107
|
+
});
|
|
108
|
+
(0, bun_test_1.expect)(index_1.chainRegistry[String(SOLANA_ID)].settlementConfig?.cctp).toEqual({
|
|
109
|
+
domain: 5,
|
|
110
|
+
});
|
|
111
|
+
});
|
|
86
112
|
});
|
package/dist/src/chains.js
CHANGED
|
@@ -3323,7 +3323,14 @@ const chains = {
|
|
|
3323
3323
|
"zerion": null
|
|
3324
3324
|
},
|
|
3325
3325
|
"sessionCapable": false,
|
|
3326
|
-
"
|
|
3326
|
+
"settlementConfig": {
|
|
3327
|
+
"cctp": {
|
|
3328
|
+
"domain": 5
|
|
3329
|
+
}
|
|
3330
|
+
},
|
|
3331
|
+
"settlementLayers": [
|
|
3332
|
+
"CCTP"
|
|
3333
|
+
],
|
|
3327
3334
|
"stack": "vanilla",
|
|
3328
3335
|
"swapQuoters": [],
|
|
3329
3336
|
"tokens": [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const PACKAGE_VERSION = "2.
|
|
1
|
+
declare const PACKAGE_VERSION = "2.18.0";
|
|
2
2
|
export { PACKAGE_VERSION };
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PACKAGE_VERSION = void 0;
|
|
4
4
|
// Auto-generated by scripts/generate.ts. Do not edit manually.
|
|
5
|
-
const PACKAGE_VERSION = "2.
|
|
5
|
+
const PACKAGE_VERSION = "2.18.0";
|
|
6
6
|
exports.PACKAGE_VERSION = PACKAGE_VERSION;
|