Closed dekacypher closed 1 month ago
The bonding curve issue is mostly related to the sdk I used, the developer said he’ll fix and release new version , which I’m not sure if he did . You can use pumpfun api ko get price/marketcap . Sometimes it’s also related to RCP (if you’re using public and do too many request .
Hi, again. I'm running into another issue, I'm completely new to typescript so bear with me, it seems like a relatively easy bug but nothing seems to work on it. Could you please help me with this?
After i've created a backtesting script, and then had some issues. So 'm now running the script with npx tsx src/bot.ts
after making some adjustments to package.json
:
"type": "module",
"compilerOptions": {
"esModuleInterop": true
}
Here's the relevant part of pandM.ts:
import { Connection, PublicKey,Keypair} from '@solana/web3.js';
import { BondingCurveAccount, PumpFunSDK } from 'pumpdotfun-sdk';
import dotenv from 'dotenv';
import {AnchorProvider} from '@coral-xyz/anchor';
import NodeWallet from '@coral-xyz/anchor/dist/cjs/nodewallet';
Traceback:
Debugger attached.
> pumpfuncook@1.0.0 start
> npx tsx src/bot.ts
Debugger attached.
Debugger attached.
Debugger attached.
Waiting for the debugger to disconnect...
/Users/anon/Documents/GitHub/pumpfun-cook/src/PandM.ts:12
const wallet = new NodeWallet(keypair); // or use an existing Keypair
^
TypeError: NodeWallet is not a constructor
at <anonymous> (/Users/anon/Documents/GitHub/pumpfun-cook/src/PandM.ts:12:16)
at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)
Node.js v22.6.0
Waiting for the debugger to disconnect...
Waiting for the debugger to disconnect...
Waiting for the debugger to disconnect...
solved it by using Wallet from @coral-xyz/anchor
after saving the tokens i want to analyze in assets.txt and i use
npm run start
. I receive this error, how to fix it?