Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendToken() returns "Transaction simulation failed" error #191

Open
solremmy opened this issue Mar 20, 2022 · 0 comments
Open

sendToken() returns "Transaction simulation failed" error #191

solremmy opened this issue Mar 20, 2022 · 0 comments
Labels

Comments

@solremmy
Copy link

I'm trying to write simple script to send minted NFTs to an address. I'm using actions.mintNFT() function to mint them and actions.sendToken() to transfer. Unfortunately, sendToken() returns "Transaction simulation failed: Error processing Instruction 0: incorrect program id for instruction" error.

To Reproduce
Create simple sendNFT instruction:
const sendNFT = await actions.sendToken({ amount: 1, connection: connection, mint: mintNFTResponse.mint, destination: new PublicKey("<PublicKey>"), source: new PublicKey("<PublicKey>"), wallet: new NodeWallet(keypair) });
Where mintNFTresponse is a response object returned from actions.mintNFT()

Error + Error Logs
Transaction simulation failed: Error processing Instruction 0: incorrect program id for instruction Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL invoke [1] Program log: Transfer 2039280 lamports to the associated token account Program 11111111111111111111111111111111 invoke [2] Program 11111111111111111111111111111111 success Program log: Allocate space for the associated token account Program 11111111111111111111111111111111 invoke [2] Program 11111111111111111111111111111111 success Program log: Assign the associated token account to the SPL Token program Program 11111111111111111111111111111111 invoke [2] Program 11111111111111111111111111111111 success Program log: Initialize the associated token account Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [2] Program log: Instruction: InitializeAccount Program log: Error: IncorrectProgramId Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2796 of 179470 compute units Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: incorrect program id for instruction Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL consumed 23326 of 200000 compute units Program ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL failed: incorrect program id for instruction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant