Skip to content

Commit

Permalink
update provider
Browse files Browse the repository at this point in the history
  • Loading branch information
none00y committed Nov 15, 2024
1 parent 724debe commit 446b2f6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/solana/tickers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { VercelRequest, VercelResponse } from "@vercel/node";
import {
PoolStatsData,
} from "../utils"
import { BN, Provider } from "@project-serum/anchor";
import { BN, Provider, Wallet } from "@project-serum/anchor";
import { getMarketAddress, Market, Network } from "@invariant-labs/sdk";
import { PublicKey } from "@solana/web3.js";
import { Connection, Keypair, PublicKey } from "@solana/web3.js";
import { PoolStructure } from "@invariant-labs/sdk/lib/market";
import { PoolSnapshot, printBN } from "../utils";
import data from "../../data/mainnet.json"
Expand Down Expand Up @@ -52,7 +52,10 @@ export default async function (req: VercelRequest, res: VercelResponse) {
"9uzQcsaW74EQqSx9z15xBghF7B1a4xE8tMVifeZL71pH", // MUMU/USDC 1%
];

const provider = Provider.local("https://mainnet.helius-rpc.com/?api-key=6f17ef70-139f-463a-bfaa-85a120eee8d3");
const connection = new Connection("https://mainnet.helius-rpc.com/?api-key=6f17ef70-139f-463a-bfaa-85a120eee8d3")
const keypair = new Keypair;
const wallet = new Wallet(keypair);
const provider = new Provider(connection,wallet, {})

const network = Network.MAIN;
const market = await Market.build(
Expand Down

0 comments on commit 446b2f6

Please sign in to comment.