Skip to content

Commit

Permalink
test: add test for metatxsettler on mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhu committed Dec 8, 2024
1 parent 348bb96 commit 9e797f6
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions src/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,32 @@ test("parse a swap on Mode (BEAST for ezETH) with Settler", async () => {
});
});

test.todo(
"parse a swap on Mode (ezETH for BEAST) with SettlerMetaTxn",
async () => {}
);
// https://explorer.mode.network/tx/0xbdd6288ff42ccdd63779214c911c0e86debf02ee3bbf1e6f0355d40a8fba1a1f
test("parse a swap on Mode (ezETH for MODE) with SettlerMetaTxn", async () => {
const publicClient = createPublicClient({
chain: mode,
transport: http(
`https://fluent-boldest-water.mode-mainnet.quiknode.pro/${process.env.QUICKNODE_API_KEY}`
),
}) as PublicClient<Transport, Chain>;

const transactionHash = `0xbdd6288ff42ccdd63779214c911c0e86debf02ee3bbf1e6f0355d40a8fba1a1f`;

const result = await parseSwap({
publicClient,
transactionHash,
});

expect(result).toEqual({
tokenIn: {
symbol: "ezETH",
amount: "0.000846925725410518",
address: "0x2416092f143378750bb29b79eD961ab195CcEea5",
},
tokenOut: {
symbol: "MODE",
amount: "60.488654650393620538",
address: "0xDfc7C877a950e49D2610114102175A06C2e3167a",
},
});
});

0 comments on commit 9e797f6

Please sign in to comment.