Note there's a similar question at solana token program 0xc Invalid Instruction - but the 'answer' is to simply downgrade metaplex. I (and probably many other people on Solana) would like to use fixes in current version of metaplex
I'm using createMint()
from @solana/spl-token
0.3.4 and it works fine:
import { createMint } from "@solana/spl-token";
const mintAccountPublicKey = await createMint(
connection,
payer,
mintAuthority,
null,
decimals
);
Again, this works fine and creates a mint.
When I upgrade @solana/spl-token
to 0.3.5 (or upgrade Metaplex which upgrades spl-token) createMint()
breaks:
ERRROR failed to send transaction: Transaction simulation failed: Error processing Instruction 1: custom program error: 0xc
I know from error.rs that 0xc is Invalid instruction
.
Update: I have filed the bug with spl. Also note this question was originally tagged with metaplex - the issue only relates to metaplex because metaplex updates spl-token to 0.3.5 or newer. I have removed the metaplex tag as metaplex is not at fault, and edited the question accordingly.