I want to know causing a solana transfer error

Viewed 20961

My token sending program has met an issue about sending transaction, throwing an error below.

Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1

It is related with sol balance. I want to know what is causing this problem. Is it because there is less sol on the sending side? Or I wonder if it's because the recipient has less sol

2 Answers

This kind of errors are usually listed in error definition files in the public Github repository of the Solana Programs that generate them. If you can't find the error in the Solana Program Library Token program errors, you may be getting an error from the Metaplex Program Library's Token Metadata program, which is also extensively used by different Solana ecosystem tools such as Metaboss.

Remember that you will first need to convert the hex value (that's what the 0x prefix signald). For example, to find Error processing Instruction 4: custom program error: 0x26, I first converted 0x26 to decimal, which is 38, and I then used Chrome's search functionality to find the 39th appearance of the text error(, which resulted in this line:

    #[error("If using a creators array, you must be one of the creators listed")]
    MustBeOneOfCreators,

Now at least you have a more descriptive error to work with.

Related