#[repr(u8)]pub enum ScaledUiAmountMintInstruction {
Initialize = 0,
UpdateMultiplier = 1,
}
Expand description
Interesting-bearing mint extension instructions
Variants§
Initialize = 0
Initialize a new mint with scaled UI amounts.
Fails if the mint has already been initialized, so must be called before
InitializeMint
.
Fails if the multiplier is less than or equal to 0 or if it’s subnormal.
The mint must have exactly enough space allocated for the base mint (82 bytes), plus 83 bytes of padding, 1 byte reserved for the account type, then space required for this extension, plus any others.
Accounts expected by this instruction:
[writable]
The mint to initialize.
Data expected by this instruction:
crate::extension::scaled_ui_amount::instruction::InitializeInstructionData
UpdateMultiplier = 1
Update the multiplier. Only supported for mints that include the
ScaledUiAmount
extension.
Fails if the multiplier is less than or equal to 0 or if it’s subnormal.
The authority provides a new multiplier and a UNIX timestamp on which it should take effect. If the timestamp is before the current time, immediately sets the multiplier.
Accounts expected by this instruction:
- Single authority
[writable]
The mint.[signer]
The multiplier authority.
- Multisignature authority
[writable]
The mint.[]
The mint’s multisignature multiplier authority...2+M
[signer]
M signer accounts.
Data expected by this instruction:
crate::extension::scaled_ui_amount::instruction::UpdateMultiplierInstructionData
Trait Implementations§
Source§impl Clone for ScaledUiAmountMintInstruction
impl Clone for ScaledUiAmountMintInstruction
Source§fn clone(&self) -> ScaledUiAmountMintInstruction
fn clone(&self) -> ScaledUiAmountMintInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl From<ScaledUiAmountMintInstruction> for u8
impl From<ScaledUiAmountMintInstruction> for u8
Source§fn from(enum_value: ScaledUiAmountMintInstruction) -> Self
fn from(enum_value: ScaledUiAmountMintInstruction) -> Self
Source§impl PartialEq for ScaledUiAmountMintInstruction
impl PartialEq for ScaledUiAmountMintInstruction
Source§fn eq(&self, other: &ScaledUiAmountMintInstruction) -> bool
fn eq(&self, other: &ScaledUiAmountMintInstruction) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl TryFrom<u8> for ScaledUiAmountMintInstruction
impl TryFrom<u8> for ScaledUiAmountMintInstruction
Source§type Error = TryFromPrimitiveError<ScaledUiAmountMintInstruction>
type Error = TryFromPrimitiveError<ScaledUiAmountMintInstruction>
Source§impl TryFromPrimitive for ScaledUiAmountMintInstruction
impl TryFromPrimitive for ScaledUiAmountMintInstruction
const NAME: &'static str = "ScaledUiAmountMintInstruction"
type Primitive = u8
type Error = TryFromPrimitiveError<ScaledUiAmountMintInstruction>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for ScaledUiAmountMintInstruction
impl StructuralPartialEq for ScaledUiAmountMintInstruction
Auto Trait Implementations§
impl Freeze for ScaledUiAmountMintInstruction
impl RefUnwindSafe for ScaledUiAmountMintInstruction
impl Send for ScaledUiAmountMintInstruction
impl Sync for ScaledUiAmountMintInstruction
impl Unpin for ScaledUiAmountMintInstruction
impl UnwindSafe for ScaledUiAmountMintInstruction
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
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>
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>
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