Skip to content

Commit cb26ca5

Browse files
committed
Add TBR v3 route
1 parent c09e303 commit cb26ca5

File tree

8 files changed

+405
-25
lines changed

8 files changed

+405
-25
lines changed

wormhole-connect/package-lock.json

+355-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wormhole-connect/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
"@xlabs-libs/wallet-aggregator-sei": "^0.0.1-alpha.14",
5656
"@xlabs-libs/wallet-aggregator-solana": "^0.0.1-alpha.15",
5757
"@xlabs-libs/wallet-aggregator-sui": "^0.0.1-alpha.10",
58+
"@xlabs-xyz/arbitrary-token-transfer-evm-route": "^0.0.1-alpha.5",
59+
"@xlabs-xyz/arbitrary-token-transfer-route": "^0.0.1-alpha.4",
60+
"@xlabs-xyz/arbitrary-token-transfer-solana-route": "^0.0.1-alpha.4",
61+
"@xlabs-xyz/arbitrary-token-transfers-definitions": "^0.0.1-alpha.5",
5862
"aptos": "1.5.0",
5963
"axios": "^1.2.4",
6064
"binary-parser": "^2.2.1",
@@ -160,6 +164,13 @@
160164
},
161165
"vite-plugin-dts": {
162166
"vue-tsc": "2.0.0"
167+
},
168+
"@xlabs-xyz/arbitrary-token-transfer-solana-route": {
169+
"@xlabs-xyz/solana-arbitrary-token-transfers": "^0.0.2-alpha6",
170+
"@xlabs/solana-price-oracle-sdk": "^0.0.14"
171+
},
172+
"@xlabs-xyz/solana-arbitrary-token-transfers": {
173+
"@xlabs/solana-price-oracle-sdk": "^0.0.14"
163174
}
164175
}
165176
}

wormhole-connect/src/components/DemoApp/index.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import {
3939
} from '@mayanfinance/wormhole-sdk-route';
4040
import { NTT_TEST_CONFIG_TESTNET, NTT_TEST_CONFIG_MAINNET } from './consts';
4141
import { DEFAULT_ROUTES, nttRoutes } from 'routes/operator';
42+
import { AutomaticTokenBridgeRouteV3 } from '@xlabs-xyz/arbitrary-token-transfer-route';
4243

4344
const MAX_URL_SIZE = 30_000; // 30kb (HTTP header limit is set to 32kb)
4445

@@ -73,6 +74,8 @@ const parseConfig = (config: string): WormholeConnectConfig => {
7374
window.testNttRoutesTestnet = () => nttRoutes(NTT_TEST_CONFIG_TESTNET);
7475
/* @ts-ignore */
7576
window.testNttRoutesMainnet = () => nttRoutes(NTT_TEST_CONFIG_MAINNET);
77+
/* @ts-ignore */
78+
window.AutomaticTokenBridgeRouteV3 = AutomaticTokenBridgeRouteV3;
7679

7780
return eval(
7881
`(function() { return ${config} })()`,
@@ -239,6 +242,10 @@ function DemoApp() {
239242
<pre>testNttRoutesTestnet</pre>
240243
<i>{'(NttRoute.Config) -> RouteConstructor[])'}</i>
241244
</li>
245+
{/* <li>
246+
<pre>AutomaticTokenBridgeRouteV3</pre>
247+
<i>{'RouteConstructor'}</i>
248+
</li> */}
242249
</ul>
243250
</div>
244251
) : undefined}

wormhole-connect/src/config/routes.ts

+7
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,11 @@ export const RoutesConfig: Record<string, RouteData> = {
135135
icon: XLabsIcon,
136136
pendingMessage: 'Waiting for Wormhole network consensus . . .',
137137
},
138+
AutomaticTokenBridgeV3: {
139+
name: 'AutomaticTokenBridgeV3',
140+
displayName: 'Automatic Bridge V3',
141+
link: 'https://xlabs.xyz',
142+
icon: XLabsIcon,
143+
pendingMessage: 'Waiting for Wormhole network consensus . . .',
144+
},
138145
};

wormhole-connect/src/config/testnet/tokens.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export const TESTNET_TOKENS: TokensConfig = {
217217
symbol: 'ETH',
218218
nativeChain: 'Sepolia',
219219
icon: Icon.ETH,
220-
coinGeckoId: 'Ethereum',
220+
coinGeckoId: 'ethereum',
221221
color: '#5794EC',
222222
decimals: 18,
223223
wrappedAsset: 'WETHsepolia',
@@ -231,7 +231,7 @@ export const TESTNET_TOKENS: TokensConfig = {
231231
chain: 'Sepolia',
232232
address: '0xeef12A83EE5b7161D3873317c8E0E7B76e0B5D9c',
233233
},
234-
coinGeckoId: 'Ethereum',
234+
coinGeckoId: 'ethereum',
235235
color: '#5794EC',
236236
decimals: 18,
237237
},
@@ -253,7 +253,7 @@ export const TESTNET_TOKENS: TokensConfig = {
253253
symbol: 'ETH',
254254
nativeChain: 'ArbitrumSepolia',
255255
icon: Icon.ETH,
256-
coinGeckoId: 'Ethereum',
256+
coinGeckoId: 'ethereum',
257257
color: '#5794EC',
258258
decimals: 18,
259259
wrappedAsset: 'WETHarbitrum_sepolia',
@@ -267,7 +267,7 @@ export const TESTNET_TOKENS: TokensConfig = {
267267
chain: 'ArbitrumSepolia',
268268
address: '0x980B62Da83eFf3D4576C647993b0c1D7faf17c73',
269269
},
270-
coinGeckoId: 'Ethereum',
270+
coinGeckoId: 'ethereum',
271271
color: '#5794EC',
272272
decimals: 18,
273273
},
@@ -276,7 +276,7 @@ export const TESTNET_TOKENS: TokensConfig = {
276276
symbol: 'ETH',
277277
nativeChain: 'BaseSepolia',
278278
icon: Icon.ETH,
279-
coinGeckoId: 'Ethereum',
279+
coinGeckoId: 'ethereum',
280280
color: '#5794EC',
281281
decimals: 18,
282282
wrappedAsset: 'WETHbase_sepolia',
@@ -290,7 +290,7 @@ export const TESTNET_TOKENS: TokensConfig = {
290290
chain: 'BaseSepolia',
291291
address: '0x4200000000000000000000000000000000000006',
292292
},
293-
coinGeckoId: 'Ethereum',
293+
coinGeckoId: 'ethereum',
294294
color: '#5794EC',
295295
decimals: 18,
296296
},
@@ -299,7 +299,7 @@ export const TESTNET_TOKENS: TokensConfig = {
299299
symbol: 'ETH',
300300
nativeChain: 'OptimismSepolia',
301301
icon: Icon.ETH,
302-
coinGeckoId: 'Ethereum',
302+
coinGeckoId: 'ethereum',
303303
color: '#5794EC',
304304
decimals: 18,
305305
wrappedAsset: 'WETHoptimism_sepolia',
@@ -313,7 +313,7 @@ export const TESTNET_TOKENS: TokensConfig = {
313313
chain: 'OptimismSepolia',
314314
address: '0x4200000000000000000000000000000000000006',
315315
},
316-
coinGeckoId: 'Ethereum',
316+
coinGeckoId: 'ethereum',
317317
color: '#5794EC',
318318
decimals: 18,
319319
},
@@ -322,7 +322,7 @@ export const TESTNET_TOKENS: TokensConfig = {
322322
symbol: 'ETH',
323323
nativeChain: 'Scroll',
324324
icon: Icon.SCROLL,
325-
coinGeckoId: 'Ethereum',
325+
coinGeckoId: 'ethereum',
326326
decimals: 18,
327327
wrappedAsset: 'WETHscroll',
328328
},
@@ -335,15 +335,15 @@ export const TESTNET_TOKENS: TokensConfig = {
335335
chain: 'Scroll',
336336
address: '0x5300000000000000000000000000000000000004',
337337
},
338-
coinGeckoId: 'Ethereum',
338+
coinGeckoId: 'ethereum',
339339
decimals: 18,
340340
},
341341
ETHblast: {
342342
key: 'ETHblast',
343343
symbol: 'ETH',
344344
nativeChain: 'Blast',
345345
icon: Icon.BLAST,
346-
coinGeckoId: 'Ethereum',
346+
coinGeckoId: 'ethereum',
347347
decimals: 18,
348348
wrappedAsset: 'WETHblast',
349349
},
@@ -356,7 +356,7 @@ export const TESTNET_TOKENS: TokensConfig = {
356356
chain: 'Blast',
357357
address: '0x9D020B1697035d9d54f115194c9e04a1e4Eb9aF7',
358358
},
359-
coinGeckoId: 'Ethereum',
359+
coinGeckoId: 'ethereum',
360360
decimals: 18,
361361
},
362362
OKB: {

wormhole-connect/src/routes/operator.ts

+7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ import {
1111
NttRoute,
1212
} from '@wormhole-foundation/sdk-route-ntt';
1313

14+
import { AutomaticTokenBridgeRouteV3 } from '@xlabs-xyz/arbitrary-token-transfer-route';
15+
16+
import '@xlabs-xyz/arbitrary-token-transfers-definitions';
17+
import '@xlabs-xyz/arbitrary-token-transfer-evm-route';
18+
import '@xlabs-xyz/arbitrary-token-transfer-solana-route';
19+
1420
import '@wormhole-foundation/sdk-definitions-ntt';
1521
import '@wormhole-foundation/sdk-evm-ntt';
1622
import '@wormhole-foundation/sdk-solana-ntt';
@@ -27,6 +33,7 @@ type forEachCallback<T> = (name: string, route: SDKv2Route) => T;
2733
export const DEFAULT_ROUTES = [
2834
routes.AutomaticCCTPRoute,
2935
routes.CCTPRoute,
36+
AutomaticTokenBridgeRouteV3,
3037
routes.AutomaticTokenBridgeRoute,
3138
routes.TokenBridgeRoute,
3239
routes.AutomaticPorticoRoute,

wormhole-connect/src/routes/sdkv2/route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class SDKv2Route {
3636
this.IS_TOKEN_BRIDGE_ROUTE = [
3737
'ManualTokenBridge',
3838
'AutomaticTokenBridge',
39+
'AutomaticTokenBridgeV3',
3940
'CosmosGateway',
4041
].includes(rc.meta.name);
4142
}

wormhole-connect/vite.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const resolve = {
6060
'process/': 'process',
6161
'buffer/': 'buffer',
6262
},
63+
preserveSymlinks: true,
6364
};
6465

6566
const plugins = [
@@ -140,6 +141,10 @@ export default defineConfig(({ command, mode }) => {
140141
output,
141142
external,
142143
},
144+
sourcemap: 'inline',
145+
},
146+
css: {
147+
devSourcemap: true,
143148
},
144149
plugins,
145150
optimizeDeps,

0 commit comments

Comments
 (0)