pub enum SystemInstruction {
Show 13 variants
CreateAccount {
lamports: u64,
space: u64,
},
Assign,
Transfer {
lamports: u64,
},
CreateAccountWithSeed {
lamports: u64,
space: u64,
},
AdvanceNonceAccount,
WithdrawNonceAccount {
lamports: u64,
},
InitializeNonceAccount,
AuthorizeNonceAccount,
Allocate {
space: u64,
},
AllocateWithSeed {
space: u64,
},
AssignWithSeed,
TransferWithSeed {
lamports: u64,
},
UpgradeNonceAccount,
}Expand description
Solana System Program instructions.
The System Program uses a 4-byte discriminator (u32 little-endian). Each variant’s discriminator is its position in this enum (0, 1, 2, …).
Variants§
CreateAccount
Create a new account (index 0) Data: lamports (u64) + space (u64) + owner (Pubkey)
Assign
Assign account to a program (index 1) Data: owner (Pubkey)
Transfer
Transfer lamports (index 2) Data: lamports (u64)
CreateAccountWithSeed
Create account with seed (index 3) Data: base (Pubkey) + seed (String) + lamports (u64) + space (u64) + owner (Pubkey)
AdvanceNonceAccount
Advance nonce account (index 4)
WithdrawNonceAccount
Withdraw from nonce account (index 5) Data: lamports (u64)
InitializeNonceAccount
Initialize nonce account (index 6) Data: authority (Pubkey)
AuthorizeNonceAccount
Authorize nonce account (index 7) Data: new_authority (Pubkey)
Allocate
Allocate space for account (index 8) Data: space (u64)
AllocateWithSeed
Allocate space with seed (index 9) Data: base (Pubkey) + seed (String) + space (u64) + owner (Pubkey)
AssignWithSeed
Assign account with seed (index 10) Data: base (Pubkey) + seed (String) + owner (Pubkey)
TransferWithSeed
Transfer with seed (index 11) Data: lamports (u64) + from_seed (String) + from_owner (Pubkey)
UpgradeNonceAccount
Upgrade nonce account (index 12)
Auto Trait Implementations§
impl Freeze for SystemInstruction
impl RefUnwindSafe for SystemInstruction
impl Send for SystemInstruction
impl Sync for SystemInstruction
impl Unpin for SystemInstruction
impl UnwindSafe for SystemInstruction
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> 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