Skip to content

Instantly share code, notes, and snippets.

@KrisXCorner
KrisXCorner / rpc_fetch_pump_token_price.ts
Created November 6, 2024 13:42 — forked from rubpy/rpc_fetch_pump_token_price.ts
Fetching Pump.fun bonding curve state and calculating price of token/SOL.
import * as web3 from "@solana/web3.js";
//////////////////////////////////////////////////
function readBytes(buf: Buffer, offset: number, length: number): Buffer {
const end = offset + length;
if (buf.byteLength < end) throw new RangeError("range out of bounds");
return buf.subarray(offset, end);
}
I am attesting that this GitHub handle KrisXCorner is linked to the Tezos account tz1cxhmZ1pPcZPB2UzA9myUxz8Lo67pLMoP7 for tzprofiles
sig:edsigtaMZRg1FpXTyFzqsAUvmSMYXCAj4mexy2Xg31y6Pug48GM3WBxJNuKqTfmkA2XcU61nP77seg4iGf6dhDRCpnwuTZ6xZcM