rckprtr/pumpdotfun-sdk

Can this SDK be used to buy tokens for another user ?

Closed this issue · 9 comments

Extremely new to Solana and so do not understand a lot of things happening under the hood and also the way a Solana tx works.
I wanted to know if this awesome SDK can also be used to place trades on behalf of people ?
I had no other way to ask this rather than this issue so apologize for that. @rckprtr

So a user selects a token X and I want to place an order for the user, so is there an option where this is possible or does it automatically only mint to the address which calls the contract ?

If you can also share an small snippet on how I can do this with just the user's address and not the signer, it would be greatly appreciated.

Thanks and great work on the SDK again.

Hmmm! maybe...

The address of the receiver of the token actually the associatedUser which I automatically derive based on the user address here. It might be possible to change the getBuyInstruction here to pass in a different users PDA to do this to receive tokens to that address while the person who is paying the SOL to buy the token is different, really depends on how they setup the program which is closed source.

The signer is most likely required to be the user enforced by the Solana program. This is an interesting use case though.'

The SPL token you receive at the end of a transaction is transferable (I believe), it might be possible to perform the purchase and then transfer the token to a different user all with a single transaction to Solana.

The transaction might look like:

1. Buy Token with your Solana and Receive Token to your Token Address
2. Create Associated Token Address for New User
3. Transfer Tokens to New User

Wow thanks a lot for the detailed answer.
Really really appreciate it.
Will check this out tonight and will try to run it this week.

Thanks a lot again and great project once again.

If you do not mind, can you please keep the issue open till this weekend? It would just help me reach out with the same context.

Thanks.

I can't use the SDK to do the create and buy pump token

I can't use the SDK to do the create and buy pump token

What is the issue?

I can't use the SDK to do the create and buy pump token

What is the issue?

I fixed already and I can create and buy now and I integrate jito lol

I can't use the SDK to do the create and buy pump token

What is the issue?

I fixed already and I can create and buy now and I integrate jito lol

Nice! share some code, ill add it to the repo

I can't use the SDK to do the create and buy pump token

What is the issue?

I fixed already and I can create and buy now and I integrate jito lol

Nice! share some code, ill add it to the repo

Maybe we can DM each other at tg or discord

rckprtr on telegram and discord.

rckprtr on telegram and discord.

I sent you a dm on telegram