0

I have a token whose mint address is a PDA, i.e. the token is completely program-controlled.

That's why, in order to add metadata, I have to use create_metadata_accounts_v3 in Rust.

See the full code here.

After some initial hiccups and awesome help from the community, I was finally get it working on Devnet.

So I was excited to try on Mainnet, only to get this error:

       Sets the token metadata:
     Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Failed to serialize or deserialize account data: Unknown
      at Connection.sendEncodedTransaction (node_modules/@solana/web3.js/lib/index.cjs.js:7891:13)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Connection.sendRawTransaction (node_modules/@solana/web3.js/lib/index.cjs.js:7848:20)
      at async sendAndConfirmRawTransaction (node_modules/@project-serum/anchor/dist/cjs/provider.js:172:23)
      at async AnchorProvider.sendAndConfirm (node_modules/@project-serum/anchor/dist/cjs/provider.js:88:20)
      at async MethodsBuilder.rpc [as _rpcFn] (node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js:15:24)
      at async Context.<anonymous> (tests/tokmeta.js:28:5)

Basically, it boils down to Failed to serialize or deserialize account data: Unknown. I am doing the EXACT same thing as on Devnet. All the accounts exist, in both Devnet and Mainnet, like payer, update authority, mint, mint authority.

The metadata account does NOT exist on both networks, and it get created nicely on Devnet. The payer account has enough funds.

What am I doing wrong?

1 Answer 1

3

I found the issue. In my code, I'm using CreateMetadataAccountsV3, and I just learned from the Metaplex team in Discord that the V3 version hasn't been deployed to Mainnet yet...

I hoped that would been mentioned somewhere in the docs, or in response to some of the previous StackExchange questions I posted.

Also the error message Failed to serialize or deserialize account data: Unknown isn't all too helpful.

Anyway, I reverted back to CreateMetadataAccountsV2, and everything works like a charm now.

When you read this, V3 might have already been deployed to Mainnet...

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.