oneplusfive555 / pumpfun-cook

Other
11 stars 3 forks source link

bonding curve account not found #1

Closed dekacypher closed 1 month ago

dekacypher commented 1 month ago

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?

                        ============================================================

(node:28903) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2024-08-24T15:03:25.164Z [INFO]: Searching for new tokens ....
2024-08-24T15:03:30.171Z [INFO]: Tokens are being evaluated continuously for sale..
Error fetching price and market cap for VaSAcwn6TpRyehHSqfXtAEqUfD4M6ycXj786EUWpump: Bonding curve account not found
Invalid data for token VaSAcwn6TpRyehHSqfXtAEqUfD4M6ycXj786EUWpump. Skipping...
Error fetching price and market cap for ESvxYmF53BtNjuxNrDHwWfJBPLC7qBTPUjvmkKzrpump: Division by zero
Invalid data for token ESvxYmF53BtNjuxNrDHwWfJBPLC7qBTPUjvmkKzrpump. Skipping...
Error fetching price and market cap for 9zRdtacR9XFP1KJb665MT5bnFWcBJHd3CFujDVnT1u4i: Bonding curve account not found
Invalid data for token 9zRdtacR9XFP1KJb665MT5bnFWcBJHd3CFujDVnT1u4i. Skipping...
Error fetching price and market cap for F2BFp4Lo8w3Nra4dUaabYmbPdGTF6Gwx7FQgwRJtH78v: Bonding curve account not found
Invalid data for token F2BFp4Lo8w3Nra4dUaabYmbPdGTF6Gwx7FQgwRJtH78v. Skipping...
Error fetching price and market cap for GvUpU34JtTfpyAiPfLyemRLWrZQqrMrGbwqkBcmGpump: Division by zero
Invalid data for token GvUpU34JtTfpyAiPfLyemRLWrZQqrMrGbwqkBcmGpump. Skipping...
Error fetching price and market cap for 6wWdXQB3vaXvzZS3f29ufLfaZ35gkHbaKREugEaS9k8E: Division by zero
Invalid data for token 6wWdXQB3vaXvzZS3f29ufLfaZ35gkHbaKREugEaS9k8E. Skipping...
Error fetching price and market cap for 9AHLGLGqZKTuTFynWwoeC1R8QV6X3CQPL54Hnw5aekAz: Bonding curve account not found
Invalid data for token 9AHLGLGqZKTuTFynWwoeC1R8QV6X3CQPL54Hnw5aekAz. Skipping...
Error fetching price and market cap for 3cJLSgAkS7zBWXcj83jB7FuKvhXvxnhLrev6e4Jq5dPL: Bonding curve account not found
oneplusfive555 commented 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 .

dekacypher commented 1 month ago

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...
dekacypher commented 1 month ago

solved it by using Wallet from @coral-xyz/anchor