Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

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

Description

@solremmy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions