@@ -18,6 +18,8 @@ import {
1818 mantle ,
1919 worldchain ,
2020 berachain ,
21+ bsc ,
22+ celo ,
2123} from "viem/chains" ;
2224import { vi , test , expect } from "vitest" ;
2325import { parseSwap } from "../index" ;
@@ -260,9 +262,9 @@ test("throws an error for unsupported chains)", async () => {
260262 "0x615c5089f772a8f2074750e8c6070013d288af7681435aba1771f6bfc63d1286" ;
261263
262264 const publicClient = createPublicClient ( {
263- chain : mainnet ,
265+ chain : celo ,
264266 transport : http ( "https://rpc.ankr.com/celo" ) ,
265- } ) ;
267+ } ) as unknown as PublicClient < Transport , Chain > ;
266268
267269 await expect ( async ( ) => {
268270 await parseSwap ( {
@@ -677,7 +679,7 @@ test("parse a gasless swap on Optimism (USDC for OP) for execute", async () => {
677679
678680test ( "parse a swap on BNB Chain (ETH for USDC) for execute" , async ( ) => {
679681 const publicClient = createPublicClient ( {
680- chain : optimism ,
682+ chain : bsc ,
681683 transport : http (
682684 `https://bnb-mainnet.g.alchemy.com/v2/${ process . env . ALCHEMY_API_KEY } `
683685 ) ,
@@ -915,7 +917,7 @@ test("parse a swap on Polygon (USDC for WPOL) with smart contract wallet", async
915917// https://bscscan.com/tx/0xfd4730866f81a7007a586c21b97f56d3f1e62bbba7ebb65e52032676466a8ec1
916918test ( "parse a swap on BNB Chain (BNB for USDT) with smart contract wallet" , async ( ) => {
917919 const publicClient = createPublicClient ( {
918- chain : optimism ,
920+ chain : bsc ,
919921 transport : http (
920922 `https://bnb-mainnet.g.alchemy.com/v2/${ process . env . ALCHEMY_API_KEY } `
921923 ) ,
@@ -946,7 +948,7 @@ test("parse a swap on BNB Chain (BNB for USDT) with smart contract wallet", asyn
946948// https://bscscan.com/tx/0x5f8839d369b61c5325a4f5406f55e26310722744aa3177b62924e077cb705432
947949test ( "parse a swap on BNB Chain (USDT for BNB) with smart contract wallet" , async ( ) => {
948950 const publicClient = createPublicClient ( {
949- chain : optimism ,
951+ chain : bsc ,
950952 transport : http (
951953 `https://bnb-mainnet.g.alchemy.com/v2/${ process . env . ALCHEMY_API_KEY } `
952954 ) ,
@@ -1118,9 +1120,9 @@ test("parse a swap on Blast (ETH for ezETH) with execute", async () => {
11181120// https://mantlescan.xyz/tx/0xbd89bd8f580e5606c046feac8b0d72e321009cfed361c9919eb4845999ea79a4
11191121test ( "parse a swap on Mantle (WETH for mETH) with execute" , async ( ) => {
11201122 const publicClient = createPublicClient ( {
1121- chain : blast ,
1123+ chain : mantle ,
11221124 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 } / `
11241126 ) ,
11251127 } ) as PublicClient < Transport , Chain > ;
11261128
@@ -1146,11 +1148,11 @@ test("parse a swap on Mantle (WETH for mETH) with execute", async () => {
11461148} ) ;
11471149
11481150// 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 ( ) => {
11501152 const publicClient = createPublicClient ( {
11511153 chain : mantle ,
11521154 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 } / `
11541156 ) ,
11551157 } ) ;
11561158
0 commit comments