Struct mpl_token_metadata::state::MasterEditionV1
source · [−]#[repr(C)]pub struct MasterEditionV1 {
pub key: Key,
pub supply: u64,
pub max_supply: Option<u64>,
pub printing_mint: Pubkey,
pub one_time_printing_authorization_mint: Pubkey,
}
Fields
key: Key
supply: u64
max_supply: Option<u64>
printing_mint: Pubkey
Can be used to mint tokens that give one-time permission to mint a single limited edition.
If you don’t know how many printing tokens you are going to need, but you do know you are going to need some amount in the future, you can use a token from this mint. Coming back to token metadata with one of these tokens allows you to mint (one time) any number of printing tokens you want. This is used for instance by Auction Manager with participation NFTs, where we dont know how many people will bid and need participation printing tokens to redeem, so we give it ONE of these tokens to use after the auction is over, because when the auction begins we just dont know how many printing tokens we will need, but at the end we will. At the end it then burns this token with token-metadata to get the printing tokens it needs to give to bidders. Each bidder then redeems a printing token to get their limited editions.
Implementations
sourceimpl MasterEditionV1
impl MasterEditionV1
pub fn from_account_info(
a: &AccountInfo<'_>
) -> Result<MasterEditionV1, ProgramError>
Trait Implementations
sourceimpl BorshDeserialize for MasterEditionV1 where
Key: BorshDeserialize,
u64: BorshDeserialize,
Option<u64>: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
impl BorshDeserialize for MasterEditionV1 where
Key: BorshDeserialize,
u64: BorshDeserialize,
Option<u64>: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
sourceimpl BorshSerialize for MasterEditionV1 where
Key: BorshSerialize,
u64: BorshSerialize,
Option<u64>: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
impl BorshSerialize for MasterEditionV1 where
Key: BorshSerialize,
u64: BorshSerialize,
Option<u64>: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
sourceimpl Clone for MasterEditionV1
impl Clone for MasterEditionV1
sourcefn clone(&self) -> MasterEditionV1
fn clone(&self) -> MasterEditionV1
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MasterEditionV1
impl Debug for MasterEditionV1
sourceimpl MasterEdition for MasterEditionV1
impl MasterEdition for MasterEditionV1
fn key(&self) -> Key
fn supply(&self) -> u64
fn max_supply(&self) -> Option<u64>
fn set_supply(&mut self, supply: u64)
fn save(&self, account: &AccountInfo<'_>) -> ProgramResult
sourceimpl PartialEq<MasterEditionV1> for MasterEditionV1
impl PartialEq<MasterEditionV1> for MasterEditionV1
sourcefn eq(&self, other: &MasterEditionV1) -> bool
fn eq(&self, other: &MasterEditionV1) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MasterEditionV1) -> bool
fn ne(&self, other: &MasterEditionV1) -> bool
This method tests for !=
.
impl StructuralPartialEq for MasterEditionV1
Auto Trait Implementations
impl RefUnwindSafe for MasterEditionV1
impl Send for MasterEditionV1
impl Sync for MasterEditionV1
impl Unpin for MasterEditionV1
impl UnwindSafe for MasterEditionV1
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more