pub trait MintCustomizer {
// Required methods
fn get_token_2022_mint_space() -> Result<usize, ProgramError>;
fn get_freeze_auth_and_decimals(
unwrapped_mint_account: &AccountInfo<'_>,
) -> Result<(Option<Pubkey>, u8), ProgramError>;
// Provided method
fn initialize_extensions(
_wrapped_mint_account: &AccountInfo<'_>,
_wrapped_token_program_account: &AccountInfo<'_>,
) -> ProgramResult { ... }
}Expand description
The interface for customizing attributes of the new wrapped mint.
Required Methods§
Sourcefn get_token_2022_mint_space() -> Result<usize, ProgramError>
fn get_token_2022_mint_space() -> Result<usize, ProgramError>
Calculates the space required for a new spl-token-2022 mint account, including any custom extensions
Sourcefn get_freeze_auth_and_decimals(
unwrapped_mint_account: &AccountInfo<'_>,
) -> Result<(Option<Pubkey>, u8), ProgramError>
fn get_freeze_auth_and_decimals( unwrapped_mint_account: &AccountInfo<'_>, ) -> Result<(Option<Pubkey>, u8), ProgramError>
Customize the freeze authority and decimals for the wrapped mint
Provided Methods§
Sourcefn initialize_extensions(
_wrapped_mint_account: &AccountInfo<'_>,
_wrapped_token_program_account: &AccountInfo<'_>,
) -> ProgramResult
fn initialize_extensions( _wrapped_mint_account: &AccountInfo<'_>, _wrapped_token_program_account: &AccountInfo<'_>, ) -> ProgramResult
Customizes extensions for the wrapped mint before the base mint is
initialized. This is for extensions that must be initialized on an
uninitialized mint account, like ConfidentialTransferMint.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.