Raul Guler
Raul Guler

Reputation: 1

Solana/Rust minting error: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x3

I wanted to try to mint my own token on the Solana network using Rust. I have created a wallet holding .07248 SOL I then used rust to create my new Token ID and Token Address. However, when I attempt to mint new tokens using the following command

spl-token mint 5000000000 I get the following error:

RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x3 [5 log messages]

I'm not sure what to make of this error as I believe I have everything I need to run this command successfully. Any help is appreciated.

Upvotes: 0

Views: 4732

Answers (1)

Jon C
Jon C

Reputation: 8462

That error 0x3 corresponds to MintMismatch, which means that the destination account for the tokens was not actually a token account for your mint. Error codes at: https://github.com/solana-labs/solana-program-library/blob/cd8d79a2b4aa4f90c02514d762ab21023449b6cb/token/program/src/error.rs#L22

You'll have to first create a token account to hold the minted tokens. You can go through all of the steps in the docs to create the token account and mint the tokens into it: https://spl.solana.com/token#example-creating-your-own-fungible-token

Upvotes: 0

Related Questions