solana - SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x4

 What does this means - 0x4 - This simply means 

Just by going into this link will uncover it for you

https://github.com/solana-labs/solana-program-library/blob/ea354ab358021aa08f774e2d4028b33ec56d4180/token/program/src/error.rs#L25

And the message is correct, I was able to fix it by providing a valid account of the owner - commented  with // user. 


await transferTokens(
        connection,
        user,
        tokenAccount.address,
        receiverTokenAccount.address,
        user, // user
        50 * 10 ** mintInfo.decimals
    )

Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm