spl-token initialize-metadata Bk8e....xyzK "NAME of Token" "SYMBOL" "https://raw.githubusercontent.com/xxx/TOKEN.json" --url https://api.mainnet-beta.solana.com

I've tried so many times with different methods but it keeps failing. I've tried python with another method but keep getting method not found using update-metadata.

Error: Client(Error { request: Some(SendTransaction), kind: RpcError(RpcResponseError { code: -32002, message: "Transaction simulation failed: Error processing Instruction 1: custom program error: 0xc", data: SendTransactionPreflightFailure(RpcSimulateTransactionResult { err: Some(InstructionError(1, Custom(12))), logs: Some(["Program 11111111111111111111111111111111 invoke [1]", "Program 11111111111111111111111111111111 success", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]", "Program log: Error: Invalid instruction", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 863 of 399850 compute units", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: custom program error: 0xc"]), accounts: None, units_consumed: Some(150), return_data: None }) }) })

1 Answer 1


Your token was created against spl-token, and not spl-token-2022. Only spl-token-2022 supports metadata inside the mint.

You can create a token with metadata on spl-token-2022 using the following command:

$ spl-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token --enable-metadata

After that, your command will work.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.