@@ -18,6 +18,8 @@ import {
18
18
mantle ,
19
19
worldchain ,
20
20
berachain ,
21
+ bsc ,
22
+ celo ,
21
23
} from "viem/chains" ;
22
24
import { vi , test , expect } from "vitest" ;
23
25
import { parseSwap } from "../index" ;
@@ -260,9 +262,9 @@ test("throws an error for unsupported chains)", async () => {
260
262
"0x615c5089f772a8f2074750e8c6070013d288af7681435aba1771f6bfc63d1286" ;
261
263
262
264
const publicClient = createPublicClient ( {
263
- chain : mainnet ,
265
+ chain : celo ,
264
266
transport : http ( "https://rpc.ankr.com/celo" ) ,
265
- } ) ;
267
+ } ) as unknown as PublicClient < Transport , Chain > ;
266
268
267
269
await expect ( async ( ) => {
268
270
await parseSwap ( {
@@ -677,7 +679,7 @@ test("parse a gasless swap on Optimism (USDC for OP) for execute", async () => {
677
679
678
680
test ( "parse a swap on BNB Chain (ETH for USDC) for execute" , async ( ) => {
679
681
const publicClient = createPublicClient ( {
680
- chain : optimism ,
682
+ chain : bsc ,
681
683
transport : http (
682
684
`https://bnb-mainnet.g.alchemy.com/v2/${ process . env . ALCHEMY_API_KEY } `
683
685
) ,
@@ -915,7 +917,7 @@ test("parse a swap on Polygon (USDC for WPOL) with smart contract wallet", async
915
917
// https://bscscan.com/tx/0xfd4730866f81a7007a586c21b97f56d3f1e62bbba7ebb65e52032676466a8ec1
916
918
test ( "parse a swap on BNB Chain (BNB for USDT) with smart contract wallet" , async ( ) => {
917
919
const publicClient = createPublicClient ( {
918
- chain : optimism ,
920
+ chain : bsc ,
919
921
transport : http (
920
922
`https://bnb-mainnet.g.alchemy.com/v2/${ process . env . ALCHEMY_API_KEY } `
921
923
) ,
@@ -946,7 +948,7 @@ test("parse a swap on BNB Chain (BNB for USDT) with smart contract wallet", asyn
946
948
// https://bscscan.com/tx/0x5f8839d369b61c5325a4f5406f55e26310722744aa3177b62924e077cb705432
947
949
test ( "parse a swap on BNB Chain (USDT for BNB) with smart contract wallet" , async ( ) => {
948
950
const publicClient = createPublicClient ( {
949
- chain : optimism ,
951
+ chain : bsc ,
950
952
transport : http (
951
953
`https://bnb-mainnet.g.alchemy.com/v2/${ process . env . ALCHEMY_API_KEY } `
952
954
) ,
@@ -1118,9 +1120,9 @@ test("parse a swap on Blast (ETH for ezETH) with execute", async () => {
1118
1120
// https://mantlescan.xyz/tx/0xbd89bd8f580e5606c046feac8b0d72e321009cfed361c9919eb4845999ea79a4
1119
1121
test ( "parse a swap on Mantle (WETH for mETH) with execute" , async ( ) => {
1120
1122
const publicClient = createPublicClient ( {
1121
- chain : blast ,
1123
+ chain : mantle ,
1122
1124
transport : http (
1123
- `https://mantle-mainnet.g.alchemy.com/v2/ ${ process . env . ALCHEMY_API_KEY } `
1125
+ `https://blissful-snowy-owl. mantle-mainnet.quiknode.pro/ ${ process . env . QUICKNODE_MANTLE_API_KEY } / `
1124
1126
) ,
1125
1127
} ) as PublicClient < Transport , Chain > ;
1126
1128
@@ -1146,11 +1148,11 @@ test("parse a swap on Mantle (WETH for mETH) with execute", async () => {
1146
1148
} ) ;
1147
1149
1148
1150
// https://mantlescan.xyz/tx/0x504118136b57d7a1ef7b3674505c32bf9d8d3df9c7991a9ee627f9883257dc38
1149
- test ( "parse a swap on Mode (USDC for MNT) with SettlerMetaTxn" , async ( ) => {
1151
+ test ( "parse a swap on Mantle (USDC for MNT) with SettlerMetaTxn" , async ( ) => {
1150
1152
const publicClient = createPublicClient ( {
1151
1153
chain : mantle ,
1152
1154
transport : http (
1153
- `https://mantle-mainnet.g.alchemy.com/v2/ ${ process . env . ALCHEMY_API_KEY } `
1155
+ `https://blissful-snowy-owl. mantle-mainnet.quiknode.pro/ ${ process . env . QUICKNODE_MANTLE_API_KEY } / `
1154
1156
) ,
1155
1157
} ) ;
1156
1158
0 commit comments