I am trying to attach metadata uploaded to arweave to a token. I am using createCreateMetadataAccountV3Instruction
from @metaplex-foundation/mpl-token-metadata, but I am getting an error.
This is the fc
createCreateMetadataAccountV3Instruction(
{
metadata: pda,
mint: mintKeypair.publicKey,
mintAuthority: mintAuthority,
payer: payer.publicKey,
updateAuthority: mintAuthority,
},
{
createMetadataAccountArgsV3: {
data: ON_CHAIN_METADATA,
isMutable: true,
collectionDetails: null,
},
}
)
what I am unsure of
where to get pda? All I'm doing rn is
const pda = await metaplex.nfts().pdas().metadata({ mint: wallet.publicKey });
but I am not sure this is the correct waywhat is
collectionDetails: null
? I put null because I do not know
ERROR I am getting:
'Program log: IX: Create Metadata Accounts v3',
"Program log: panicked at 'range end index 36 out of range for slice of length 0', library/core/src/slice/index.rs:73:5",
'Program metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s consumed 7998 of 972240 compute units',