pub struct MintProxy {
pub nonce: u8,
pub hard_cap: u64,
pub proxy_mint_authority: Pubkey,
pub owner: Pubkey,
pub pending_owner: Pubkey,
pub state_associated_account: Pubkey,
pub token_mint: Pubkey,
}
Fields§
§nonce: u8
Nonce for allowing the proxy mint authority to sign.
hard_cap: u64
Maximum number of tokens that can be issued.
Account which is the authority over minted tokens.
owner: Pubkey
Owner account which can perform admin operations.
pending_owner: Pubkey
Next owner account.
state_associated_account: Pubkey
Account key of the state struct.
token_mint: Pubkey
Mint of the token to be minted
Implementations§
Source§impl MintProxy
impl MintProxy
pub fn new( ctx: Context<'_, '_, '_, '_, Initialize<'_>>, nonce: u8, hard_cap: u64, ) -> Result<Self>
Sourcepub fn transfer_ownership(
&mut self,
ctx: Context<'_, '_, '_, '_, Auth<'_>>,
next_owner: Pubkey,
) -> Result<()>
pub fn transfer_ownership( &mut self, ctx: Context<'_, '_, '_, '_, Auth<'_>>, next_owner: Pubkey, ) -> Result<()>
Transfers ownership to another account.
Sourcepub fn accept_ownership(
&mut self,
ctx: Context<'_, '_, '_, '_, Auth<'_>>,
) -> Result<()>
pub fn accept_ownership( &mut self, ctx: Context<'_, '_, '_, '_, Auth<'_>>, ) -> Result<()>
Accepts the new ownership.
Sourcepub fn minter_add(
&self,
ctx: Context<'_, '_, '_, '_, MinterAdd<'_>>,
allowance: u64,
) -> Result<()>
pub fn minter_add( &self, ctx: Context<'_, '_, '_, '_, MinterAdd<'_>>, allowance: u64, ) -> Result<()>
Adds a minter to the mint proxy.
Sourcepub fn minter_update(
&self,
ctx: Context<'_, '_, '_, '_, MinterUpdate<'_>>,
allowance: u64,
) -> Result<()>
pub fn minter_update( &self, ctx: Context<'_, '_, '_, '_, MinterUpdate<'_>>, allowance: u64, ) -> Result<()>
Updates a mint’s allowance.
Sourcepub fn minter_remove(
&self,
ctx: Context<'_, '_, '_, '_, MinterRemove<'_>>,
) -> Result<()>
pub fn minter_remove( &self, ctx: Context<'_, '_, '_, '_, MinterRemove<'_>>, ) -> Result<()>
Removes a minter from the list.
Sourcepub fn perform_mint(
&self,
ctx: Context<'_, '_, '_, '_, PerformMint<'_>>,
amount: u64,
) -> Result<()>
pub fn perform_mint( &self, ctx: Context<'_, '_, '_, '_, PerformMint<'_>>, amount: u64, ) -> Result<()>
Performs a mint.
Makes a different account the mint authority.
Trait Implementations§
Source§impl AccountDeserialize for MintProxy
impl AccountDeserialize for MintProxy
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint
account into a token
Account
.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl AccountSerialize for MintProxy
impl AccountSerialize for MintProxy
Source§impl BorshDeserialize for MintProxy
impl BorshDeserialize for MintProxy
Source§impl BorshSerialize for MintProxy
impl BorshSerialize for MintProxy
Source§impl Discriminator for MintProxy
impl Discriminator for MintProxy
fn discriminator() -> [u8; 8]
Auto Trait Implementations§
impl Freeze for MintProxy
impl RefUnwindSafe for MintProxy
impl Send for MintProxy
impl Sync for MintProxy
impl Unpin for MintProxy
impl UnwindSafe for MintProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more