Error when trying to mint new token?

Hey guys, I’m very new to Solana and basically just wanted to try creating my own token based off of Solana. I have installed Rust and all of the other prereqs. I have my token created and account, but when I want to mint using the command spl-token mint my token ID, the amount to be minted, my token account number

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

Any help would appreciated. Thanks!

1 Like

Hi @Driverx2030 and welcome to the forum! :wave:

What version of the Solana do you have installed, and what network are you connected to?

I was able to connect create a token and mint some with this Solana config:

➜ solana --version
solana-cli 1.7.15 (src:4892eb4e; feat:2995838076)

~ 
➜ solana config get
RPC URL: https://api.testnet.solana.com 
WebSocket URL: wss://api.testnet.solana.com/ (computed)

Having the same issue on both devnet and mainnet

image

Hi @customD and welcome to the forum! :wave:

I’m not connected to either network right now so I can’t test it, but maybes try running solana-install update if you haven’t already and see if that helps.

I just ran the update and it’s giving me version 1.9.4, so your version looks too new maybe.

Thank you for the quick response, @zicklag. will that command move my version back (or is there a way to do that)?

@zicklag Also, I’m on a Windows machine

I was able to go to 1.9.4 and still receiving the same error

That’s strange what do you see if you run spl-token --version?

I have a version based on 2.0.15.

I’m at the same 2.0.15

In your powershell prompt try running this command to set the log level to debug for that terminal session:

$env:RUST_LOG = 'debug'

Then try running the spl-token command again, and see what that shows. That might give us more info on what the error is about.

@zicklag I resolved my issue. I was trying to use the same address as was already being used for my wallet. Once a created a new vanity address, I was able to create. Thank you for your help!

2 Likes

Awesome, glad you got it working!

I had this same issue. For me the problem seemed to be that I had funds in the token account. To resolve I created a new account for the token, didn’t add any funds and the command executed without issue.

1 Like

I’m also having this issue, but I got a different error message. I successfully built the token and account however, I get an invalid value for ‘token_amount’, unable to parse input amount as integer or float… ‘token_address’ no such file or directory (os error 2). Anyone know what I should do here?
Using Windows CMD

Hi @Xtina and welcome to the forum! :wave:

I think you might be getting the commandline arguments in the wrong order or something similar. Could you post the command that you are trying to run exactly?

Hi zicklag, thanks for responding! I was able to progress, I am now stuck on the merge. I’ve resized my logo and tried to replace the link in the json, but honestly, I am self-taught and really think I have finally reached the point where I am in over my head. Looking for someone to collab with.

Okay im having the same issue, I created a vanity address but get “Account could not be parsed as token account”. When Minting to my orginal address i get the RPC response error -32002: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x3 [5 log messages]

I’d love to help, but I’m going to be really busy, and for now I’m not working on adding new Solana tokens. Still here’s an explanation of some of the process that might help, or you might be able to find someone else who’s able to help:

for example, I’m going to show you an example token list JSON file that has only one token in it:

{
  "tokens": [
    {
      "extensions": {},
      "chainId": 1,
      "address": "sQi7G1QSRjzBxx3TXR9ebfG5iv5KrS6S5Gx2bEqe6YD",
      "decimals": 9,
      "name": "ASDF Token",
      "symbol": "ASDF",
      "logoURI": "http://example.com/mylogo.png"
    }
  ],
  "name": "Test Token List",
  "timestamp": "2021-01-01T06:00:00.000Z",
  "version": {
    "major": 0,
    "minor": 3,
    "patch": 3
  },
}

The order of some of the items might be different in the Solana list, but that doesn’t matter.

What you are looking for is the "tokens": [ section.

You want to add your token at the end of of the last token in the list where the arrow shows here:

For instance, if we wanted to now add a QWERTY token, we could do this:

{
  "tokens": [
    {
      "extensions": {},
      "chainId": 1,
      "address": "sQi7G1QSRjzBxx3TXR9ebfG5iv5KrS6S5Gx2bEqe6YD",
      "decimals": 9,
      "name": "ASDF Token",
      "symbol": "ASDF",
      "logoURI": "http://example.com/mylogo.png"
    },
    { <--- We added our token here, your commit should only show green,
           with this section added
      "extensions": {},
      "chainId": 1,
      "address": "FFio4mFpctNhzfb6uV6WBiTvr7xy5nDXZVMTQqXABZaD",
      "decimals": 9,
      "name": "QWERTY Token",
      "symbol": "QWERTY",
      "logoURI": "http://example.com/mylogo2.png"
    }
  ],
  "name": "Test Token List",
  "timestamp": "2021-01-01T06:00:00.000Z",
  "version": { <----- Don't change anything here
    "major": 0,
    "minor": 3,
    "patch": 3
  },
} <----- Don't change anything here

I don’t know what the chain id or other values are supposed to be set to, I haven’t looked into it, but that should give the idea of what you are trying to change, hopefully.

Also, I’ve heard about some users using web VSCode editors and one user said they couldn’t get it to merge right when using Brave, but they were able to get working when using Microsoft Edge for some reason, so maybe that’s something to try if you run into weird failures.

Hi @CookieGem and welcome to the forum. :wave:

Could you post the commands that you are trying to run exactly, along with the errors that they are printing?

1 Like