1

I am trying the SPL Token Program to configure the metadata for the token deployed on DevNet. I have validated the token mint address. It is displaying the following error. Could you please help to understand this issue.

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(1013), return_data: None }) }) })

1 Answer 1

1

Looks like you are trying to initialize token meta data with the old token program. Tokenkeg... is the old program.

The Token Extensions program has the programID TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb and is a superset of the original functionality provided by the Token Program at TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.

So in your case you probably need to add the token program id. Probably something like this:

spl-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb create-token --enable-metadata
spl-token initialize-metadata EBF22st7gRqvKtEYW2WomsHUsNrjtPcZvpDAnh6W7Ugu Snail SLUG https://github.com/solana-developers/solana-game-examples
spl-token create-account EBF22st7gRqvKtEYW2WomsHUsNrjtPcZvpDAnh6W7Ugu
spl-token mint EBF22st7gRqvKtEYW2WomsHUsNrjtPcZvpDAnh6W7Ugu 100
spl-token update-metadata EBF22st7gRqvKtEYW2WomsHUsNrjtPcZvpDAnh6W7Ugu Snail SLUG https://shdw-drive.genesysgo.net/AzjHvXgqUJortnr5fXDG2aPkp2PfFMvu4Egr57fdiite/PirateCoinMeta
```

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.