@circle-fin/bridge-kit 1.5.0 → 1.6.1
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/CHANGELOG.md +34 -0
- package/QUICKSTART.md +6 -6
- package/README.md +110 -13
- package/chains.cjs +544 -4
- package/chains.d.ts +205 -4
- package/chains.mjs +544 -4
- package/index.cjs +4578 -1649
- package/index.d.ts +5112 -2352
- package/index.mjs +4533 -1654
- package/package.json +4 -3
package/chains.mjs
CHANGED
|
@@ -93,6 +93,122 @@ var Blockchain;
|
|
|
93
93
|
Blockchain["ZKSync_Era"] = "ZKSync_Era";
|
|
94
94
|
Blockchain["ZKSync_Sepolia"] = "ZKSync_Sepolia";
|
|
95
95
|
})(Blockchain || (Blockchain = {}));
|
|
96
|
+
/**
|
|
97
|
+
* Enum representing the subset of {@link Blockchain} that supports swap operations.
|
|
98
|
+
*
|
|
99
|
+
* This enum provides compile-time type safety for swap chain selection,
|
|
100
|
+
* ensuring only supported chains are available in IDE autocomplete
|
|
101
|
+
* when building swap parameters.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* Unlike the full {@link Blockchain} enum, SwapChain only includes networks
|
|
105
|
+
* where the swap functionality is actively supported by the library.
|
|
106
|
+
* Using this enum prevents runtime errors from attempting unsupported
|
|
107
|
+
* cross-chain swaps.
|
|
108
|
+
*
|
|
109
|
+
* Currently supports:
|
|
110
|
+
* - Ethereum mainnet
|
|
111
|
+
* - Base mainnet
|
|
112
|
+
* - Polygon mainnet
|
|
113
|
+
* - Solana mainnet
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* import { SwapChain, swap, createSwapKitContext } from '@circle-fin/swap-kit'
|
|
118
|
+
* import { createViemAdapterFromPrivateKey } from '@circle-fin/adapter-viem-v2'
|
|
119
|
+
*
|
|
120
|
+
* const context = createSwapKitContext()
|
|
121
|
+
* const adapter = createViemAdapterFromPrivateKey({
|
|
122
|
+
* privateKey: process.env.PRIVATE_KEY
|
|
123
|
+
* })
|
|
124
|
+
*
|
|
125
|
+
* // ✅ Autocomplete shows only swap-supported chains
|
|
126
|
+
* const result = await swap(context, {
|
|
127
|
+
* from: {
|
|
128
|
+
* adapter,
|
|
129
|
+
* chain: SwapChain.Ethereum // Autocomplete: Ethereum, Base, Polygon, Solana
|
|
130
|
+
* },
|
|
131
|
+
* tokenIn: 'USDC',
|
|
132
|
+
* tokenOut: 'USDT',
|
|
133
|
+
* amount: '100.0'
|
|
134
|
+
* })
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* // String literals also work (constrained to SwapChain values)
|
|
140
|
+
* const result = await swap(context, {
|
|
141
|
+
* from: {
|
|
142
|
+
* adapter,
|
|
143
|
+
* chain: 'Ethereum' // ✅ Only SwapChain strings allowed
|
|
144
|
+
* },
|
|
145
|
+
* tokenIn: 'USDC',
|
|
146
|
+
* tokenOut: 'NATIVE',
|
|
147
|
+
* amount: '50.0'
|
|
148
|
+
* })
|
|
149
|
+
*
|
|
150
|
+
* // ❌ TypeScript error - Sui not in SwapChain enum
|
|
151
|
+
* const invalidResult = await swap(context, {
|
|
152
|
+
* from: {
|
|
153
|
+
* adapter,
|
|
154
|
+
* chain: 'Sui' // Compile-time error!
|
|
155
|
+
* },
|
|
156
|
+
* tokenIn: 'USDC',
|
|
157
|
+
* tokenOut: 'USDT',
|
|
158
|
+
* amount: '100.0'
|
|
159
|
+
* })
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
/**
|
|
163
|
+
* Enum representing chains that support same-chain swaps through the Swap Kit.
|
|
164
|
+
*
|
|
165
|
+
* Unlike the full {@link Blockchain} enum, SwapChain includes only mainnet
|
|
166
|
+
* networks where adapter contracts are deployed (CCTPv2 support).
|
|
167
|
+
*
|
|
168
|
+
* Dynamic validation via {@link isSwapSupportedChain} ensures chains
|
|
169
|
+
* automatically work when adapter contracts and supported tokens are deployed.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* import { SwapChain } from '@core/chains'
|
|
174
|
+
* import { swap } from '@circle-fin/swap-kit'
|
|
175
|
+
*
|
|
176
|
+
* const result = await swap(context, {
|
|
177
|
+
* from: {
|
|
178
|
+
* adapter,
|
|
179
|
+
* chain: SwapChain.Arbitrum // Now supported!
|
|
180
|
+
* },
|
|
181
|
+
* tokenIn: 'USDC',
|
|
182
|
+
* tokenOut: 'WETH',
|
|
183
|
+
* amount: '100.0'
|
|
184
|
+
* })
|
|
185
|
+
* ```
|
|
186
|
+
*
|
|
187
|
+
* @see {@link isSwapSupportedChain} for runtime validation
|
|
188
|
+
* @see {@link getSwapSupportedChains} for all supported chains
|
|
189
|
+
*/
|
|
190
|
+
var SwapChain;
|
|
191
|
+
(function (SwapChain) {
|
|
192
|
+
// Original 4 chains
|
|
193
|
+
SwapChain["Ethereum"] = "Ethereum";
|
|
194
|
+
SwapChain["Base"] = "Base";
|
|
195
|
+
SwapChain["Polygon"] = "Polygon";
|
|
196
|
+
SwapChain["Solana"] = "Solana";
|
|
197
|
+
// Additional supported chains
|
|
198
|
+
SwapChain["Arbitrum"] = "Arbitrum";
|
|
199
|
+
SwapChain["Optimism"] = "Optimism";
|
|
200
|
+
SwapChain["Avalanche"] = "Avalanche";
|
|
201
|
+
SwapChain["Linea"] = "Linea";
|
|
202
|
+
SwapChain["Ink"] = "Ink";
|
|
203
|
+
SwapChain["World_Chain"] = "World_Chain";
|
|
204
|
+
SwapChain["Unichain"] = "Unichain";
|
|
205
|
+
SwapChain["Plume"] = "Plume";
|
|
206
|
+
SwapChain["Sei"] = "Sei";
|
|
207
|
+
SwapChain["Sonic"] = "Sonic";
|
|
208
|
+
SwapChain["XDC"] = "XDC";
|
|
209
|
+
SwapChain["HyperEVM"] = "HyperEVM";
|
|
210
|
+
SwapChain["Monad"] = "Monad";
|
|
211
|
+
})(SwapChain || (SwapChain = {}));
|
|
96
212
|
// -----------------------------------------------------------------------------
|
|
97
213
|
// Bridge Chain Enum (CCTPv2 Supported Chains)
|
|
98
214
|
// -----------------------------------------------------------------------------
|
|
@@ -244,6 +360,7 @@ defineChain({
|
|
|
244
360
|
rpcEndpoints: ['https://mainnet-api.algonode.cloud'],
|
|
245
361
|
eurcAddress: null,
|
|
246
362
|
usdcAddress: '31566704',
|
|
363
|
+
usdtAddress: null,
|
|
247
364
|
cctp: null,
|
|
248
365
|
});
|
|
249
366
|
|
|
@@ -267,6 +384,7 @@ defineChain({
|
|
|
267
384
|
rpcEndpoints: ['https://testnet-api.algonode.cloud'],
|
|
268
385
|
eurcAddress: null,
|
|
269
386
|
usdcAddress: '10458941',
|
|
387
|
+
usdtAddress: null,
|
|
270
388
|
cctp: null,
|
|
271
389
|
});
|
|
272
390
|
|
|
@@ -290,6 +408,7 @@ defineChain({
|
|
|
290
408
|
rpcEndpoints: ['https://fullnode.mainnet.aptoslabs.com/v1'],
|
|
291
409
|
eurcAddress: null,
|
|
292
410
|
usdcAddress: '0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b',
|
|
411
|
+
usdtAddress: '0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b',
|
|
293
412
|
cctp: {
|
|
294
413
|
domain: 9,
|
|
295
414
|
contracts: {
|
|
@@ -300,6 +419,10 @@ defineChain({
|
|
|
300
419
|
confirmations: 1,
|
|
301
420
|
},
|
|
302
421
|
},
|
|
422
|
+
forwarderSupported: {
|
|
423
|
+
source: false,
|
|
424
|
+
destination: false,
|
|
425
|
+
},
|
|
303
426
|
},
|
|
304
427
|
});
|
|
305
428
|
|
|
@@ -323,6 +446,7 @@ defineChain({
|
|
|
323
446
|
rpcEndpoints: ['https://fullnode.testnet.aptoslabs.com/v1'],
|
|
324
447
|
eurcAddress: null,
|
|
325
448
|
usdcAddress: '0x69091fbab5f7d635ee7ac5098cf0c1efbe31d68fec0f2cd565e8d168daf52832',
|
|
449
|
+
usdtAddress: null,
|
|
326
450
|
cctp: {
|
|
327
451
|
domain: 9,
|
|
328
452
|
contracts: {
|
|
@@ -333,9 +457,128 @@ defineChain({
|
|
|
333
457
|
confirmations: 1,
|
|
334
458
|
},
|
|
335
459
|
},
|
|
460
|
+
forwarderSupported: {
|
|
461
|
+
source: false,
|
|
462
|
+
destination: false,
|
|
463
|
+
},
|
|
336
464
|
},
|
|
337
465
|
});
|
|
338
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Complete swap token registry - single source of truth for all swap-supported tokens.
|
|
469
|
+
*
|
|
470
|
+
* @remarks
|
|
471
|
+
* All packages should import from this registry for swap operations.
|
|
472
|
+
* Adding a new swap token requires updating only this registry.
|
|
473
|
+
*
|
|
474
|
+
* The NATIVE token is handled separately as it resolves dynamically based on chain.
|
|
475
|
+
*
|
|
476
|
+
* @example
|
|
477
|
+
* ```typescript
|
|
478
|
+
* import { SWAP_TOKEN_REGISTRY } from '@core/chains'
|
|
479
|
+
*
|
|
480
|
+
* // Get token decimals
|
|
481
|
+
* const decimals = SWAP_TOKEN_REGISTRY.USDC.decimals // 6
|
|
482
|
+
*
|
|
483
|
+
* // Check if token is stablecoin
|
|
484
|
+
* const isStable = SWAP_TOKEN_REGISTRY.DAI.category === 'stablecoin' // true
|
|
485
|
+
* ```
|
|
486
|
+
*/
|
|
487
|
+
const SWAP_TOKEN_REGISTRY = {
|
|
488
|
+
// ============================================================================
|
|
489
|
+
// Stablecoins (6 decimals)
|
|
490
|
+
// ============================================================================
|
|
491
|
+
USDC: {
|
|
492
|
+
symbol: 'USDC',
|
|
493
|
+
decimals: 6,
|
|
494
|
+
category: 'stablecoin',
|
|
495
|
+
description: 'USD Coin',
|
|
496
|
+
},
|
|
497
|
+
EURC: {
|
|
498
|
+
symbol: 'EURC',
|
|
499
|
+
decimals: 6,
|
|
500
|
+
category: 'stablecoin',
|
|
501
|
+
description: 'Euro Coin',
|
|
502
|
+
},
|
|
503
|
+
USDT: {
|
|
504
|
+
symbol: 'USDT',
|
|
505
|
+
decimals: 6,
|
|
506
|
+
category: 'stablecoin',
|
|
507
|
+
description: 'Tether USD',
|
|
508
|
+
},
|
|
509
|
+
PYUSD: {
|
|
510
|
+
symbol: 'PYUSD',
|
|
511
|
+
decimals: 6,
|
|
512
|
+
category: 'stablecoin',
|
|
513
|
+
description: 'PayPal USD',
|
|
514
|
+
},
|
|
515
|
+
// ============================================================================
|
|
516
|
+
// Stablecoins (18 decimals)
|
|
517
|
+
// ============================================================================
|
|
518
|
+
DAI: {
|
|
519
|
+
symbol: 'DAI',
|
|
520
|
+
decimals: 18,
|
|
521
|
+
category: 'stablecoin',
|
|
522
|
+
description: 'MakerDAO stablecoin',
|
|
523
|
+
},
|
|
524
|
+
USDE: {
|
|
525
|
+
symbol: 'USDE',
|
|
526
|
+
decimals: 18,
|
|
527
|
+
category: 'stablecoin',
|
|
528
|
+
description: 'Ethena USD (synthetic dollar)',
|
|
529
|
+
},
|
|
530
|
+
// ============================================================================
|
|
531
|
+
// Wrapped Tokens
|
|
532
|
+
// ============================================================================
|
|
533
|
+
WBTC: {
|
|
534
|
+
symbol: 'WBTC',
|
|
535
|
+
decimals: 8,
|
|
536
|
+
category: 'wrapped',
|
|
537
|
+
description: 'Wrapped Bitcoin',
|
|
538
|
+
},
|
|
539
|
+
WETH: {
|
|
540
|
+
symbol: 'WETH',
|
|
541
|
+
decimals: 18,
|
|
542
|
+
category: 'wrapped',
|
|
543
|
+
description: 'Wrapped Ethereum',
|
|
544
|
+
},
|
|
545
|
+
WSOL: {
|
|
546
|
+
symbol: 'WSOL',
|
|
547
|
+
decimals: 9,
|
|
548
|
+
category: 'wrapped',
|
|
549
|
+
description: 'Wrapped Solana',
|
|
550
|
+
},
|
|
551
|
+
WAVAX: {
|
|
552
|
+
symbol: 'WAVAX',
|
|
553
|
+
decimals: 18,
|
|
554
|
+
category: 'wrapped',
|
|
555
|
+
description: 'Wrapped Avalanche',
|
|
556
|
+
},
|
|
557
|
+
WPOL: {
|
|
558
|
+
symbol: 'WPOL',
|
|
559
|
+
decimals: 18,
|
|
560
|
+
category: 'wrapped',
|
|
561
|
+
description: 'Wrapped Polygon',
|
|
562
|
+
},
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* Special NATIVE token constant for swap operations.
|
|
566
|
+
*
|
|
567
|
+
* @remarks
|
|
568
|
+
* NATIVE is handled separately from SWAP_TOKEN_REGISTRY because it resolves
|
|
569
|
+
* dynamically based on the chain (ETH on Ethereum, SOL on Solana, etc.).
|
|
570
|
+
* Its decimals are chain-specific.
|
|
571
|
+
*/
|
|
572
|
+
const NATIVE_TOKEN = 'NATIVE';
|
|
573
|
+
/**
|
|
574
|
+
* Array of all supported swap token symbols including NATIVE.
|
|
575
|
+
* Useful for iteration, validation, and filtering.
|
|
576
|
+
*/
|
|
577
|
+
[
|
|
578
|
+
...Object.keys(SWAP_TOKEN_REGISTRY),
|
|
579
|
+
NATIVE_TOKEN,
|
|
580
|
+
];
|
|
581
|
+
|
|
339
582
|
/**
|
|
340
583
|
* The bridge contract address for EVM testnet networks.
|
|
341
584
|
*
|
|
@@ -352,6 +595,13 @@ const BRIDGE_CONTRACT_EVM_TESTNET = '0xC5567a5E3370d4DBfB0540025078e283e36A363d'
|
|
|
352
595
|
* USDC transfers on live networks.
|
|
353
596
|
*/
|
|
354
597
|
const BRIDGE_CONTRACT_EVM_MAINNET = '0xB3FA262d0fB521cc93bE83d87b322b8A23DAf3F0';
|
|
598
|
+
/**
|
|
599
|
+
* The adapter contract address for EVM mainnet networks.
|
|
600
|
+
*
|
|
601
|
+
* This contract serves as an adapter for integrating with various protocols
|
|
602
|
+
* on EVM-compatible chains. Use this address for mainnet adapter integrations.
|
|
603
|
+
*/
|
|
604
|
+
const ADAPTER_CONTRACT_EVM_MAINNET = '0x7FB8c7260b63934d8da38aF902f87ae6e284a845';
|
|
355
605
|
|
|
356
606
|
/**
|
|
357
607
|
* Arc Testnet chain definition
|
|
@@ -381,6 +631,7 @@ const ArcTestnet = defineChain({
|
|
|
381
631
|
rpcEndpoints: ['https://rpc.testnet.arc.network/'],
|
|
382
632
|
eurcAddress: '0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a',
|
|
383
633
|
usdcAddress: '0x3600000000000000000000000000000000000000',
|
|
634
|
+
usdtAddress: null,
|
|
384
635
|
cctp: {
|
|
385
636
|
domain: 26,
|
|
386
637
|
contracts: {
|
|
@@ -392,6 +643,10 @@ const ArcTestnet = defineChain({
|
|
|
392
643
|
fastConfirmations: 1,
|
|
393
644
|
},
|
|
394
645
|
},
|
|
646
|
+
forwarderSupported: {
|
|
647
|
+
source: true,
|
|
648
|
+
destination: true,
|
|
649
|
+
},
|
|
395
650
|
},
|
|
396
651
|
kitContracts: {
|
|
397
652
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -419,6 +674,7 @@ const Arbitrum = defineChain({
|
|
|
419
674
|
rpcEndpoints: ['https://arb1.arbitrum.io/rpc'],
|
|
420
675
|
eurcAddress: null,
|
|
421
676
|
usdcAddress: '0xaf88d065e77c8cc2239327c5edb3a432268e5831',
|
|
677
|
+
usdtAddress: null,
|
|
422
678
|
cctp: {
|
|
423
679
|
domain: 3,
|
|
424
680
|
contracts: {
|
|
@@ -436,9 +692,14 @@ const Arbitrum = defineChain({
|
|
|
436
692
|
fastConfirmations: 1,
|
|
437
693
|
},
|
|
438
694
|
},
|
|
695
|
+
forwarderSupported: {
|
|
696
|
+
source: true,
|
|
697
|
+
destination: true,
|
|
698
|
+
},
|
|
439
699
|
},
|
|
440
700
|
kitContracts: {
|
|
441
701
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
702
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
442
703
|
},
|
|
443
704
|
});
|
|
444
705
|
|
|
@@ -463,6 +724,7 @@ const ArbitrumSepolia = defineChain({
|
|
|
463
724
|
rpcEndpoints: ['https://sepolia-rollup.arbitrum.io/rpc'],
|
|
464
725
|
eurcAddress: null,
|
|
465
726
|
usdcAddress: '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d',
|
|
727
|
+
usdtAddress: null,
|
|
466
728
|
cctp: {
|
|
467
729
|
domain: 3,
|
|
468
730
|
contracts: {
|
|
@@ -480,6 +742,10 @@ const ArbitrumSepolia = defineChain({
|
|
|
480
742
|
fastConfirmations: 1,
|
|
481
743
|
},
|
|
482
744
|
},
|
|
745
|
+
forwarderSupported: {
|
|
746
|
+
source: true,
|
|
747
|
+
destination: true,
|
|
748
|
+
},
|
|
483
749
|
},
|
|
484
750
|
kitContracts: {
|
|
485
751
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -507,6 +773,7 @@ const Avalanche = defineChain({
|
|
|
507
773
|
rpcEndpoints: ['https://api.avax.network/ext/bc/C/rpc'],
|
|
508
774
|
eurcAddress: '0xc891eb4cbdeff6e073e859e987815ed1505c2acd',
|
|
509
775
|
usdcAddress: '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
|
|
776
|
+
usdtAddress: '0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7',
|
|
510
777
|
cctp: {
|
|
511
778
|
domain: 1,
|
|
512
779
|
contracts: {
|
|
@@ -524,9 +791,14 @@ const Avalanche = defineChain({
|
|
|
524
791
|
fastConfirmations: 1,
|
|
525
792
|
},
|
|
526
793
|
},
|
|
794
|
+
forwarderSupported: {
|
|
795
|
+
source: true,
|
|
796
|
+
destination: true,
|
|
797
|
+
},
|
|
527
798
|
},
|
|
528
799
|
kitContracts: {
|
|
529
800
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
801
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
530
802
|
},
|
|
531
803
|
});
|
|
532
804
|
|
|
@@ -550,6 +822,7 @@ const AvalancheFuji = defineChain({
|
|
|
550
822
|
explorerUrl: 'https://subnets-test.avax.network/c-chain/tx/{hash}',
|
|
551
823
|
eurcAddress: '0x5e44db7996c682e92a960b65ac713a54ad815c6b',
|
|
552
824
|
usdcAddress: '0x5425890298aed601595a70ab815c96711a31bc65',
|
|
825
|
+
usdtAddress: null,
|
|
553
826
|
cctp: {
|
|
554
827
|
domain: 1,
|
|
555
828
|
contracts: {
|
|
@@ -567,6 +840,10 @@ const AvalancheFuji = defineChain({
|
|
|
567
840
|
fastConfirmations: 1,
|
|
568
841
|
},
|
|
569
842
|
},
|
|
843
|
+
forwarderSupported: {
|
|
844
|
+
source: true,
|
|
845
|
+
destination: true,
|
|
846
|
+
},
|
|
570
847
|
},
|
|
571
848
|
rpcEndpoints: ['https://api.avax-test.network/ext/bc/C/rpc'],
|
|
572
849
|
kitContracts: {
|
|
@@ -595,6 +872,7 @@ const Base = defineChain({
|
|
|
595
872
|
rpcEndpoints: ['https://mainnet.base.org', 'https://base.publicnode.com'],
|
|
596
873
|
eurcAddress: '0x60a3e35cc302bfa44cb288bc5a4f316fdb1adb42',
|
|
597
874
|
usdcAddress: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
|
|
875
|
+
usdtAddress: null,
|
|
598
876
|
cctp: {
|
|
599
877
|
domain: 6,
|
|
600
878
|
contracts: {
|
|
@@ -612,9 +890,14 @@ const Base = defineChain({
|
|
|
612
890
|
fastConfirmations: 1,
|
|
613
891
|
},
|
|
614
892
|
},
|
|
893
|
+
forwarderSupported: {
|
|
894
|
+
source: true,
|
|
895
|
+
destination: true,
|
|
896
|
+
},
|
|
615
897
|
},
|
|
616
898
|
kitContracts: {
|
|
617
899
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
900
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
618
901
|
},
|
|
619
902
|
});
|
|
620
903
|
|
|
@@ -639,6 +922,7 @@ const BaseSepolia = defineChain({
|
|
|
639
922
|
rpcEndpoints: ['https://sepolia.base.org'],
|
|
640
923
|
eurcAddress: '0x808456652fdb597867f38412077A9182bf77359F',
|
|
641
924
|
usdcAddress: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',
|
|
925
|
+
usdtAddress: null,
|
|
642
926
|
cctp: {
|
|
643
927
|
domain: 6,
|
|
644
928
|
contracts: {
|
|
@@ -656,6 +940,10 @@ const BaseSepolia = defineChain({
|
|
|
656
940
|
fastConfirmations: 1,
|
|
657
941
|
},
|
|
658
942
|
},
|
|
943
|
+
forwarderSupported: {
|
|
944
|
+
source: true,
|
|
945
|
+
destination: true,
|
|
946
|
+
},
|
|
659
947
|
},
|
|
660
948
|
kitContracts: {
|
|
661
949
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -683,6 +971,7 @@ defineChain({
|
|
|
683
971
|
rpcEndpoints: ['https://forno.celo.org'],
|
|
684
972
|
eurcAddress: null,
|
|
685
973
|
usdcAddress: '0xcebA9300f2b948710d2653dD7B07f33A8B32118C',
|
|
974
|
+
usdtAddress: '0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e',
|
|
686
975
|
cctp: null,
|
|
687
976
|
});
|
|
688
977
|
|
|
@@ -707,6 +996,7 @@ defineChain({
|
|
|
707
996
|
rpcEndpoints: ['https://alfajores-forno.celo-testnet.org'],
|
|
708
997
|
eurcAddress: null,
|
|
709
998
|
usdcAddress: '0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B',
|
|
999
|
+
usdtAddress: null,
|
|
710
1000
|
cctp: null,
|
|
711
1001
|
});
|
|
712
1002
|
|
|
@@ -731,6 +1021,7 @@ const Codex = defineChain({
|
|
|
731
1021
|
rpcEndpoints: ['https://rpc.codex.xyz'],
|
|
732
1022
|
eurcAddress: null,
|
|
733
1023
|
usdcAddress: '0xd996633a415985DBd7D6D12f4A4343E31f5037cf',
|
|
1024
|
+
usdtAddress: null,
|
|
734
1025
|
cctp: {
|
|
735
1026
|
domain: 12,
|
|
736
1027
|
contracts: {
|
|
@@ -742,6 +1033,10 @@ const Codex = defineChain({
|
|
|
742
1033
|
fastConfirmations: 1,
|
|
743
1034
|
},
|
|
744
1035
|
},
|
|
1036
|
+
forwarderSupported: {
|
|
1037
|
+
source: true,
|
|
1038
|
+
destination: false,
|
|
1039
|
+
},
|
|
745
1040
|
},
|
|
746
1041
|
kitContracts: {
|
|
747
1042
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
@@ -769,6 +1064,7 @@ const CodexTestnet = defineChain({
|
|
|
769
1064
|
rpcEndpoints: ['https://rpc.codex-stg.xyz'],
|
|
770
1065
|
eurcAddress: null,
|
|
771
1066
|
usdcAddress: '0x6d7f141b6819C2c9CC2f818e6ad549E7Ca090F8f',
|
|
1067
|
+
usdtAddress: null,
|
|
772
1068
|
cctp: {
|
|
773
1069
|
domain: 12,
|
|
774
1070
|
contracts: {
|
|
@@ -780,6 +1076,10 @@ const CodexTestnet = defineChain({
|
|
|
780
1076
|
fastConfirmations: 1,
|
|
781
1077
|
},
|
|
782
1078
|
},
|
|
1079
|
+
forwarderSupported: {
|
|
1080
|
+
source: true,
|
|
1081
|
+
destination: false,
|
|
1082
|
+
},
|
|
783
1083
|
},
|
|
784
1084
|
kitContracts: {
|
|
785
1085
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -807,6 +1107,7 @@ const Ethereum = defineChain({
|
|
|
807
1107
|
rpcEndpoints: ['https://eth.merkle.io', 'https://ethereum.publicnode.com'],
|
|
808
1108
|
eurcAddress: '0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c',
|
|
809
1109
|
usdcAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
1110
|
+
usdtAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7',
|
|
810
1111
|
cctp: {
|
|
811
1112
|
domain: 0,
|
|
812
1113
|
contracts: {
|
|
@@ -824,9 +1125,14 @@ const Ethereum = defineChain({
|
|
|
824
1125
|
fastConfirmations: 2,
|
|
825
1126
|
},
|
|
826
1127
|
},
|
|
1128
|
+
forwarderSupported: {
|
|
1129
|
+
source: true,
|
|
1130
|
+
destination: true,
|
|
1131
|
+
},
|
|
827
1132
|
},
|
|
828
1133
|
kitContracts: {
|
|
829
1134
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1135
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
830
1136
|
},
|
|
831
1137
|
});
|
|
832
1138
|
|
|
@@ -851,6 +1157,7 @@ const EthereumSepolia = defineChain({
|
|
|
851
1157
|
rpcEndpoints: ['https://sepolia.drpc.org'],
|
|
852
1158
|
eurcAddress: '0x08210F9170F89Ab7658F0B5E3fF39b0E03C594D4',
|
|
853
1159
|
usdcAddress: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238',
|
|
1160
|
+
usdtAddress: null,
|
|
854
1161
|
cctp: {
|
|
855
1162
|
domain: 0,
|
|
856
1163
|
contracts: {
|
|
@@ -868,6 +1175,10 @@ const EthereumSepolia = defineChain({
|
|
|
868
1175
|
fastConfirmations: 2,
|
|
869
1176
|
},
|
|
870
1177
|
},
|
|
1178
|
+
forwarderSupported: {
|
|
1179
|
+
source: true,
|
|
1180
|
+
destination: true,
|
|
1181
|
+
},
|
|
871
1182
|
},
|
|
872
1183
|
kitContracts: {
|
|
873
1184
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -894,6 +1205,7 @@ defineChain({
|
|
|
894
1205
|
rpcEndpoints: ['https://mainnet.hashio.io/api'],
|
|
895
1206
|
eurcAddress: null,
|
|
896
1207
|
usdcAddress: '0.0.456858',
|
|
1208
|
+
usdtAddress: null,
|
|
897
1209
|
cctp: null,
|
|
898
1210
|
});
|
|
899
1211
|
|
|
@@ -917,6 +1229,7 @@ defineChain({
|
|
|
917
1229
|
rpcEndpoints: ['https://testnet.hashio.io/api'],
|
|
918
1230
|
eurcAddress: null,
|
|
919
1231
|
usdcAddress: '0.0.429274',
|
|
1232
|
+
usdtAddress: null,
|
|
920
1233
|
cctp: null,
|
|
921
1234
|
});
|
|
922
1235
|
|
|
@@ -943,6 +1256,7 @@ const HyperEVM = defineChain({
|
|
|
943
1256
|
rpcEndpoints: ['https://rpc.hyperliquid.xyz/evm'],
|
|
944
1257
|
eurcAddress: null,
|
|
945
1258
|
usdcAddress: '0xb88339CB7199b77E23DB6E890353E22632Ba630f',
|
|
1259
|
+
usdtAddress: null,
|
|
946
1260
|
cctp: {
|
|
947
1261
|
domain: 19,
|
|
948
1262
|
contracts: {
|
|
@@ -954,9 +1268,14 @@ const HyperEVM = defineChain({
|
|
|
954
1268
|
fastConfirmations: 1,
|
|
955
1269
|
},
|
|
956
1270
|
},
|
|
1271
|
+
forwarderSupported: {
|
|
1272
|
+
source: true,
|
|
1273
|
+
destination: true,
|
|
1274
|
+
},
|
|
957
1275
|
},
|
|
958
1276
|
kitContracts: {
|
|
959
1277
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1278
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
960
1279
|
},
|
|
961
1280
|
});
|
|
962
1281
|
|
|
@@ -982,6 +1301,7 @@ const HyperEVMTestnet = defineChain({
|
|
|
982
1301
|
rpcEndpoints: ['https://rpc.hyperliquid-testnet.xyz/evm'],
|
|
983
1302
|
eurcAddress: null,
|
|
984
1303
|
usdcAddress: '0x2B3370eE501B4a559b57D449569354196457D8Ab',
|
|
1304
|
+
usdtAddress: null,
|
|
985
1305
|
cctp: {
|
|
986
1306
|
domain: 19,
|
|
987
1307
|
contracts: {
|
|
@@ -993,6 +1313,10 @@ const HyperEVMTestnet = defineChain({
|
|
|
993
1313
|
fastConfirmations: 1,
|
|
994
1314
|
},
|
|
995
1315
|
},
|
|
1316
|
+
forwarderSupported: {
|
|
1317
|
+
source: true,
|
|
1318
|
+
destination: true,
|
|
1319
|
+
},
|
|
996
1320
|
},
|
|
997
1321
|
kitContracts: {
|
|
998
1322
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1025,6 +1349,7 @@ const Ink = defineChain({
|
|
|
1025
1349
|
],
|
|
1026
1350
|
eurcAddress: null,
|
|
1027
1351
|
usdcAddress: '0x2D270e6886d130D724215A266106e6832161EAEd',
|
|
1352
|
+
usdtAddress: null,
|
|
1028
1353
|
cctp: {
|
|
1029
1354
|
domain: 21,
|
|
1030
1355
|
contracts: {
|
|
@@ -1036,9 +1361,14 @@ const Ink = defineChain({
|
|
|
1036
1361
|
fastConfirmations: 1,
|
|
1037
1362
|
},
|
|
1038
1363
|
},
|
|
1364
|
+
forwarderSupported: {
|
|
1365
|
+
source: true,
|
|
1366
|
+
destination: true,
|
|
1367
|
+
},
|
|
1039
1368
|
},
|
|
1040
1369
|
kitContracts: {
|
|
1041
1370
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1371
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1042
1372
|
},
|
|
1043
1373
|
});
|
|
1044
1374
|
|
|
@@ -1067,6 +1397,7 @@ const InkTestnet = defineChain({
|
|
|
1067
1397
|
],
|
|
1068
1398
|
eurcAddress: null,
|
|
1069
1399
|
usdcAddress: '0xFabab97dCE620294D2B0b0e46C68964e326300Ac',
|
|
1400
|
+
usdtAddress: null,
|
|
1070
1401
|
cctp: {
|
|
1071
1402
|
domain: 21,
|
|
1072
1403
|
contracts: {
|
|
@@ -1078,6 +1409,10 @@ const InkTestnet = defineChain({
|
|
|
1078
1409
|
fastConfirmations: 1,
|
|
1079
1410
|
},
|
|
1080
1411
|
},
|
|
1412
|
+
forwarderSupported: {
|
|
1413
|
+
source: true,
|
|
1414
|
+
destination: true,
|
|
1415
|
+
},
|
|
1081
1416
|
},
|
|
1082
1417
|
kitContracts: {
|
|
1083
1418
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1105,6 +1440,7 @@ const Linea = defineChain({
|
|
|
1105
1440
|
rpcEndpoints: ['https://rpc.linea.build'],
|
|
1106
1441
|
eurcAddress: null,
|
|
1107
1442
|
usdcAddress: '0x176211869ca2b568f2a7d4ee941e073a821ee1ff',
|
|
1443
|
+
usdtAddress: null,
|
|
1108
1444
|
cctp: {
|
|
1109
1445
|
domain: 11,
|
|
1110
1446
|
contracts: {
|
|
@@ -1116,9 +1452,14 @@ const Linea = defineChain({
|
|
|
1116
1452
|
fastConfirmations: 1,
|
|
1117
1453
|
},
|
|
1118
1454
|
},
|
|
1455
|
+
forwarderSupported: {
|
|
1456
|
+
source: true,
|
|
1457
|
+
destination: true,
|
|
1458
|
+
},
|
|
1119
1459
|
},
|
|
1120
1460
|
kitContracts: {
|
|
1121
1461
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1462
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1122
1463
|
},
|
|
1123
1464
|
});
|
|
1124
1465
|
|
|
@@ -1143,6 +1484,7 @@ const LineaSepolia = defineChain({
|
|
|
1143
1484
|
rpcEndpoints: ['https://rpc.sepolia.linea.build'],
|
|
1144
1485
|
eurcAddress: null,
|
|
1145
1486
|
usdcAddress: '0xfece4462d57bd51a6a552365a011b95f0e16d9b7',
|
|
1487
|
+
usdtAddress: null,
|
|
1146
1488
|
cctp: {
|
|
1147
1489
|
domain: 11,
|
|
1148
1490
|
contracts: {
|
|
@@ -1154,6 +1496,10 @@ const LineaSepolia = defineChain({
|
|
|
1154
1496
|
fastConfirmations: 1,
|
|
1155
1497
|
},
|
|
1156
1498
|
},
|
|
1499
|
+
forwarderSupported: {
|
|
1500
|
+
source: true,
|
|
1501
|
+
destination: true,
|
|
1502
|
+
},
|
|
1157
1503
|
},
|
|
1158
1504
|
kitContracts: {
|
|
1159
1505
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1183,6 +1529,7 @@ const Monad = defineChain({
|
|
|
1183
1529
|
rpcEndpoints: ['https://rpc.monad.xyz'],
|
|
1184
1530
|
eurcAddress: null,
|
|
1185
1531
|
usdcAddress: '0x754704Bc059F8C67012fEd69BC8A327a5aafb603',
|
|
1532
|
+
usdtAddress: null,
|
|
1186
1533
|
cctp: {
|
|
1187
1534
|
domain: 15,
|
|
1188
1535
|
contracts: {
|
|
@@ -1194,9 +1541,14 @@ const Monad = defineChain({
|
|
|
1194
1541
|
fastConfirmations: 1,
|
|
1195
1542
|
},
|
|
1196
1543
|
},
|
|
1544
|
+
forwarderSupported: {
|
|
1545
|
+
source: true,
|
|
1546
|
+
destination: true,
|
|
1547
|
+
},
|
|
1197
1548
|
},
|
|
1198
1549
|
kitContracts: {
|
|
1199
1550
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1551
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1200
1552
|
},
|
|
1201
1553
|
});
|
|
1202
1554
|
|
|
@@ -1223,6 +1575,7 @@ const MonadTestnet = defineChain({
|
|
|
1223
1575
|
rpcEndpoints: ['https://testnet-rpc.monad.xyz'],
|
|
1224
1576
|
eurcAddress: null,
|
|
1225
1577
|
usdcAddress: '0x534b2f3A21130d7a60830c2Df862319e593943A3',
|
|
1578
|
+
usdtAddress: null,
|
|
1226
1579
|
cctp: {
|
|
1227
1580
|
domain: 15,
|
|
1228
1581
|
contracts: {
|
|
@@ -1234,6 +1587,10 @@ const MonadTestnet = defineChain({
|
|
|
1234
1587
|
fastConfirmations: 1,
|
|
1235
1588
|
},
|
|
1236
1589
|
},
|
|
1590
|
+
forwarderSupported: {
|
|
1591
|
+
source: true,
|
|
1592
|
+
destination: true,
|
|
1593
|
+
},
|
|
1237
1594
|
},
|
|
1238
1595
|
kitContracts: {
|
|
1239
1596
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1260,6 +1617,7 @@ defineChain({
|
|
|
1260
1617
|
rpcEndpoints: ['https://eth-rpc.mainnet.near.org'],
|
|
1261
1618
|
eurcAddress: null,
|
|
1262
1619
|
usdcAddress: '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',
|
|
1620
|
+
usdtAddress: 'usdt.tether-token.near',
|
|
1263
1621
|
cctp: null,
|
|
1264
1622
|
});
|
|
1265
1623
|
|
|
@@ -1283,6 +1641,7 @@ defineChain({
|
|
|
1283
1641
|
rpcEndpoints: ['https://eth-rpc.testnet.near.org'],
|
|
1284
1642
|
eurcAddress: null,
|
|
1285
1643
|
usdcAddress: '3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af',
|
|
1644
|
+
usdtAddress: null,
|
|
1286
1645
|
cctp: null,
|
|
1287
1646
|
});
|
|
1288
1647
|
|
|
@@ -1306,6 +1665,7 @@ defineChain({
|
|
|
1306
1665
|
rpcEndpoints: ['https://noble-rpc.polkachu.com'],
|
|
1307
1666
|
eurcAddress: null,
|
|
1308
1667
|
usdcAddress: 'uusdc',
|
|
1668
|
+
usdtAddress: null,
|
|
1309
1669
|
cctp: {
|
|
1310
1670
|
domain: 4,
|
|
1311
1671
|
contracts: {
|
|
@@ -1315,6 +1675,10 @@ defineChain({
|
|
|
1315
1675
|
confirmations: 1,
|
|
1316
1676
|
},
|
|
1317
1677
|
},
|
|
1678
|
+
forwarderSupported: {
|
|
1679
|
+
source: false,
|
|
1680
|
+
destination: false,
|
|
1681
|
+
},
|
|
1318
1682
|
},
|
|
1319
1683
|
});
|
|
1320
1684
|
|
|
@@ -1338,6 +1702,7 @@ defineChain({
|
|
|
1338
1702
|
rpcEndpoints: ['https://noble-testnet-rpc.polkachu.com'],
|
|
1339
1703
|
eurcAddress: null,
|
|
1340
1704
|
usdcAddress: 'uusdc',
|
|
1705
|
+
usdtAddress: null,
|
|
1341
1706
|
cctp: {
|
|
1342
1707
|
domain: 4,
|
|
1343
1708
|
contracts: {
|
|
@@ -1347,6 +1712,10 @@ defineChain({
|
|
|
1347
1712
|
confirmations: 1,
|
|
1348
1713
|
},
|
|
1349
1714
|
},
|
|
1715
|
+
forwarderSupported: {
|
|
1716
|
+
source: false,
|
|
1717
|
+
destination: false,
|
|
1718
|
+
},
|
|
1350
1719
|
},
|
|
1351
1720
|
});
|
|
1352
1721
|
|
|
@@ -1371,6 +1740,7 @@ const Optimism = defineChain({
|
|
|
1371
1740
|
rpcEndpoints: ['https://mainnet.optimism.io'],
|
|
1372
1741
|
eurcAddress: null,
|
|
1373
1742
|
usdcAddress: '0x0b2c639c533813f4aa9d7837caf62653d097ff85',
|
|
1743
|
+
usdtAddress: null,
|
|
1374
1744
|
cctp: {
|
|
1375
1745
|
domain: 2,
|
|
1376
1746
|
contracts: {
|
|
@@ -1388,9 +1758,14 @@ const Optimism = defineChain({
|
|
|
1388
1758
|
fastConfirmations: 1,
|
|
1389
1759
|
},
|
|
1390
1760
|
},
|
|
1761
|
+
forwarderSupported: {
|
|
1762
|
+
source: true,
|
|
1763
|
+
destination: true,
|
|
1764
|
+
},
|
|
1391
1765
|
},
|
|
1392
1766
|
kitContracts: {
|
|
1393
1767
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1768
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1394
1769
|
},
|
|
1395
1770
|
});
|
|
1396
1771
|
|
|
@@ -1415,6 +1790,7 @@ const OptimismSepolia = defineChain({
|
|
|
1415
1790
|
rpcEndpoints: ['https://sepolia.optimism.io'],
|
|
1416
1791
|
eurcAddress: null,
|
|
1417
1792
|
usdcAddress: '0x5fd84259d66Cd46123540766Be93DFE6D43130D7',
|
|
1793
|
+
usdtAddress: null,
|
|
1418
1794
|
cctp: {
|
|
1419
1795
|
domain: 2,
|
|
1420
1796
|
contracts: {
|
|
@@ -1432,6 +1808,10 @@ const OptimismSepolia = defineChain({
|
|
|
1432
1808
|
fastConfirmations: 1,
|
|
1433
1809
|
},
|
|
1434
1810
|
},
|
|
1811
|
+
forwarderSupported: {
|
|
1812
|
+
source: true,
|
|
1813
|
+
destination: true,
|
|
1814
|
+
},
|
|
1435
1815
|
},
|
|
1436
1816
|
kitContracts: {
|
|
1437
1817
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1461,6 +1841,7 @@ const Plume = defineChain({
|
|
|
1461
1841
|
rpcEndpoints: ['https://rpc.plume.org'],
|
|
1462
1842
|
eurcAddress: null,
|
|
1463
1843
|
usdcAddress: '0x222365EF19F7947e5484218551B56bb3965Aa7aF',
|
|
1844
|
+
usdtAddress: null,
|
|
1464
1845
|
cctp: {
|
|
1465
1846
|
domain: 22,
|
|
1466
1847
|
contracts: {
|
|
@@ -1472,9 +1853,14 @@ const Plume = defineChain({
|
|
|
1472
1853
|
fastConfirmations: 1,
|
|
1473
1854
|
},
|
|
1474
1855
|
},
|
|
1856
|
+
forwarderSupported: {
|
|
1857
|
+
source: true,
|
|
1858
|
+
destination: false,
|
|
1859
|
+
},
|
|
1475
1860
|
},
|
|
1476
1861
|
kitContracts: {
|
|
1477
1862
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
1863
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1478
1864
|
},
|
|
1479
1865
|
});
|
|
1480
1866
|
|
|
@@ -1500,6 +1886,7 @@ const PlumeTestnet = defineChain({
|
|
|
1500
1886
|
rpcEndpoints: ['https://testnet-rpc.plume.org'],
|
|
1501
1887
|
eurcAddress: null,
|
|
1502
1888
|
usdcAddress: '0xcB5f30e335672893c7eb944B374c196392C19D18',
|
|
1889
|
+
usdtAddress: null,
|
|
1503
1890
|
cctp: {
|
|
1504
1891
|
domain: 22,
|
|
1505
1892
|
contracts: {
|
|
@@ -1511,6 +1898,10 @@ const PlumeTestnet = defineChain({
|
|
|
1511
1898
|
fastConfirmations: 1,
|
|
1512
1899
|
},
|
|
1513
1900
|
},
|
|
1901
|
+
forwarderSupported: {
|
|
1902
|
+
source: true,
|
|
1903
|
+
destination: false,
|
|
1904
|
+
},
|
|
1514
1905
|
},
|
|
1515
1906
|
kitContracts: {
|
|
1516
1907
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1537,6 +1928,7 @@ defineChain({
|
|
|
1537
1928
|
rpcEndpoints: ['https://asset-hub-polkadot-rpc.n.dwellir.com'],
|
|
1538
1929
|
eurcAddress: null,
|
|
1539
1930
|
usdcAddress: '1337',
|
|
1931
|
+
usdtAddress: '1984',
|
|
1540
1932
|
cctp: null,
|
|
1541
1933
|
});
|
|
1542
1934
|
|
|
@@ -1560,6 +1952,7 @@ defineChain({
|
|
|
1560
1952
|
rpcEndpoints: ['https://westmint-rpc.polkadot.io'],
|
|
1561
1953
|
eurcAddress: null,
|
|
1562
1954
|
usdcAddress: 'Asset ID 31337',
|
|
1955
|
+
usdtAddress: null,
|
|
1563
1956
|
cctp: null,
|
|
1564
1957
|
});
|
|
1565
1958
|
|
|
@@ -1581,9 +1974,10 @@ const Polygon = defineChain({
|
|
|
1581
1974
|
chainId: 137,
|
|
1582
1975
|
isTestnet: false,
|
|
1583
1976
|
explorerUrl: 'https://polygonscan.com/tx/{hash}',
|
|
1584
|
-
rpcEndpoints: ['https://polygon
|
|
1977
|
+
rpcEndpoints: ['https://polygon.publicnode.com', 'https://polygon.drpc.org'],
|
|
1585
1978
|
eurcAddress: null,
|
|
1586
1979
|
usdcAddress: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
1980
|
+
usdtAddress: null,
|
|
1587
1981
|
cctp: {
|
|
1588
1982
|
domain: 7,
|
|
1589
1983
|
contracts: {
|
|
@@ -1601,9 +1995,14 @@ const Polygon = defineChain({
|
|
|
1601
1995
|
fastConfirmations: 13,
|
|
1602
1996
|
},
|
|
1603
1997
|
},
|
|
1998
|
+
forwarderSupported: {
|
|
1999
|
+
source: true,
|
|
2000
|
+
destination: true,
|
|
2001
|
+
},
|
|
1604
2002
|
},
|
|
1605
2003
|
kitContracts: {
|
|
1606
2004
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
2005
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1607
2006
|
},
|
|
1608
2007
|
});
|
|
1609
2008
|
|
|
@@ -1628,6 +2027,7 @@ const PolygonAmoy = defineChain({
|
|
|
1628
2027
|
rpcEndpoints: ['https://rpc-amoy.polygon.technology'],
|
|
1629
2028
|
eurcAddress: null,
|
|
1630
2029
|
usdcAddress: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582',
|
|
2030
|
+
usdtAddress: null,
|
|
1631
2031
|
cctp: {
|
|
1632
2032
|
domain: 7,
|
|
1633
2033
|
contracts: {
|
|
@@ -1645,6 +2045,10 @@ const PolygonAmoy = defineChain({
|
|
|
1645
2045
|
fastConfirmations: 13,
|
|
1646
2046
|
},
|
|
1647
2047
|
},
|
|
2048
|
+
forwarderSupported: {
|
|
2049
|
+
source: true,
|
|
2050
|
+
destination: true,
|
|
2051
|
+
},
|
|
1648
2052
|
},
|
|
1649
2053
|
kitContracts: {
|
|
1650
2054
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1674,6 +2078,7 @@ const Sei = defineChain({
|
|
|
1674
2078
|
rpcEndpoints: ['https://evm-rpc.sei-apis.com'],
|
|
1675
2079
|
eurcAddress: null,
|
|
1676
2080
|
usdcAddress: '0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392',
|
|
2081
|
+
usdtAddress: null,
|
|
1677
2082
|
cctp: {
|
|
1678
2083
|
domain: 16,
|
|
1679
2084
|
contracts: {
|
|
@@ -1685,9 +2090,14 @@ const Sei = defineChain({
|
|
|
1685
2090
|
fastConfirmations: 1,
|
|
1686
2091
|
},
|
|
1687
2092
|
},
|
|
2093
|
+
forwarderSupported: {
|
|
2094
|
+
source: true,
|
|
2095
|
+
destination: true,
|
|
2096
|
+
},
|
|
1688
2097
|
},
|
|
1689
2098
|
kitContracts: {
|
|
1690
2099
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
2100
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1691
2101
|
},
|
|
1692
2102
|
});
|
|
1693
2103
|
|
|
@@ -1713,6 +2123,7 @@ const SeiTestnet = defineChain({
|
|
|
1713
2123
|
rpcEndpoints: ['https://evm-rpc-testnet.sei-apis.com'],
|
|
1714
2124
|
eurcAddress: null,
|
|
1715
2125
|
usdcAddress: '0x4fCF1784B31630811181f670Aea7A7bEF803eaED',
|
|
2126
|
+
usdtAddress: null,
|
|
1716
2127
|
cctp: {
|
|
1717
2128
|
domain: 16,
|
|
1718
2129
|
contracts: {
|
|
@@ -1724,6 +2135,10 @@ const SeiTestnet = defineChain({
|
|
|
1724
2135
|
fastConfirmations: 1,
|
|
1725
2136
|
},
|
|
1726
2137
|
},
|
|
2138
|
+
forwarderSupported: {
|
|
2139
|
+
source: true,
|
|
2140
|
+
destination: true,
|
|
2141
|
+
},
|
|
1727
2142
|
},
|
|
1728
2143
|
kitContracts: {
|
|
1729
2144
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1751,6 +2166,7 @@ const Sonic = defineChain({
|
|
|
1751
2166
|
rpcEndpoints: ['https://rpc.soniclabs.com'],
|
|
1752
2167
|
eurcAddress: null,
|
|
1753
2168
|
usdcAddress: '0x29219dd400f2Bf60E5a23d13Be72B486D4038894',
|
|
2169
|
+
usdtAddress: null,
|
|
1754
2170
|
cctp: {
|
|
1755
2171
|
domain: 13,
|
|
1756
2172
|
contracts: {
|
|
@@ -1762,9 +2178,14 @@ const Sonic = defineChain({
|
|
|
1762
2178
|
fastConfirmations: 1,
|
|
1763
2179
|
},
|
|
1764
2180
|
},
|
|
2181
|
+
forwarderSupported: {
|
|
2182
|
+
source: true,
|
|
2183
|
+
destination: true,
|
|
2184
|
+
},
|
|
1765
2185
|
},
|
|
1766
2186
|
kitContracts: {
|
|
1767
2187
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
2188
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
1768
2189
|
},
|
|
1769
2190
|
});
|
|
1770
2191
|
|
|
@@ -1789,6 +2210,7 @@ const SonicTestnet = defineChain({
|
|
|
1789
2210
|
rpcEndpoints: ['https://rpc.testnet.soniclabs.com'],
|
|
1790
2211
|
eurcAddress: null,
|
|
1791
2212
|
usdcAddress: '0x0BA304580ee7c9a980CF72e55f5Ed2E9fd30Bc51',
|
|
2213
|
+
usdtAddress: null,
|
|
1792
2214
|
cctp: {
|
|
1793
2215
|
domain: 13,
|
|
1794
2216
|
contracts: {
|
|
@@ -1800,6 +2222,10 @@ const SonicTestnet = defineChain({
|
|
|
1800
2222
|
fastConfirmations: 1,
|
|
1801
2223
|
},
|
|
1802
2224
|
},
|
|
2225
|
+
forwarderSupported: {
|
|
2226
|
+
source: true,
|
|
2227
|
+
destination: true,
|
|
2228
|
+
},
|
|
1803
2229
|
},
|
|
1804
2230
|
kitContracts: {
|
|
1805
2231
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -1826,6 +2252,7 @@ const Solana = defineChain({
|
|
|
1826
2252
|
rpcEndpoints: ['https://api.mainnet-beta.solana.com'],
|
|
1827
2253
|
eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
|
|
1828
2254
|
usdcAddress: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
|
2255
|
+
usdtAddress: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
|
|
1829
2256
|
cctp: {
|
|
1830
2257
|
domain: 5,
|
|
1831
2258
|
contracts: {
|
|
@@ -1843,6 +2270,10 @@ const Solana = defineChain({
|
|
|
1843
2270
|
fastConfirmations: 3,
|
|
1844
2271
|
},
|
|
1845
2272
|
},
|
|
2273
|
+
forwarderSupported: {
|
|
2274
|
+
source: true,
|
|
2275
|
+
destination: false,
|
|
2276
|
+
},
|
|
1846
2277
|
},
|
|
1847
2278
|
kitContracts: {
|
|
1848
2279
|
bridge: 'DFaauJEjmiHkPs1JG89A4p95hDWi9m9SAEERY1LQJiC3',
|
|
@@ -1868,6 +2299,7 @@ const SolanaDevnet = defineChain({
|
|
|
1868
2299
|
explorerUrl: 'https://solscan.io/tx/{hash}?cluster=devnet',
|
|
1869
2300
|
eurcAddress: 'HzwqbKZw8HxMN6bF2yFZNrht3c2iXXzpKcFu7uBEDKtr',
|
|
1870
2301
|
usdcAddress: '4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU',
|
|
2302
|
+
usdtAddress: null,
|
|
1871
2303
|
cctp: {
|
|
1872
2304
|
domain: 5,
|
|
1873
2305
|
contracts: {
|
|
@@ -1885,6 +2317,10 @@ const SolanaDevnet = defineChain({
|
|
|
1885
2317
|
fastConfirmations: 3,
|
|
1886
2318
|
},
|
|
1887
2319
|
},
|
|
2320
|
+
forwarderSupported: {
|
|
2321
|
+
source: true,
|
|
2322
|
+
destination: false,
|
|
2323
|
+
},
|
|
1888
2324
|
},
|
|
1889
2325
|
kitContracts: {
|
|
1890
2326
|
bridge: 'DFaauJEjmiHkPs1JG89A4p95hDWi9m9SAEERY1LQJiC3',
|
|
@@ -1912,6 +2348,7 @@ defineChain({
|
|
|
1912
2348
|
rpcEndpoints: ['https://horizon.stellar.org'],
|
|
1913
2349
|
eurcAddress: 'EURC-GDHU6WRG4IEQXM5NZ4BMPKOXHW76MZM4Y2IEMFDVXBSDP6SJY4ITNPP2',
|
|
1914
2350
|
usdcAddress: 'USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
|
|
2351
|
+
usdtAddress: null,
|
|
1915
2352
|
cctp: null,
|
|
1916
2353
|
});
|
|
1917
2354
|
|
|
@@ -1935,6 +2372,7 @@ defineChain({
|
|
|
1935
2372
|
rpcEndpoints: ['https://horizon-testnet.stellar.org'],
|
|
1936
2373
|
eurcAddress: 'EURC-GB3Q6QDZYTHWT7E5PVS3W7FUT5GVAFC5KSZFFLPU25GO7VTC3NM2ZTVO',
|
|
1937
2374
|
usdcAddress: 'USDC-GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5',
|
|
2375
|
+
usdtAddress: null,
|
|
1938
2376
|
cctp: null,
|
|
1939
2377
|
});
|
|
1940
2378
|
|
|
@@ -1958,6 +2396,7 @@ defineChain({
|
|
|
1958
2396
|
rpcEndpoints: ['https://fullnode.mainnet.sui.io'],
|
|
1959
2397
|
eurcAddress: null,
|
|
1960
2398
|
usdcAddress: '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
|
|
2399
|
+
usdtAddress: null,
|
|
1961
2400
|
cctp: {
|
|
1962
2401
|
domain: 8,
|
|
1963
2402
|
contracts: {
|
|
@@ -1968,6 +2407,10 @@ defineChain({
|
|
|
1968
2407
|
confirmations: 1,
|
|
1969
2408
|
},
|
|
1970
2409
|
},
|
|
2410
|
+
forwarderSupported: {
|
|
2411
|
+
source: false,
|
|
2412
|
+
destination: false,
|
|
2413
|
+
},
|
|
1971
2414
|
},
|
|
1972
2415
|
});
|
|
1973
2416
|
|
|
@@ -1991,6 +2434,7 @@ defineChain({
|
|
|
1991
2434
|
rpcEndpoints: ['https://fullnode.testnet.sui.io'],
|
|
1992
2435
|
eurcAddress: null,
|
|
1993
2436
|
usdcAddress: '0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC',
|
|
2437
|
+
usdtAddress: null,
|
|
1994
2438
|
cctp: {
|
|
1995
2439
|
domain: 8,
|
|
1996
2440
|
contracts: {
|
|
@@ -2001,6 +2445,10 @@ defineChain({
|
|
|
2001
2445
|
confirmations: 1,
|
|
2002
2446
|
},
|
|
2003
2447
|
},
|
|
2448
|
+
forwarderSupported: {
|
|
2449
|
+
source: false,
|
|
2450
|
+
destination: false,
|
|
2451
|
+
},
|
|
2004
2452
|
},
|
|
2005
2453
|
});
|
|
2006
2454
|
|
|
@@ -2022,9 +2470,10 @@ const Unichain = defineChain({
|
|
|
2022
2470
|
chainId: 130,
|
|
2023
2471
|
isTestnet: false,
|
|
2024
2472
|
explorerUrl: 'https://unichain.blockscout.com/tx/{hash}',
|
|
2025
|
-
rpcEndpoints: ['https://
|
|
2473
|
+
rpcEndpoints: ['https://mainnet.unichain.org'],
|
|
2026
2474
|
eurcAddress: null,
|
|
2027
2475
|
usdcAddress: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
|
|
2476
|
+
usdtAddress: null,
|
|
2028
2477
|
cctp: {
|
|
2029
2478
|
domain: 10,
|
|
2030
2479
|
contracts: {
|
|
@@ -2042,9 +2491,14 @@ const Unichain = defineChain({
|
|
|
2042
2491
|
fastConfirmations: 1,
|
|
2043
2492
|
},
|
|
2044
2493
|
},
|
|
2494
|
+
forwarderSupported: {
|
|
2495
|
+
source: true,
|
|
2496
|
+
destination: true,
|
|
2497
|
+
},
|
|
2045
2498
|
},
|
|
2046
2499
|
kitContracts: {
|
|
2047
2500
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
2501
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
2048
2502
|
},
|
|
2049
2503
|
});
|
|
2050
2504
|
|
|
@@ -2069,6 +2523,7 @@ const UnichainSepolia = defineChain({
|
|
|
2069
2523
|
rpcEndpoints: ['https://sepolia.unichain.org'],
|
|
2070
2524
|
eurcAddress: null,
|
|
2071
2525
|
usdcAddress: '0x31d0220469e10c4E71834a79b1f276d740d3768F',
|
|
2526
|
+
usdtAddress: null,
|
|
2072
2527
|
cctp: {
|
|
2073
2528
|
domain: 10,
|
|
2074
2529
|
contracts: {
|
|
@@ -2086,6 +2541,10 @@ const UnichainSepolia = defineChain({
|
|
|
2086
2541
|
fastConfirmations: 1,
|
|
2087
2542
|
},
|
|
2088
2543
|
},
|
|
2544
|
+
forwarderSupported: {
|
|
2545
|
+
source: true,
|
|
2546
|
+
destination: true,
|
|
2547
|
+
},
|
|
2089
2548
|
},
|
|
2090
2549
|
kitContracts: {
|
|
2091
2550
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -2112,7 +2571,8 @@ const WorldChain = defineChain({
|
|
|
2112
2571
|
explorerUrl: 'https://worldscan.org/tx/{hash}',
|
|
2113
2572
|
rpcEndpoints: ['https://worldchain-mainnet.g.alchemy.com/public'],
|
|
2114
2573
|
eurcAddress: null,
|
|
2115
|
-
usdcAddress: '
|
|
2574
|
+
usdcAddress: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
|
|
2575
|
+
usdtAddress: null,
|
|
2116
2576
|
cctp: {
|
|
2117
2577
|
domain: 14,
|
|
2118
2578
|
contracts: {
|
|
@@ -2124,9 +2584,14 @@ const WorldChain = defineChain({
|
|
|
2124
2584
|
fastConfirmations: 1,
|
|
2125
2585
|
},
|
|
2126
2586
|
},
|
|
2587
|
+
forwarderSupported: {
|
|
2588
|
+
source: true,
|
|
2589
|
+
destination: true,
|
|
2590
|
+
},
|
|
2127
2591
|
},
|
|
2128
2592
|
kitContracts: {
|
|
2129
2593
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
2594
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
2130
2595
|
},
|
|
2131
2596
|
});
|
|
2132
2597
|
|
|
@@ -2154,6 +2619,7 @@ const WorldChainSepolia = defineChain({
|
|
|
2154
2619
|
],
|
|
2155
2620
|
eurcAddress: null,
|
|
2156
2621
|
usdcAddress: '0x66145f38cBAC35Ca6F1Dfb4914dF98F1614aeA88',
|
|
2622
|
+
usdtAddress: null,
|
|
2157
2623
|
cctp: {
|
|
2158
2624
|
domain: 14,
|
|
2159
2625
|
contracts: {
|
|
@@ -2165,6 +2631,10 @@ const WorldChainSepolia = defineChain({
|
|
|
2165
2631
|
fastConfirmations: 1,
|
|
2166
2632
|
},
|
|
2167
2633
|
},
|
|
2634
|
+
forwarderSupported: {
|
|
2635
|
+
source: true,
|
|
2636
|
+
destination: true,
|
|
2637
|
+
},
|
|
2168
2638
|
},
|
|
2169
2639
|
kitContracts: {
|
|
2170
2640
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -2191,9 +2661,10 @@ const XDC = defineChain({
|
|
|
2191
2661
|
chainId: 50,
|
|
2192
2662
|
isTestnet: false,
|
|
2193
2663
|
explorerUrl: 'https://xdcscan.io/tx/{hash}',
|
|
2194
|
-
rpcEndpoints: ['https://erpc.xinfin.network'],
|
|
2664
|
+
rpcEndpoints: ['https://erpc.xdcrpc.com', 'https://erpc.xinfin.network'],
|
|
2195
2665
|
eurcAddress: null,
|
|
2196
2666
|
usdcAddress: '0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1',
|
|
2667
|
+
usdtAddress: null,
|
|
2197
2668
|
cctp: {
|
|
2198
2669
|
domain: 18,
|
|
2199
2670
|
contracts: {
|
|
@@ -2205,9 +2676,14 @@ const XDC = defineChain({
|
|
|
2205
2676
|
fastConfirmations: 3,
|
|
2206
2677
|
},
|
|
2207
2678
|
},
|
|
2679
|
+
forwarderSupported: {
|
|
2680
|
+
source: true,
|
|
2681
|
+
destination: false,
|
|
2682
|
+
},
|
|
2208
2683
|
},
|
|
2209
2684
|
kitContracts: {
|
|
2210
2685
|
bridge: BRIDGE_CONTRACT_EVM_MAINNET,
|
|
2686
|
+
adapter: ADAPTER_CONTRACT_EVM_MAINNET,
|
|
2211
2687
|
},
|
|
2212
2688
|
});
|
|
2213
2689
|
|
|
@@ -2232,6 +2708,7 @@ const XDCApothem = defineChain({
|
|
|
2232
2708
|
rpcEndpoints: ['https://erpc.apothem.network'],
|
|
2233
2709
|
eurcAddress: null,
|
|
2234
2710
|
usdcAddress: '0xb5AB69F7bBada22B28e79C8FFAECe55eF1c771D4',
|
|
2711
|
+
usdtAddress: null,
|
|
2235
2712
|
cctp: {
|
|
2236
2713
|
domain: 18,
|
|
2237
2714
|
contracts: {
|
|
@@ -2243,6 +2720,10 @@ const XDCApothem = defineChain({
|
|
|
2243
2720
|
fastConfirmations: 1,
|
|
2244
2721
|
},
|
|
2245
2722
|
},
|
|
2723
|
+
forwarderSupported: {
|
|
2724
|
+
source: true,
|
|
2725
|
+
destination: false,
|
|
2726
|
+
},
|
|
2246
2727
|
},
|
|
2247
2728
|
kitContracts: {
|
|
2248
2729
|
bridge: BRIDGE_CONTRACT_EVM_TESTNET,
|
|
@@ -2270,6 +2751,7 @@ defineChain({
|
|
|
2270
2751
|
rpcEndpoints: ['https://mainnet.era.zksync.io'],
|
|
2271
2752
|
eurcAddress: null,
|
|
2272
2753
|
usdcAddress: '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4',
|
|
2754
|
+
usdtAddress: null,
|
|
2273
2755
|
cctp: null,
|
|
2274
2756
|
});
|
|
2275
2757
|
|
|
@@ -2294,6 +2776,7 @@ defineChain({
|
|
|
2294
2776
|
rpcEndpoints: ['https://sepolia.era.zksync.dev'],
|
|
2295
2777
|
eurcAddress: null,
|
|
2296
2778
|
usdcAddress: '0xAe045DE5638162fa134807Cb558E15A3F5A7F853',
|
|
2779
|
+
usdtAddress: null,
|
|
2297
2780
|
cctp: null,
|
|
2298
2781
|
});
|
|
2299
2782
|
|
|
@@ -2327,10 +2810,12 @@ const baseChainDefinitionSchema = z.object({
|
|
|
2327
2810
|
rpcEndpoints: z.array(z.string()),
|
|
2328
2811
|
eurcAddress: z.string().nullable(),
|
|
2329
2812
|
usdcAddress: z.string().nullable(),
|
|
2813
|
+
usdtAddress: z.string().nullable(),
|
|
2330
2814
|
cctp: z.any().nullable(), // We'll accept any CCTP config structure
|
|
2331
2815
|
kitContracts: z
|
|
2332
2816
|
.object({
|
|
2333
2817
|
bridge: z.string().optional(),
|
|
2818
|
+
adapter: z.string().optional(),
|
|
2334
2819
|
})
|
|
2335
2820
|
.optional(),
|
|
2336
2821
|
});
|
|
@@ -2445,6 +2930,29 @@ z.union([
|
|
|
2445
2930
|
z.nativeEnum(Blockchain),
|
|
2446
2931
|
chainDefinitionSchema,
|
|
2447
2932
|
]);
|
|
2933
|
+
/**
|
|
2934
|
+
* Zod schema for validating swap-specific chain identifiers.
|
|
2935
|
+
*
|
|
2936
|
+
* Validates chains based on:
|
|
2937
|
+
* - CCTPv2 support (adapter contract deployed)
|
|
2938
|
+
* - Mainnet only (no testnets)
|
|
2939
|
+
* - At least one supported token available
|
|
2940
|
+
*
|
|
2941
|
+
*/
|
|
2942
|
+
z.union([
|
|
2943
|
+
// String blockchain identifier (accepts SwapChain enum values)
|
|
2944
|
+
z.string().refine((val) => val in SwapChain, (val) => ({
|
|
2945
|
+
message: `"${val}" is not a supported swap chain. ` +
|
|
2946
|
+
`Supported chains: ${Object.values(SwapChain).join(', ')}`,
|
|
2947
|
+
})),
|
|
2948
|
+
// SwapChain enum
|
|
2949
|
+
z.nativeEnum(SwapChain),
|
|
2950
|
+
// ChainDefinition object (checks if chain.chain is in SwapChain)
|
|
2951
|
+
chainDefinitionSchema.refine((chain) => chain.chain in SwapChain, (chain) => ({
|
|
2952
|
+
message: `"${chain.chain}" is not a supported swap chain. ` +
|
|
2953
|
+
`Supported chains: ${Object.values(SwapChain).join(', ')}`,
|
|
2954
|
+
})),
|
|
2955
|
+
]);
|
|
2448
2956
|
/**
|
|
2449
2957
|
* Zod schema for validating bridge chain identifiers.
|
|
2450
2958
|
*
|
|
@@ -2484,5 +2992,37 @@ z.union([
|
|
|
2484
2992
|
})),
|
|
2485
2993
|
]);
|
|
2486
2994
|
|
|
2995
|
+
/**
|
|
2996
|
+
* @packageDocumentation
|
|
2997
|
+
* @module SwapTokenSchemas
|
|
2998
|
+
*
|
|
2999
|
+
* Zod validation schemas for supported swap tokens.
|
|
3000
|
+
*/
|
|
3001
|
+
// Internal enum used after input normalization.
|
|
3002
|
+
const swapTokenEnumSchema = z.enum([
|
|
3003
|
+
...Object.keys(SWAP_TOKEN_REGISTRY),
|
|
3004
|
+
NATIVE_TOKEN,
|
|
3005
|
+
]);
|
|
3006
|
+
/**
|
|
3007
|
+
* Zod schema for validating supported swap token symbols.
|
|
3008
|
+
*
|
|
3009
|
+
* Accepts any token symbol from the SWAP_TOKEN_REGISTRY plus NATIVE.
|
|
3010
|
+
* Input matching is case-insensitive and normalized to uppercase.
|
|
3011
|
+
*
|
|
3012
|
+
* @example
|
|
3013
|
+
* ```typescript
|
|
3014
|
+
* import { supportedSwapTokenSchema } from '@core/chains'
|
|
3015
|
+
*
|
|
3016
|
+
* const result = supportedSwapTokenSchema.safeParse('USDC')
|
|
3017
|
+
* if (result.success) {
|
|
3018
|
+
* console.log('Valid swap token:', result.data)
|
|
3019
|
+
* }
|
|
3020
|
+
* ```
|
|
3021
|
+
*/
|
|
3022
|
+
z
|
|
3023
|
+
.string()
|
|
3024
|
+
.transform((value) => value.toUpperCase())
|
|
3025
|
+
.pipe(swapTokenEnumSchema);
|
|
3026
|
+
|
|
2487
3027
|
export { Arbitrum, ArbitrumSepolia, ArcTestnet, Avalanche, AvalancheFuji, Base, BaseSepolia, BridgeChain, Codex, CodexTestnet, Ethereum, EthereumSepolia, HyperEVM, HyperEVMTestnet, Ink, InkTestnet, Linea, LineaSepolia, Monad, MonadTestnet, Optimism, OptimismSepolia, Plume, PlumeTestnet, Polygon, PolygonAmoy, Sei, SeiTestnet, Solana, SolanaDevnet, Sonic, SonicTestnet, Unichain, UnichainSepolia, WorldChain, WorldChainSepolia, XDC, XDCApothem };
|
|
2488
3028
|
//# sourceMappingURL=chains.mjs.map
|