im define in account context but give me error
#[account(mut)]
pub master_edition : Account<'info, mpl_token_metadata::state::MasterEditionV2>,
but it show error lint like this :
the trait bound `mpl_token_metadata::state::MasterEditionV2: anchor_lang::AccountSerialize` is not satisfied
the following other types implement trait `anchor_lang::AccountSerialize`:
so im try to unpack manually with :
let master_edition = MasterEditionV2::from_account_info(
&ctx.accounts.master_edition.to_account_info()
);
match master_edition {
Ok(data) => {
msg!("[master_edition] owner {:?}", ctx.accounts.master_edition.owner);
msg!("[master_edition] key {:?}", ctx.accounts.master_edition.key);
msg!("[master_edition] [unpack] max_supply {:?}", data.max_supply);
msg!("[master_edition] [unpack] supply {:?}", data.supply);
msg!("[master_edition] [unpack] key {:?}", data.key);
},
Err(err) => {
msg!("[master_edition] error {:?}", err);
}
}
but give me error when transaction running :
[master_edition] error Custom(63)
what i miss something? thanks for alll help