0

Describe the bug The error there is when I trying mintNft

To Reproduce

const metadataURI = 'https://metadata...'
const myWallet = new Metaplex.NodeWallet(walletKeyPair);
const connection = new Metaplex.Connection('devnet');
const txMasterMint = await Metaplex.actions.mintNFT({
      connection,
      wallet: myWallet,
      uri: metadataURI,
      maxSupply: 0,
    });

Error

This is a complete error message:
```shell
SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 2: Failed to serialize or deserialize account data: Unknown
    at Connection.sendEncodedTransaction (/Users/jeff/web3/studies/solana/metaplex/nft-api/node_modules/@solana/web3.js/lib/index.cjs.js:9088:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Connection.sendRawTransaction (/Users/jeff/web3/studies/solana/metaplex/nft-api/node_modules/@solana/web3.js/lib/index.cjs.js:9054:20) {
  logs: [
    'Program 11111111111111111111111111111111 invoke [1]',
    'Program 11111111111111111111111111111111 success',
    'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]',
    'Program log: Instruction: InitializeMint',
    'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2967 of 1200000 compute units',
    'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success',
    'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s invoke [1]',
    'Program log: Error: BorshIoError',
    'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 4273 of 1197033 compute units',
    'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s failed: Failed to serialize or deserialize account data: Unknown'
  ]
}


**Metaplex Version:**
- `"@metaplex/js": "^4.12.0"`

**Desktop (please complete the following information):**
 - OS: Mac air M1
2
  • Line 3 should be Metaplex.connection('devnet') . That may be the reason? Try making the change
    – Ademola
    Commented May 6, 2023 at 17:28
  • I adding but I have same problem. Commented May 8, 2023 at 17:47

1 Answer 1

1

The @metaplex/js version you are using is very outdated.

Metaplex deprecated some instructions lately to regain space in the token metadata program.

The solution for you should be to upgrade to the newest @metaplex/js version which currently is 0.19.2

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.