Skip to content

Burning non-printable NFTs causes error "Missing edition account" (0xb3) #163

Open
@ValeryDubrava

Description

@ValeryDubrava

NFT minted this way:

CreateCpiBuilder::new(mpl_program)
        .metadata(metadata_pda)
        .master_edition(Some(master_pda))
        .payer(payer)
        .system_program(system_program)
        .authority(vault)
        .update_authority(vault, true)
        .mint(mint, true)
        .create_args(CreateArgs::V1 {
            name: name,
            uri: uri,
            symbol: state.name.clone(),
            seller_fee_basis_points: 600,
            primary_sale_happened: false,
            is_mutable: false,
            token_standard: TokenStandard::NonFungible,
            collection: None,
            collection_details: None,
            creators: Some(vec![Creator {
                address: *vault.key,
                verified: true,
                share: 100,
            }]),
            decimals: None,
            print_supply: Some(PrintSupply::Zero),
            rule_set: None,
            uses: None,
        })
        .spl_token_program(Some(spl_program))
        .sysvar_instructions(sysvar_instructions)
        .invoke_signed(&seed)?;

    msg!("Mint token.");

    MintCpiBuilder::new(mpl_program)
        .payer(payer)
        .mint(mint)
        .metadata(metadata_pda)
        .master_edition(Some(master_pda))
        .system_program(system_program)
        .authority(vault)
        .token(destination_ata)
        .token_owner(Some(payer))
        .spl_token_program(spl_program)
        .sysvar_instructions(sysvar_instructions)
        .mint_args(MintArgs::V1 {amount: 1, authorization_data: None})
        .spl_ata_program(ata_program)
        .invoke_signed(&seed)?;

And then burning this way:

BurnCpiBuilder::new(mpl_program)
        .spl_token_program(spl_program)
        .authority(receiver)
        .burn_args(BurnArgs::V1 {amount: 1})
        .sysvar_instructions(sysvar_program)
        .system_program(system_program)
        .mint(ticket_mint)
        .token(ata)
        .metadata(metadata)
        .master_edition(Some(mater_edition))
        .invoke_signed(&[seed])?;

The burning cases error "Missing edition account" (0xb3)
But if master_edition replaces with edition it works, but master_edition account remains undeleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions