Skip to content

Commit 66ae1d3

Browse files
authored
feat: mayan fast mctp route with linea support (#3793)
* feat: mayan fast mctp route with linea support * fix: use createTransferCheckedInstruction * fix: HyperEVM swap * chore: rename fast mctp
1 parent fe299f8 commit 66ae1d3

15 files changed

Lines changed: 376 additions & 480 deletions

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@ledgerhq/hw-transport": "6.27.1",
4646
"@ledgerhq/hw-transport-webhid": "6.27.1",
4747
"@ledgerhq/logs": "6.12.0",
48-
"@mayanfinance/swap-sdk": "11.0.1",
48+
"@mayanfinance/swap-sdk": "11.1.0",
4949
"@metaplex-foundation/mpl-token-metadata": "3.4.0",
5050
"@metaplex-foundation/umi": "0.9.2",
5151
"@metaplex-foundation/umi-bundle-defaults": "0.9.2",

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 { 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+
MayanProtocol.WH,
17+
MayanProtocol.MCTP,
18+
MayanProtocol.FAST_MCTP,
19+
MayanProtocol.SWIFT,
20+
MayanProtocol.MONO_CHAIN,
21+
];
22+
}

0 commit comments

Comments
 (0)