rckprtr/pumpdotfun-sdk

How can I buy token created by someone on pumpfun?

Closed this issue · 2 comments

Let's say ABC is my wallet that has some sols.
This is the token URL https://pump.fun/BivBq2jUr4zd9XvH683Dzm814mJ3VMECpoUb2byEpump.
How can I create a mint keypair from the existing token?

const mint = getOrCreateKeypair(KEYS_FOLDER, "mint");

Like in this line of code, you generate a new mint for creating the new token. But in my case, I want to buy a token created by someone else.

Yes, the mint of the token is let mint = new Publickey('BivBq2jUr4zd9XvH683Dzm814mJ3VMECpoUb2byEpump') so just purchase that token at that address.

Here is one more question: I made a buy transaction that took too long with default parameters like slippage and priorities. How I can make it up fast and how much cost it will effects?
Screenshot 2024-07-20 at 2 12 12 AM