0xtrails 0.1.13 → 0.2.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/aave.d.ts.map +1 -1
- package/dist/analytics.d.ts +11 -2
- package/dist/analytics.d.ts.map +1 -1
- package/dist/apiClient.d.ts +1 -1
- package/dist/apiClient.d.ts.map +1 -1
- package/dist/{proxyCaller.d.ts → balanceInjector.d.ts} +5 -4
- package/dist/balanceInjector.d.ts.map +1 -0
- package/dist/{ccip-D3gTQONK.js → ccip-D6ToCrWc.js} +12 -12
- package/dist/cctp.d.ts.map +1 -1
- package/dist/cctpqueue.d.ts +3 -3
- package/dist/cctpqueue.d.ts.map +1 -1
- package/dist/chains.d.ts.map +1 -1
- package/dist/config.d.ts +17 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/constants.d.ts +5 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/contractUtils.d.ts +2 -0
- package/dist/contractUtils.d.ts.map +1 -1
- package/dist/customChains.d.ts +24 -0
- package/dist/customChains.d.ts.map +1 -0
- package/dist/{index-CnUM7lKf.js → index-BqgeTLL8.js} +34072 -30146
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +411 -400
- package/dist/intentEntrypoint.d.ts +96 -0
- package/dist/intentEntrypoint.d.ts.map +1 -0
- package/dist/intents.d.ts +5 -3
- package/dist/intents.d.ts.map +1 -1
- package/dist/metaTxnMonitor.d.ts.map +1 -1
- package/dist/morpho.d.ts.map +1 -1
- package/dist/pools.d.ts +3 -1
- package/dist/pools.d.ts.map +1 -1
- package/dist/prepareSend.d.ts +8 -2
- package/dist/prepareSend.d.ts.map +1 -1
- package/dist/prices.d.ts +1 -1
- package/dist/prices.d.ts.map +1 -1
- package/dist/relaySdk.d.ts.map +1 -1
- package/dist/relayer.d.ts.map +1 -1
- package/dist/toast.d.ts +9 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/tokenBalances.d.ts +6 -2
- package/dist/tokenBalances.d.ts.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/trails.d.ts +6 -5
- package/dist/trails.d.ts.map +1 -1
- package/dist/trailsClient.d.ts +12 -0
- package/dist/trailsClient.d.ts.map +1 -0
- package/dist/transactions.d.ts +8 -0
- package/dist/transactions.d.ts.map +1 -1
- package/dist/wallets.d.ts.map +1 -1
- package/dist/widget/components/AccountActionsDropdown.d.ts.map +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/components/AccountSettings.d.ts +7 -0
- package/dist/widget/components/AccountSettings.d.ts.map +1 -0
- package/dist/widget/components/ChainList.d.ts +0 -1
- package/dist/widget/components/ChainList.d.ts.map +1 -1
- package/dist/widget/components/ClassicSwap.d.ts +46 -0
- package/dist/widget/components/ClassicSwap.d.ts.map +1 -0
- package/dist/widget/components/ConfigDisplay.d.ts.map +1 -1
- package/dist/widget/components/ConnectedWallets.d.ts +9 -0
- package/dist/widget/components/ConnectedWallets.d.ts.map +1 -0
- package/dist/widget/components/DebugMenu.d.ts.map +1 -1
- package/dist/widget/components/DebugScreensList.d.ts.map +1 -1
- package/dist/widget/components/DebugToast.d.ts +3 -0
- package/dist/widget/components/DebugToast.d.ts.map +1 -0
- package/dist/widget/components/Earn.d.ts.map +1 -1
- package/dist/widget/components/EarnPools.d.ts.map +1 -1
- package/dist/widget/components/Fund.d.ts +44 -0
- package/dist/widget/components/Fund.d.ts.map +1 -0
- package/dist/widget/components/Identicon.d.ts +9 -0
- package/dist/widget/components/Identicon.d.ts.map +1 -0
- package/dist/widget/components/Pay.d.ts +46 -0
- package/dist/widget/components/Pay.d.ts.map +1 -0
- package/dist/widget/components/Receive.d.ts.map +1 -1
- package/dist/widget/components/RecentTokens.d.ts.map +1 -1
- package/dist/widget/components/Recipients.d.ts +9 -0
- package/dist/widget/components/Recipients.d.ts.map +1 -0
- package/dist/widget/components/RefundWarning.d.ts +9 -0
- package/dist/widget/components/RefundWarning.d.ts.map +1 -0
- package/dist/widget/components/SimpleSwap.d.ts.map +1 -1
- package/dist/widget/components/Swap.d.ts.map +1 -1
- package/dist/widget/components/SwapSettings.d.ts +1 -5
- package/dist/widget/components/SwapSettings.d.ts.map +1 -1
- package/dist/widget/components/ThemeProvider.d.ts.map +1 -1
- package/dist/widget/components/ThemeSyncer.d.ts +6 -0
- package/dist/widget/components/ThemeSyncer.d.ts.map +1 -0
- package/dist/widget/components/Toast.d.ts +24 -0
- package/dist/widget/components/Toast.d.ts.map +1 -0
- package/dist/widget/components/TokenList.d.ts.map +1 -1
- package/dist/widget/components/TransactionDetails.d.ts.map +1 -1
- package/dist/widget/components/TruncatedAddress.d.ts +2 -0
- package/dist/widget/components/TruncatedAddress.d.ts.map +1 -1
- package/dist/widget/components/UserPreferences.d.ts +7 -0
- package/dist/widget/components/UserPreferences.d.ts.map +1 -0
- package/dist/widget/hooks/useBalanceVisible.d.ts +1 -0
- package/dist/widget/hooks/useBalanceVisible.d.ts.map +1 -1
- package/dist/widget/hooks/useCheckout.d.ts.map +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts.map +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts.map +1 -1
- package/dist/widget/hooks/useDefaultTokenSelection.d.ts +54 -0
- package/dist/widget/hooks/useDefaultTokenSelection.d.ts.map +1 -0
- package/dist/widget/hooks/useIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/hooks/usePayMessage.d.ts +34 -0
- package/dist/widget/hooks/usePayMessage.d.ts.map +1 -0
- package/dist/widget/hooks/useRecipients.d.ts +17 -0
- package/dist/widget/hooks/useRecipients.d.ts.map +1 -0
- package/dist/widget/hooks/useSelectedRecipient.d.ts +12 -0
- package/dist/widget/hooks/useSelectedRecipient.d.ts.map +1 -0
- package/dist/widget/hooks/useSendForm.d.ts +2 -0
- package/dist/widget/hooks/useSendForm.d.ts.map +1 -1
- package/dist/widget/hooks/useSwapAmount.d.ts +13 -0
- package/dist/widget/hooks/useSwapAmount.d.ts.map +1 -0
- package/dist/widget/hooks/useSwapSettings.d.ts +16 -0
- package/dist/widget/hooks/useSwapSettings.d.ts.map +1 -0
- package/dist/widget/hooks/useTargetAmount.d.ts +5 -0
- package/dist/widget/hooks/useTargetAmount.d.ts.map +1 -0
- package/dist/widget/hooks/useTheme.d.ts +14 -0
- package/dist/widget/hooks/useTheme.d.ts.map +1 -0
- package/dist/widget/hooks/useTokenList.d.ts.map +1 -1
- package/dist/widget/index.js +2 -2
- package/dist/widget/widget.d.ts +9 -0
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +29 -28
- package/src/aave.ts +6 -1
- package/src/analytics.ts +103 -53
- package/src/apiClient.ts +1 -1
- package/src/{proxyCaller.ts → balanceInjector.ts} +22 -17
- package/src/cctp.ts +6 -2
- package/src/cctpqueue.ts +7 -7
- package/src/chains.ts +8 -0
- package/src/config.ts +40 -9
- package/src/constants.ts +11 -8
- package/src/contractUtils.ts +33 -2
- package/src/customChains.ts +24 -0
- package/src/index.ts +11 -1
- package/src/intentEntrypoint.ts +253 -0
- package/src/intents.ts +87 -54
- package/src/metaTxnMonitor.ts +1 -0
- package/src/morpho.ts +13 -2
- package/src/pools.ts +68 -86
- package/src/prepareSend.ts +437 -207
- package/src/prices.ts +51 -7
- package/src/relaySdk.ts +6 -4
- package/src/relayer.ts +2 -0
- package/src/toast.ts +110 -0
- package/src/tokenBalances.ts +112 -20
- package/src/tokens.ts +70 -7
- package/src/trails.ts +80 -77
- package/src/trailsClient.ts +45 -0
- package/src/transactions.ts +27 -35
- package/src/umd.tsx +1 -1
- package/src/wallets.ts +2 -1
- package/src/widget/assets/sequence-logo.svg +15 -0
- package/src/widget/compiled.css +2 -2
- package/src/widget/components/AccountActionsDropdown.tsx +18 -159
- package/src/widget/components/AccountIntentTransactionHistory.tsx +346 -63
- package/src/widget/components/AccountSettings.tsx +96 -0
- package/src/widget/components/ChainFilterDropdown.tsx +1 -1
- package/src/widget/components/ChainList.tsx +10 -20
- package/src/widget/components/ClassicSwap.tsx +923 -0
- package/src/widget/components/ConfigDisplay.tsx +8 -5
- package/src/widget/components/ConnectedWallets.tsx +260 -0
- package/src/widget/components/DebugMenu.tsx +2 -0
- package/src/widget/components/DebugScreensList.tsx +3 -0
- package/src/widget/components/DebugToast.tsx +63 -0
- package/src/widget/components/Earn.tsx +108 -116
- package/src/widget/components/EarnPools.tsx +2 -4
- package/src/widget/components/EarnPoolsFilters.tsx +6 -6
- package/src/widget/components/Fund.tsx +1245 -0
- package/src/widget/components/FundMethods.tsx +1 -1
- package/src/widget/components/FundSendForm.tsx +1 -1
- package/src/widget/components/Identicon.tsx +158 -0
- package/src/widget/components/Pay.tsx +1088 -0
- package/src/widget/components/PaySendForm.tsx +1 -1
- package/src/widget/components/QuoteDetails.tsx +1 -1
- package/src/widget/components/Receipt.tsx +1 -1
- package/src/widget/components/Receive.tsx +4 -2
- package/src/widget/components/RecentTokens.tsx +2 -1
- package/src/widget/components/Recipients.tsx +448 -0
- package/src/widget/components/RefundWarning.tsx +61 -0
- package/src/widget/components/ScreenHeader.tsx +1 -1
- package/src/widget/components/SimpleSwap.tsx +74 -58
- package/src/widget/components/Swap.tsx +35 -853
- package/src/widget/components/SwapSettings.tsx +5 -11
- package/src/widget/components/ThemeProvider.tsx +32 -0
- package/src/widget/components/ThemeSyncer.tsx +47 -0
- package/src/widget/components/Toast.tsx +315 -0
- package/src/widget/components/TokenList.tsx +2 -34
- package/src/widget/components/TokenSelector.tsx +3 -3
- package/src/widget/components/TransactionDetails.tsx +153 -13
- package/src/widget/components/TruncatedAddress.tsx +5 -1
- package/src/widget/components/UserPreferences.tsx +156 -0
- package/src/widget/components/WalletList.tsx +1 -1
- package/src/widget/hooks/useBalanceVisible.tsx +40 -2
- package/src/widget/hooks/useCheckout.ts +13 -0
- package/src/widget/hooks/useCurrentScreen.tsx +3 -0
- package/src/widget/hooks/useDebugScreens.ts +12 -2
- package/src/widget/hooks/useDefaultTokenSelection.tsx +475 -0
- package/src/widget/hooks/useIntentTransactionHistory.ts +212 -0
- package/src/widget/hooks/usePayMessage.tsx +370 -0
- package/src/widget/hooks/useRecipients.ts +168 -0
- package/src/widget/hooks/useSelectedRecipient.tsx +48 -0
- package/src/widget/hooks/useSendForm.ts +179 -26
- package/src/widget/hooks/useSwapAmount.tsx +50 -0
- package/src/widget/hooks/useSwapSettings.tsx +100 -0
- package/src/widget/hooks/useTargetAmount.ts +23 -0
- package/src/widget/hooks/useTheme.tsx +80 -0
- package/src/widget/hooks/useTokenList.ts +20 -11
- package/src/widget/index.css +45 -21
- package/src/widget/widget.tsx +164 -68
- package/dist/address.d.ts +0 -2
- package/dist/address.d.ts.map +0 -1
- package/dist/proxyCaller.d.ts.map +0 -1
- package/src/address.ts +0 -6
package/src/analytics.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Databeat, type Event as DatabeatEvent } from "@databeat/tracker"
|
|
|
2
2
|
import { Bytes, Hash } from "ox"
|
|
3
3
|
import { DATABEAT_KEY, DATABEAT_SERVER } from "./constants.js"
|
|
4
4
|
import { getQueryParam } from "./queryParams.js"
|
|
5
|
-
import { getSequenceProjectAccessKey } from "./config.js"
|
|
5
|
+
import { getSequenceProjectAccessKey, getEnvVar } from "./config.js"
|
|
6
6
|
import { logger } from "./logger.js"
|
|
7
7
|
|
|
8
8
|
let checkoutIdSingleton: string | null = null
|
|
@@ -125,6 +125,18 @@ export function pseudonymize(
|
|
|
125
125
|
return hashHex.replace("0x", "").substring(0, 50)
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
export function hashUserAddress(address: string) {
|
|
129
|
+
return pseudonymize(pseudonymize(address), {
|
|
130
|
+
userAgentSalt: false,
|
|
131
|
+
extraSalt: "s3qs4lt",
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (typeof window !== "undefined") {
|
|
136
|
+
// for debugging
|
|
137
|
+
;(window as any)._pseudonymize = pseudonymize
|
|
138
|
+
}
|
|
139
|
+
|
|
128
140
|
export const EventType = {
|
|
129
141
|
PAGEVIEW: "PAGEVIEW" as const,
|
|
130
142
|
WIDGET_SCREEN: "WIDGET_SCREEN" as const,
|
|
@@ -246,7 +258,7 @@ abstract class BaseAnalytics {
|
|
|
246
258
|
checkoutId: getCheckoutId(),
|
|
247
259
|
...data,
|
|
248
260
|
...(data.userAddress && {
|
|
249
|
-
userAddress:
|
|
261
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
250
262
|
}),
|
|
251
263
|
},
|
|
252
264
|
})
|
|
@@ -275,10 +287,10 @@ abstract class BaseAnalytics {
|
|
|
275
287
|
checkoutId: getNewCheckoutId(data.userAddress),
|
|
276
288
|
...data,
|
|
277
289
|
...(data.userAddress && {
|
|
278
|
-
userAddress:
|
|
290
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
279
291
|
}),
|
|
280
292
|
...(data.intentAddress && {
|
|
281
|
-
intentAddress:
|
|
293
|
+
intentAddress: data.intentAddress,
|
|
282
294
|
}),
|
|
283
295
|
destinationChainId: data.destinationChainId?.toString(),
|
|
284
296
|
originChainId: data.originChainId?.toString(),
|
|
@@ -309,10 +321,10 @@ abstract class BaseAnalytics {
|
|
|
309
321
|
originChainId: data.originChainId?.toString(),
|
|
310
322
|
destinationChainId: data.destinationChainId?.toString(),
|
|
311
323
|
...(data.userAddress && {
|
|
312
|
-
userAddress:
|
|
324
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
313
325
|
}),
|
|
314
326
|
...(data.intentAddress && {
|
|
315
|
-
intentAddress:
|
|
327
|
+
intentAddress: data.intentAddress,
|
|
316
328
|
}),
|
|
317
329
|
depositTokenAmountUsd: data.depositTokenAmountUsd?.toString(),
|
|
318
330
|
destinationTokenAmountUsd: data.destinationTokenAmountUsd?.toString(),
|
|
@@ -338,10 +350,10 @@ abstract class BaseAnalytics {
|
|
|
338
350
|
checkoutId: getCheckoutId(),
|
|
339
351
|
...data,
|
|
340
352
|
...(data.userAddress && {
|
|
341
|
-
userAddress:
|
|
353
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
342
354
|
}),
|
|
343
355
|
...(data.intentAddress && {
|
|
344
|
-
intentAddress:
|
|
356
|
+
intentAddress: data.intentAddress,
|
|
345
357
|
}),
|
|
346
358
|
originChainId: data.originChainId?.toString(),
|
|
347
359
|
destinationChainId: data.destinationChainId?.toString(),
|
|
@@ -361,7 +373,7 @@ abstract class BaseAnalytics {
|
|
|
361
373
|
props: {
|
|
362
374
|
...this.getCommonProps(),
|
|
363
375
|
...data,
|
|
364
|
-
address:
|
|
376
|
+
address: data.address,
|
|
365
377
|
chainId: data.chainId?.toString(),
|
|
366
378
|
},
|
|
367
379
|
})
|
|
@@ -400,7 +412,7 @@ abstract class BaseAnalytics {
|
|
|
400
412
|
originTokenAddress: data.originTokenAddress,
|
|
401
413
|
destinationTokenAddress: data.destinationTokenAddress,
|
|
402
414
|
...(data.userAddress && {
|
|
403
|
-
userAddress:
|
|
415
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
404
416
|
}),
|
|
405
417
|
originTokenSymbol: data.originTokenSymbol,
|
|
406
418
|
destinationTokenSymbol: data.destinationTokenSymbol,
|
|
@@ -418,7 +430,7 @@ abstract class BaseAnalytics {
|
|
|
418
430
|
trailsSwapFeeUSD?: number
|
|
419
431
|
gasFeesPerChainUSD?: number[]
|
|
420
432
|
originTokenTotalAmount?: string
|
|
421
|
-
|
|
433
|
+
totalFeeAmount?: string
|
|
422
434
|
provider?: string
|
|
423
435
|
feeToken?: string
|
|
424
436
|
userAddress?: string
|
|
@@ -429,13 +441,19 @@ abstract class BaseAnalytics {
|
|
|
429
441
|
originTokenSymbol?: string
|
|
430
442
|
destinationTokenSymbol?: string
|
|
431
443
|
depositTokenAmountUsd?: string
|
|
444
|
+
originPreconditionAmount?: string
|
|
445
|
+
destinationPreconditionAmount?: string
|
|
446
|
+
fromAmount?: string
|
|
447
|
+
fromAmountMin?: string
|
|
448
|
+
toAmount?: string
|
|
449
|
+
toAmountMin?: string
|
|
432
450
|
[key: string]: any
|
|
433
451
|
}) {
|
|
434
452
|
this.track({
|
|
435
453
|
event: EventType.INTENT_QUOTE_RECEIVED,
|
|
436
454
|
props: {
|
|
437
455
|
...this.getCommonProps(),
|
|
438
|
-
quoteId:
|
|
456
|
+
quoteId: data.quoteId,
|
|
439
457
|
checkoutId: getCheckoutId(),
|
|
440
458
|
totalFeeUSD: data.totalFeeUSD?.toString(),
|
|
441
459
|
trailsFixedFeeUSD: data.trailsFixedFeeUSD?.toString(),
|
|
@@ -447,19 +465,26 @@ abstract class BaseAnalytics {
|
|
|
447
465
|
?.map((fee) => fee?.toString())
|
|
448
466
|
.join(","),
|
|
449
467
|
originTokenTotalAmount: data.originTokenTotalAmount?.toString(),
|
|
450
|
-
|
|
468
|
+
totalFeeAmount: data.totalFeeAmount?.toString(),
|
|
451
469
|
provider: data.provider,
|
|
452
470
|
feeToken: data.feeToken,
|
|
453
471
|
...(data.userAddress && {
|
|
454
|
-
userAddress:
|
|
472
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
455
473
|
}),
|
|
456
474
|
...(data.intentAddress && {
|
|
457
|
-
intentAddress:
|
|
475
|
+
intentAddress: data.intentAddress,
|
|
458
476
|
}),
|
|
459
477
|
feeTokenSymbol: data.feeTokenSymbol,
|
|
460
478
|
originTokenSymbol: data.originTokenSymbol,
|
|
461
479
|
destinationTokenSymbol: data.destinationTokenSymbol,
|
|
462
480
|
depositTokenAmountUsd: data.depositTokenAmountUsd?.toString(),
|
|
481
|
+
originPreconditionAmount: data.originPreconditionAmount?.toString(),
|
|
482
|
+
destinationPreconditionAmount:
|
|
483
|
+
data.destinationPreconditionAmount?.toString(),
|
|
484
|
+
fromAmount: data.fromAmount?.toString(),
|
|
485
|
+
fromAmountMin: data.fromAmountMin?.toString(),
|
|
486
|
+
toAmount: data.toAmount?.toString(),
|
|
487
|
+
toAmountMin: data.toAmountMin?.toString(),
|
|
463
488
|
},
|
|
464
489
|
})
|
|
465
490
|
}
|
|
@@ -484,7 +509,7 @@ abstract class BaseAnalytics {
|
|
|
484
509
|
checkoutId: getCheckoutId(),
|
|
485
510
|
...data,
|
|
486
511
|
...(data.userAddress && {
|
|
487
|
-
userAddress:
|
|
512
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
488
513
|
}),
|
|
489
514
|
originChainId: data.originChainId?.toString(),
|
|
490
515
|
destinationChainId: data.destinationChainId?.toString(),
|
|
@@ -509,9 +534,9 @@ abstract class BaseAnalytics {
|
|
|
509
534
|
...data,
|
|
510
535
|
originChainId: data.originChainId?.toString(),
|
|
511
536
|
destinationChainId: data.destinationChainId?.toString(),
|
|
512
|
-
intentAddress:
|
|
537
|
+
intentAddress: data.intentAddress,
|
|
513
538
|
...(data.userAddress && {
|
|
514
|
-
userAddress:
|
|
539
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
515
540
|
}),
|
|
516
541
|
originTokenSymbol: data.originTokenSymbol,
|
|
517
542
|
destinationTokenSymbol: data.destinationTokenSymbol,
|
|
@@ -534,9 +559,9 @@ abstract class BaseAnalytics {
|
|
|
534
559
|
...data,
|
|
535
560
|
originChainId: data.originChainId?.toString(),
|
|
536
561
|
destinationChainId: data.destinationChainId?.toString(),
|
|
537
|
-
intentAddress:
|
|
562
|
+
intentAddress: data.intentAddress,
|
|
538
563
|
...(data.userAddress && {
|
|
539
|
-
userAddress:
|
|
564
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
540
565
|
}),
|
|
541
566
|
originTokenSymbol: data.originTokenSymbol,
|
|
542
567
|
destinationTokenSymbol: data.destinationTokenSymbol,
|
|
@@ -563,10 +588,10 @@ abstract class BaseAnalytics {
|
|
|
563
588
|
checkoutId: getCheckoutId(),
|
|
564
589
|
...data,
|
|
565
590
|
...(data.userAddress && {
|
|
566
|
-
userAddress:
|
|
591
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
567
592
|
}),
|
|
568
593
|
...(data.intentAddress && {
|
|
569
|
-
intentAddress:
|
|
594
|
+
intentAddress: data.intentAddress,
|
|
570
595
|
}),
|
|
571
596
|
originChainId: data.originChainId?.toString(),
|
|
572
597
|
destinationChainId: data.destinationChainId?.toString(),
|
|
@@ -594,10 +619,10 @@ abstract class BaseAnalytics {
|
|
|
594
619
|
checkoutId: getCheckoutId(),
|
|
595
620
|
...data,
|
|
596
621
|
...(data.userAddress && {
|
|
597
|
-
userAddress:
|
|
622
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
598
623
|
}),
|
|
599
624
|
...(data.intentAddress && {
|
|
600
|
-
intentAddress:
|
|
625
|
+
intentAddress: data.intentAddress,
|
|
601
626
|
}),
|
|
602
627
|
chainId: data.chainId?.toString(),
|
|
603
628
|
depositTokenAmountUsd: data.depositTokenAmountUsd?.toString(),
|
|
@@ -621,10 +646,10 @@ abstract class BaseAnalytics {
|
|
|
621
646
|
checkoutId: getCheckoutId(),
|
|
622
647
|
...data,
|
|
623
648
|
...(data.userAddress && {
|
|
624
|
-
userAddress:
|
|
649
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
625
650
|
}),
|
|
626
651
|
...(data.intentAddress && {
|
|
627
|
-
intentAddress:
|
|
652
|
+
intentAddress: data.intentAddress,
|
|
628
653
|
}),
|
|
629
654
|
depositTokenAmountUsd: data.depositTokenAmountUsd?.toString(),
|
|
630
655
|
},
|
|
@@ -648,10 +673,10 @@ abstract class BaseAnalytics {
|
|
|
648
673
|
checkoutId: getCheckoutId(),
|
|
649
674
|
...data,
|
|
650
675
|
...(data.userAddress && {
|
|
651
|
-
userAddress:
|
|
676
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
652
677
|
}),
|
|
653
678
|
...(data.intentAddress && {
|
|
654
|
-
intentAddress:
|
|
679
|
+
intentAddress: data.intentAddress,
|
|
655
680
|
}),
|
|
656
681
|
chainId: data.chainId?.toString(),
|
|
657
682
|
depositTokenAmountUsd: data.depositTokenAmountUsd?.toString(),
|
|
@@ -677,10 +702,10 @@ abstract class BaseAnalytics {
|
|
|
677
702
|
...data,
|
|
678
703
|
chainId: data.chainId?.toString(),
|
|
679
704
|
...(data.userAddress && {
|
|
680
|
-
userAddress:
|
|
705
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
681
706
|
}),
|
|
682
707
|
...(data.intentAddress && {
|
|
683
|
-
intentAddress:
|
|
708
|
+
intentAddress: data.intentAddress,
|
|
684
709
|
}),
|
|
685
710
|
blockNumber: data.blockNumber?.toString(),
|
|
686
711
|
depositTokenAmountUsd: data.depositTokenAmountUsd?.toString(),
|
|
@@ -704,10 +729,10 @@ abstract class BaseAnalytics {
|
|
|
704
729
|
checkoutId: getCheckoutId(),
|
|
705
730
|
...data,
|
|
706
731
|
...(data.userAddress && {
|
|
707
|
-
userAddress:
|
|
732
|
+
userAddress: hashUserAddress(data.userAddress),
|
|
708
733
|
}),
|
|
709
734
|
...(data.intentAddress && {
|
|
710
|
-
intentAddress:
|
|
735
|
+
intentAddress: data.intentAddress,
|
|
711
736
|
}),
|
|
712
737
|
},
|
|
713
738
|
})
|
|
@@ -729,10 +754,10 @@ abstract class BaseAnalytics {
|
|
|
729
754
|
checkoutId: getCheckoutId(),
|
|
730
755
|
...data,
|
|
731
756
|
...(data.walletAddress && {
|
|
732
|
-
walletAddress:
|
|
757
|
+
walletAddress: data.walletAddress,
|
|
733
758
|
}),
|
|
734
759
|
...(data.contractAddress && {
|
|
735
|
-
contractAddress:
|
|
760
|
+
contractAddress: data.contractAddress,
|
|
736
761
|
}),
|
|
737
762
|
chainId: data.chainId?.toString(),
|
|
738
763
|
},
|
|
@@ -754,10 +779,10 @@ abstract class BaseAnalytics {
|
|
|
754
779
|
checkoutId: getCheckoutId(),
|
|
755
780
|
...data,
|
|
756
781
|
...(data.walletAddress && {
|
|
757
|
-
walletAddress:
|
|
782
|
+
walletAddress: data.walletAddress,
|
|
758
783
|
}),
|
|
759
784
|
...(data.contractAddress && {
|
|
760
|
-
contractAddress:
|
|
785
|
+
contractAddress: data.contractAddress,
|
|
761
786
|
}),
|
|
762
787
|
chainId: data.chainId?.toString(),
|
|
763
788
|
},
|
|
@@ -780,10 +805,10 @@ abstract class BaseAnalytics {
|
|
|
780
805
|
checkoutId: getCheckoutId(),
|
|
781
806
|
...data,
|
|
782
807
|
...(data.walletAddress && {
|
|
783
|
-
walletAddress:
|
|
808
|
+
walletAddress: data.walletAddress,
|
|
784
809
|
}),
|
|
785
810
|
...(data.contractAddress && {
|
|
786
|
-
contractAddress:
|
|
811
|
+
contractAddress: data.contractAddress,
|
|
787
812
|
}),
|
|
788
813
|
chainId: data.chainId?.toString(),
|
|
789
814
|
},
|
|
@@ -795,21 +820,37 @@ class Analytics extends BaseAnalytics {
|
|
|
795
820
|
private databeat: Databeat<EventTypes>
|
|
796
821
|
private loggingEnabled: boolean = false
|
|
797
822
|
|
|
798
|
-
constructor(server: string, config: any) {
|
|
823
|
+
constructor(server: string, auth: any, config: any) {
|
|
799
824
|
super()
|
|
800
|
-
this.databeat = new Databeat<EventTypes>(server,
|
|
825
|
+
this.databeat = new Databeat<EventTypes>(server, auth, {
|
|
826
|
+
userIdentTracking: true,
|
|
827
|
+
privacy: {
|
|
828
|
+
userIdHash: false, // Don't hash client-side, let server handle it
|
|
829
|
+
userAgentSalt: false,
|
|
830
|
+
},
|
|
831
|
+
...config,
|
|
832
|
+
})
|
|
833
|
+
|
|
834
|
+
// Emit VIEW event on instance creation
|
|
835
|
+
setTimeout(() => {
|
|
836
|
+
this.databeat.trackView()
|
|
837
|
+
}, 100)
|
|
801
838
|
}
|
|
802
839
|
|
|
803
840
|
identifyUser({ address }: { address: string }) {
|
|
804
841
|
if (getCheckoutUserId() !== address?.toLowerCase()) {
|
|
805
842
|
resetCheckoutId()
|
|
806
843
|
}
|
|
807
|
-
this.databeat.identify(address
|
|
844
|
+
this.databeat.identify(hashUserAddress(address), {
|
|
845
|
+
userIdHash: false,
|
|
846
|
+
allowTracking: true,
|
|
847
|
+
})
|
|
808
848
|
}
|
|
809
849
|
|
|
810
850
|
unidentifyUser() {
|
|
811
851
|
resetCheckoutId()
|
|
812
|
-
this.databeat.
|
|
852
|
+
this.databeat.reset()
|
|
853
|
+
this.databeat.identify()
|
|
813
854
|
}
|
|
814
855
|
|
|
815
856
|
track(event: EventProps) {
|
|
@@ -903,6 +944,7 @@ export const getAnalytics = () => {
|
|
|
903
944
|
|
|
904
945
|
const debugLocalMode = getQueryParam("analyticsDebugLocal") === "true"
|
|
905
946
|
const debugProdMode = getQueryParam("analyticsDebugProd") === "true"
|
|
947
|
+
const isCI = getEnvVar("CI") === "true"
|
|
906
948
|
let isLocalhost = true
|
|
907
949
|
if (typeof window !== "undefined") {
|
|
908
950
|
isLocalhost =
|
|
@@ -910,22 +952,28 @@ export const getAnalytics = () => {
|
|
|
910
952
|
window.location.hostname === "127.0.0.1"
|
|
911
953
|
}
|
|
912
954
|
const enableMockAnalytics =
|
|
913
|
-
(!DATABEAT_KEY || debugLocalMode || isLocalhost) && !debugProdMode
|
|
955
|
+
(!DATABEAT_KEY || debugLocalMode || isLocalhost || isCI) && !debugProdMode
|
|
914
956
|
if (enableMockAnalytics) {
|
|
915
|
-
singleton = new MockAnalytics({ loggingEnabled:
|
|
957
|
+
singleton = new MockAnalytics({ loggingEnabled: !isCI }) // disable logging in CI
|
|
916
958
|
}
|
|
917
959
|
if (!singleton) {
|
|
918
|
-
singleton = new Analytics(
|
|
919
|
-
|
|
920
|
-
|
|
960
|
+
singleton = new Analytics(
|
|
961
|
+
DATABEAT_SERVER,
|
|
962
|
+
{
|
|
963
|
+
jwt: DATABEAT_KEY,
|
|
964
|
+
},
|
|
965
|
+
{},
|
|
966
|
+
)
|
|
921
967
|
}
|
|
922
968
|
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
969
|
+
if (!isCI) {
|
|
970
|
+
logger.console.log(
|
|
971
|
+
"[trails-sdk] Analytics sessionId:",
|
|
972
|
+
singleton.getSessionId(),
|
|
973
|
+
"[trails-sdk] Analytics userId:",
|
|
974
|
+
singleton.getUserId(),
|
|
975
|
+
)
|
|
976
|
+
}
|
|
929
977
|
|
|
930
978
|
return singleton
|
|
931
979
|
}
|
|
@@ -1047,6 +1095,8 @@ export const trackIntentQuoteReceived = (data: {
|
|
|
1047
1095
|
intentAddress?: string
|
|
1048
1096
|
mode?: string
|
|
1049
1097
|
fundMethod?: string
|
|
1098
|
+
originPreconditionAmount?: string
|
|
1099
|
+
destinationPreconditionAmount?: string
|
|
1050
1100
|
[key: string]: any
|
|
1051
1101
|
}) => {
|
|
1052
1102
|
const analytics = getAnalytics()
|
package/src/apiClient.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useConfig } from "@0xsequence/hooks"
|
|
2
|
-
import { SequenceAPIClient } from "@0xsequence/
|
|
2
|
+
import { SequenceAPIClient } from "@0xsequence/api"
|
|
3
3
|
import { useMemo } from "react"
|
|
4
4
|
import { getSequenceApiUrl, getSequenceProjectAccessKey } from "./config.js"
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { encodeFunctionData } from "viem"
|
|
1
|
+
import { encodeFunctionData, zeroAddress } from "viem"
|
|
2
2
|
import { TRAILS_BALANCE_INJECTOR_ADDRESS } from "./constants.js"
|
|
3
3
|
|
|
4
4
|
export const TRAILS_CONTRACT_PLACEHOLDER_AMOUNT =
|
|
@@ -14,10 +14,10 @@ function getAmountOffset(calldata: `0x${string}`, placeholder: bigint): number {
|
|
|
14
14
|
return byteOffset
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const balanceInjectorAbi = [
|
|
18
18
|
{
|
|
19
19
|
type: "function",
|
|
20
|
-
name: "
|
|
20
|
+
name: "injectAndCall",
|
|
21
21
|
stateMutability: "nonpayable",
|
|
22
22
|
inputs: [
|
|
23
23
|
{ name: "token", type: "address" },
|
|
@@ -30,29 +30,31 @@ const proxyCallerAbi = [
|
|
|
30
30
|
},
|
|
31
31
|
]
|
|
32
32
|
|
|
33
|
-
export function
|
|
33
|
+
export function encodeBalanceInjectorCalldata({
|
|
34
34
|
token,
|
|
35
35
|
target,
|
|
36
36
|
calldata,
|
|
37
37
|
amountOffset,
|
|
38
|
+
placeholder,
|
|
38
39
|
}: {
|
|
39
40
|
token: string
|
|
40
41
|
target: string
|
|
41
42
|
calldata: `0x${string}`
|
|
42
43
|
amountOffset: number
|
|
44
|
+
placeholder: bigint
|
|
43
45
|
}) {
|
|
44
46
|
// Convert BigInt to bytes32 format
|
|
45
47
|
const placeholderBytes32 =
|
|
46
|
-
`0x${
|
|
48
|
+
`0x${placeholder.toString(16).padStart(64, "0")}` as `0x${string}`
|
|
47
49
|
|
|
48
50
|
return encodeFunctionData({
|
|
49
|
-
abi:
|
|
50
|
-
functionName: "
|
|
51
|
+
abi: balanceInjectorAbi,
|
|
52
|
+
functionName: "injectAndCall",
|
|
51
53
|
args: [token, target, calldata, amountOffset, placeholderBytes32],
|
|
52
54
|
})
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
export function
|
|
57
|
+
export function wrapCalldataWithBalanceInjectorIfNeeded({
|
|
56
58
|
token,
|
|
57
59
|
target,
|
|
58
60
|
calldata,
|
|
@@ -70,9 +72,10 @@ export function wrapCalldataWithProxyCallerIfNeeded({
|
|
|
70
72
|
amount: string
|
|
71
73
|
originTokenAddress: string
|
|
72
74
|
destinationTokenAddress: string
|
|
73
|
-
}): { encodedCalldata: `0x${string}`;
|
|
75
|
+
}): { encodedCalldata: `0x${string}`; balanceInjectorAddress: string } | null {
|
|
74
76
|
const isSameToken =
|
|
75
77
|
originTokenAddress?.toLowerCase() === destinationTokenAddress?.toLowerCase()
|
|
78
|
+
const isDestinationNativeToken = destinationTokenAddress === zeroAddress
|
|
76
79
|
if (originChainId === destinationChainId && isSameToken) {
|
|
77
80
|
const amountHex = BigInt(amount).toString(16).padStart(64, "0") // 32-byte hex (no 0x)
|
|
78
81
|
const placeholderHex = TRAILS_CONTRACT_PLACEHOLDER_AMOUNT.toString(
|
|
@@ -86,29 +89,31 @@ export function wrapCalldataWithProxyCallerIfNeeded({
|
|
|
86
89
|
const calldataWithAmount = calldata.replace(placeholderHex, amountHex)
|
|
87
90
|
return {
|
|
88
91
|
encodedCalldata: calldataWithAmount as `0x${string}`,
|
|
89
|
-
|
|
92
|
+
balanceInjectorAddress: target,
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
|
|
93
|
-
const
|
|
96
|
+
const balanceInjectorAddress = TRAILS_BALANCE_INJECTOR_ADDRESS
|
|
94
97
|
|
|
95
|
-
const amountOffset =
|
|
96
|
-
|
|
97
|
-
BigInt(TRAILS_CONTRACT_PLACEHOLDER_AMOUNT)
|
|
98
|
-
)
|
|
98
|
+
const amountOffset = isDestinationNativeToken
|
|
99
|
+
? 0
|
|
100
|
+
: getAmountOffset(calldata, BigInt(TRAILS_CONTRACT_PLACEHOLDER_AMOUNT))
|
|
99
101
|
if (amountOffset === -1) {
|
|
100
102
|
return null
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
const encodedCalldata =
|
|
105
|
+
const encodedCalldata = encodeBalanceInjectorCalldata({
|
|
104
106
|
token,
|
|
105
107
|
target,
|
|
106
108
|
calldata,
|
|
107
109
|
amountOffset,
|
|
110
|
+
placeholder: isDestinationNativeToken
|
|
111
|
+
? BigInt(0)
|
|
112
|
+
: TRAILS_CONTRACT_PLACEHOLDER_AMOUNT,
|
|
108
113
|
})
|
|
109
114
|
|
|
110
115
|
return {
|
|
111
116
|
encodedCalldata,
|
|
112
|
-
|
|
117
|
+
balanceInjectorAddress,
|
|
113
118
|
}
|
|
114
119
|
}
|
package/src/cctp.ts
CHANGED
|
@@ -206,7 +206,7 @@ export async function cctpTransfer({
|
|
|
206
206
|
token: originToken,
|
|
207
207
|
account,
|
|
208
208
|
spender: originTokenMessenger,
|
|
209
|
-
amount:
|
|
209
|
+
amount: maxUint256,
|
|
210
210
|
})
|
|
211
211
|
|
|
212
212
|
if (needsApproval) {
|
|
@@ -310,6 +310,10 @@ export async function getNeedsApproval({
|
|
|
310
310
|
spender: string
|
|
311
311
|
amount: bigint
|
|
312
312
|
}): Promise<boolean> {
|
|
313
|
+
if (account?.toLowerCase() === spender.toLowerCase()) {
|
|
314
|
+
return false
|
|
315
|
+
}
|
|
316
|
+
|
|
313
317
|
const allowance = await publicClient.readContract({
|
|
314
318
|
address: token as `0x${string}`,
|
|
315
319
|
abi: erc20Abi,
|
|
@@ -703,7 +707,7 @@ export async function cctpTransferWithCustomCall({
|
|
|
703
707
|
token: originToken,
|
|
704
708
|
account,
|
|
705
709
|
spender: originTokenMessenger,
|
|
706
|
-
amount:
|
|
710
|
+
amount: maxUint256,
|
|
707
711
|
})
|
|
708
712
|
|
|
709
713
|
if (needsApproval) {
|
package/src/cctpqueue.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { getTrailsApiUrl, getSequenceProjectAccessKey } from "./config.js"
|
|
2
|
+
import type { TrailsClient } from "./trailsClient.js"
|
|
3
3
|
|
|
4
4
|
// Narrow API client to one that supports queueing CCTP transfers without using 'any'
|
|
5
5
|
type CctpQueueCapable = {
|
|
@@ -21,7 +21,7 @@ const fallbackQueueCCTPTransfer = async (args: {
|
|
|
21
21
|
sourceChainId: number
|
|
22
22
|
destinationChainId: number
|
|
23
23
|
}): Promise<void> => {
|
|
24
|
-
const apiUrl =
|
|
24
|
+
const apiUrl = getTrailsApiUrl()
|
|
25
25
|
const accessKey = getSequenceProjectAccessKey()
|
|
26
26
|
const headers: { [key: string]: string } = {
|
|
27
27
|
"Content-Type": "application/json",
|
|
@@ -40,18 +40,18 @@ export function hasCctpQueue(client: unknown): client is CctpQueueCapable {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export async function queueCCTPTransfer({
|
|
43
|
-
|
|
43
|
+
trailsClient,
|
|
44
44
|
sourceTxHash,
|
|
45
45
|
sourceChainId,
|
|
46
46
|
destinationChainId,
|
|
47
47
|
}: {
|
|
48
|
-
|
|
48
|
+
trailsClient: TrailsClient
|
|
49
49
|
sourceTxHash: string
|
|
50
50
|
sourceChainId: number
|
|
51
51
|
destinationChainId: number
|
|
52
52
|
}): Promise<void> {
|
|
53
|
-
if (hasCctpQueue(
|
|
54
|
-
await
|
|
53
|
+
if (hasCctpQueue(trailsClient)) {
|
|
54
|
+
await trailsClient.queueCCTPTransfer({
|
|
55
55
|
sourceTxHash,
|
|
56
56
|
sourceChainId,
|
|
57
57
|
destinationChainId,
|
package/src/chains.ts
CHANGED
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
soneiumMinato,
|
|
31
31
|
xaiTestnet,
|
|
32
32
|
etherlinkTestnet,
|
|
33
|
+
somniaTestnet,
|
|
33
34
|
} from "viem/chains"
|
|
34
35
|
import { getRelaySupportedChains } from "./relaySdk.js"
|
|
35
36
|
import { getLifiSupportedChains } from "./lifi.js"
|
|
@@ -38,6 +39,7 @@ import {
|
|
|
38
39
|
getSequenceNodeGatewayUrl,
|
|
39
40
|
} from "./config.js"
|
|
40
41
|
import type { QuoteProvider } from "./intents.js"
|
|
42
|
+
import { somnia } from "./customChains.js"
|
|
41
43
|
|
|
42
44
|
export function getAllChains(): Chain[] {
|
|
43
45
|
return [
|
|
@@ -48,6 +50,7 @@ export function getAllChains(): Chain[] {
|
|
|
48
50
|
gnosis,
|
|
49
51
|
polygon,
|
|
50
52
|
soneium,
|
|
53
|
+
somnia,
|
|
51
54
|
xai,
|
|
52
55
|
apeChain,
|
|
53
56
|
arbitrumNova,
|
|
@@ -70,6 +73,7 @@ export function getAllChains(): Chain[] {
|
|
|
70
73
|
soneiumMinato,
|
|
71
74
|
xaiTestnet,
|
|
72
75
|
etherlinkTestnet,
|
|
76
|
+
somniaTestnet,
|
|
73
77
|
]
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -87,6 +91,7 @@ function getSequenceRpcUrls(): Record<number, string> {
|
|
|
87
91
|
[gnosis.id]: getSequenceRpcUrlFromSlug("gnosis"),
|
|
88
92
|
[polygon.id]: getSequenceRpcUrlFromSlug("polygon"),
|
|
89
93
|
[soneium.id]: getSequenceRpcUrlFromSlug("soneium"),
|
|
94
|
+
[somnia.id]: getSequenceRpcUrlFromSlug("somnia"),
|
|
90
95
|
[xai.id]: getSequenceRpcUrlFromSlug("xai"),
|
|
91
96
|
[apeChain.id]: getSequenceRpcUrlFromSlug("apechain"),
|
|
92
97
|
[arbitrumNova.id]: getSequenceRpcUrlFromSlug("arbitrum-nova"),
|
|
@@ -124,6 +129,7 @@ export const supportedSequenceChains: Record<number, Chain> = {
|
|
|
124
129
|
[optimism.id]: getChainInfo(optimism.id)!,
|
|
125
130
|
[polygon.id]: getChainInfo(polygon.id)!,
|
|
126
131
|
[soneium.id]: getChainInfo(soneium.id)!,
|
|
132
|
+
[somnia.id]: getChainInfo(somnia.id)!,
|
|
127
133
|
[xai.id]: getChainInfo(xai.id)!,
|
|
128
134
|
[katana.id]: getChainInfo(katana.id)!,
|
|
129
135
|
[etherlink.id]: getChainInfo(etherlink.id)!,
|
|
@@ -143,6 +149,7 @@ export const supportedSequenceTestnetChains: Record<number, Chain> = {
|
|
|
143
149
|
[soneiumMinato.id]: getChainInfo(soneiumMinato.id)!,
|
|
144
150
|
[xaiTestnet.id]: getChainInfo(xaiTestnet.id)!,
|
|
145
151
|
[etherlinkTestnet.id]: getChainInfo(etherlinkTestnet.id)!,
|
|
152
|
+
[somniaTestnet.id]: getChainInfo(somniaTestnet.id)!,
|
|
146
153
|
}
|
|
147
154
|
|
|
148
155
|
export const mainnetChainsToTestnetChains: Record<number, Chain> = {
|
|
@@ -161,6 +168,7 @@ export const mainnetChainsToTestnetChains: Record<number, Chain> = {
|
|
|
161
168
|
[arbitrumNova.id]: arbitrumSepolia,
|
|
162
169
|
[apeChain.id]: sepolia,
|
|
163
170
|
[etherlink.id]: etherlinkTestnet,
|
|
171
|
+
[somnia.id]: somniaTestnet,
|
|
164
172
|
}
|
|
165
173
|
|
|
166
174
|
// Helper to get chain info
|