3

I'm writing code to mint an edition NFT from a master using metaplex. The problem is when I call mint_new_edition_from_master_edition_via_token() it has a parameter called "metadata_mint" and I have no idea what to pass in here. Here's my code:

    pub fn create_edition_nft(
        ctx: Context<CreateNewEdition>,
        edition: u64,
    ) -> Result<()> {

        let edition_info = vec![
            ctx.accounts.token_program.to_account_info(),
            ctx.accounts.new_metadata.to_account_info(),
            ctx.accounts.new_edition.to_account_info(),
            ctx.accounts.master_edition.to_account_info(),
            ctx.accounts.new_mint.to_account_info(),
            ctx.accounts.new_mint_authority.to_account_info(),
            ctx.accounts.payer.to_account_info(),
            ctx.accounts.token_account_owner.to_account_info(),
            ctx.accounts.token_account.to_account_info(),
            ctx.accounts.new_metadata_update_authority.to_account_info(),
            ctx.accounts.metadata.to_account_info(),
            ctx.accounts.system_program.to_account_info(),
            ctx.accounts.rent.to_account_info(),
        ];

        msg!("Edition account info added");
        invoke(&mint_new_edition_from_master_edition_via_token(
            ctx.accounts.token_program.key(), // program_id
            ctx.accounts.new_metadata.key(), // new metadata
            ctx.accounts.new_edition.key(), //new_edition,
            ctx.accounts.master_edition.key(), // master_edition,
            ctx.accounts.new_mint.key(), // new_mint,
            ctx.accounts.new_mint_authority.key(), // new_mint_authority,
            ctx.accounts.payer.key(), // payer,
            ctx.accounts.token_account_owner.key(), // token_account_owner,
            ctx.accounts.token_account.key(), // token_account
            ctx.accounts.new_metadata_update_authority.key(), // new_metadata_update_authority,
            ctx.accounts.metadata.key(), // metadata,
            ctx.accounts.metadata.key(), // Placeholder - need to figure out what goes here (metadata mint?)
            edition, // what edition number
        ), &edition_info.as_slice())?;

        Ok(())
    }

Right now I'm just passing in metadata even though it's not the same thing. Would appreciate any help here!

3 Answers 3

1

It seems like metadata_mint and metadata could be referring to the mint/metadata accounts of the original master edition.

So the metadata_mint might be the mint address used to derive the address for the metadata account.

1

metadata_mint means the mint of the master edition nft. It just has a bit of a weird name. Treat it as if it was named master_edition_mint.

-1

When minting a new edition of a non-fungible token (NFT) from a master edition, "metadata mint" refers to the process of creating unique metadata for the new edition.

Metadata refers to any additional information that is associated with an NFT, such as a title, description, image, or other attributes. When creating a new edition of an NFT, it is important to ensure that the metadata for each edition is unique and accurately reflects the specific attributes of that edition.

The metadata minting process typically involves creating a new set of metadata that is specific to the new edition being created. This may involve modifying or updating the metadata that was associated with the original master edition, or creating entirely new metadata from scratch.

Once the metadata has been created, it can be associated with the new edition of the NFT, allowing it to be uniquely identified and distinguished from other editions or variations of the same NFT.

In the context of Solana, metadata for NFTs is often stored on the Arweave network, which provides a decentralized and permanent storage solution for blockchain-based data. The Solana blockchain can then reference this metadata to provide additional information about each NFT and help ensure that each edition is unique and accurately represented.

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.