Solana - Error processing Instruction 0: custom program error: 0x1

When attempting to send an SPL token, you may face an error looking as follows or similar:

{
    "statusCode": 403,
    "errorCode": "erc20.transfer.error",
    "message": "Failed to transfer the token",
    "cause": "failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1",
    "dashboardLog": "https://dashboard.tatum.io/logs?id=###"
}

This error indicates that the sending token account does not have sufficient funds to complete the transaction.

  • 0x1 = InsufficientFunds
  • If your sender's address has enough tokens, it’s possible that you used the wrong PrivateKey to sign the transaction.

📘

Additional information is available in the Offical Solana GitHub.

Good to Know

Solana errors are usually documented in the error definition file located in the Official Solana GitHub repository of the Solana Programs that generate them.

If you cannot find the error in the Solana Program Library's token program, the error may be coming from the Metaplex Program Library's Token Metadata program. This program is widely used by various tools in the Solana ecosystem, such as Metaboss.

  • Remember that you first need to convert the hexadecimal value (indicated by the 0x prefix) to a decimal number.
  • For example, to identify the error from Instruction 4: custom program error: 0x26, first convert 0x26 to its decimal equivalent, which is 38. Then, use your browser's search functionality to find the corresponding error message in the error definition file. In this case, you would look for the 39th occurrence of the text “error”, which might result in a line like this:
#[error("If using a creators array, you must be one of the creators listed")]
MustBeOneOfCreators,