My token is program-controlled, i.e. my mint address (and authority) is a PDA.
For that reason, I have to create code within my Solana Program to add metadata to my token.
While I can easily mint, it has been a weekslong painful endeavor to try to cut through the jungle of metaplex complexities to achieve a simple feat: Add metadata to my token. So that it appears nicely in my customers' Phantom wallets.
I've created a github repo with the essence of the code I'm trying to get to work, see github addMeta.
Here's the error message I'm stuck at:
1) addmeta
Sets the token metadata:
Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: An account required by the instruction is missing
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/addmeta.js:58:5)
See code on github addMeta.
Any help greatly appreciated.
mpl_token_metadata::id()
, but you need to add it to your context.mint
) or "instruction expected an executable account" (for unspecified account). Are there any examples out there on how to call create_metadata_accounts_v3 properly, or at least some documentation that's accurate and includes all necessary accounts?custom program error: 0xb
there. What is custom error 0xb and how can I fix it?