4

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 SPL Token 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. Here's the installed packages when things are working:

$ npm ls @metaplex-foundation/js @solana/spl-token
myapp@1.0.0 /home/mike/Code/myapp
├─┬ @dialectlabs/blockchain-sdk-solana@1.0.0
│ └─┬ @dialectlabs/web3@0.3.2
│   └── @solana/spl-token@0.1.8
├─┬ @metaplex-foundation/js@0.15.0
│ ├─┬ @metaplex-foundation/mpl-token-metadata@2.2.3
│ │ └── @solana/spl-token@0.2.0
│ └── @solana/spl-token@0.2.0
└── @solana/spl-token@0.3.4

When I upgrade metaplex (yes metaplex, even though createMint() is from SPL) from 0.15.0 to it's current version @metaplex-foundation/js@0.17.12, SPL's 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.

Here's the installed packages when things are broken:

myapp@1.0.0 /home/mike/Code/myapp
├─┬ @dialectlabs/blockchain-sdk-solana@1.0.0
│ └─┬ @dialectlabs/web3@0.3.2
│   └── @solana/spl-token@0.1.8
├─┬ @metaplex-foundation/js@0.17.12
│ ├─┬ @metaplex-foundation/mpl-auction-house@2.3.1
│ │ └── @solana/spl-token@0.3.6 deduped
│ ├─┬ @metaplex-foundation/mpl-candy-machine@5.0.0
│ │ └── @solana/spl-token@0.3.6 deduped
│ ├─┬ @metaplex-foundation/mpl-token-metadata@2.5.2
│ │ └── @solana/spl-token@0.3.6 deduped
│ └── @solana/spl-token@0.3.6 deduped
└── @solana/spl-token@0.3.6

If I revert the changes - ie go back to @metaplex-foundation/js@0.15.0 - createMint() works fine again.

How can I update Metaplex without it breaking createMint()?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.