Skip to content

Commit 523f3ce

Browse files
committed
feat: mayan fast mctp route with linea support
1 parent 5cc2bab commit 523f3ce

13 files changed

Lines changed: 362 additions & 468 deletions

File tree

src/components/SampleApp/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
MayanRouteMCTP,
3838
MayanRouteSWIFT,
3939
MayanRouteMONOCHAIN,
40+
MayanRouteFastMCTP,
4041
} from '../../routes/mayan';
4142
import { NTT_TEST_CONFIG_TESTNET, NTT_TEST_CONFIG_MAINNET } from './consts';
4243
import { DEFAULT_ROUTES } from 'routes/operator';
@@ -77,6 +78,8 @@ const parseConfig = (config: string): WormholeConnectConfig => {
7778
/* @ts-ignore */
7879
window.MayanRouteMCTP = MayanRouteMCTP;
7980
/* @ts-ignore */
81+
window.MayanRouteFastMCTP = MayanRouteFastMCTP;
82+
/* @ts-ignore */
8083
window.MayanRouteMONOCHAIN = MayanRouteMONOCHAIN;
8184
/* @ts-ignore */
8285
window.MayanRouteSWIFT = MayanRouteSWIFT;
@@ -285,6 +288,10 @@ function SampleApp() {
285288
<pre>MayanRouteSWIFT</pre>
286289
<i>{'RouteConstructor'}</i>
287290
</li>
291+
<li>
292+
<pre>MayanRouteFastMCTP</pre>
293+
<i>{'RouteConstructor'}</i>
294+
</li>
288295
<li>
289296
<pre>MayanRouteMONOCHAIN</pre>
290297
<i>{'RouteConstructor'}</i>

src/exports/mayan.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ export {
22
MayanRoute,
33
MayanRouteWH,
44
MayanRouteMCTP,
5+
MayanRouteFastMCTP,
56
MayanRouteSWIFT,
67
MayanRouteMONOCHAIN,
7-
createMayanRouteWithReferrerFee,
8+
type ReferrerParams,
89
} from '../routes/mayan';

src/routes/mayan/MayanRoute.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import type { Network } from '@wormhole-foundation/sdk-base';
2+
import type { routes } from '@wormhole-foundation/sdk-connect';
3+
import { MayanRouteBase } from './MayanRouteBase';
4+
import type { MayanProtocol } from './types';
5+
6+
export class MayanRoute<N extends Network>
7+
extends MayanRouteBase<N>
8+
implements routes.StaticRouteMethods<typeof MayanRoute>
9+
{
10+
static meta = {
11+
name: 'MayanSwap',
12+
provider: 'Mayan',
13+
};
14+
15+
override protocols: MayanProtocol[] = [
16+
'WH',
17+
'MCTP',
18+
'FAST_MCTP',
19+
'SWIFT',
20+
'MONO_CHAIN',
21+
];
22+
}

0 commit comments

Comments
 (0)