pub enum SystemInstruction {
Show 13 variants
CreateAccount {
lamports: u64,
space: u64,
owner: Pubkey,
},
Assign {
owner: Pubkey,
},
Transfer {
lamports: u64,
},
CreateAccountWithSeed {
base: Pubkey,
seed: String,
lamports: u64,
space: u64,
owner: Pubkey,
},
AdvanceNonceAccount,
WithdrawNonceAccount(u64),
InitializeNonceAccount(Pubkey),
AuthorizeNonceAccount(Pubkey),
Allocate {
space: u64,
},
AllocateWithSeed {
base: Pubkey,
seed: String,
space: u64,
owner: Pubkey,
},
AssignWithSeed {
base: Pubkey,
seed: String,
owner: Pubkey,
},
TransferWithSeed {
lamports: u64,
from_seed: String,
from_owner: Pubkey,
},
UpgradeNonceAccount,
}
Expand description
An instruction to the system program.
Variants§
CreateAccount
Fields
Create a new account
§Account references
[WRITE, SIGNER]
Funding account[WRITE, SIGNER]
New account
Assign
Transfer
CreateAccountWithSeed
Fields
Create a new account at an address derived from a base pubkey and a seed
§Account references
[WRITE, SIGNER]
Funding account[WRITE]
Created account[SIGNER]
(optional) Base account; the account matching the base Pubkey below must be provided as a signer, but may be the same as the funding account and provided as account 0
AdvanceNonceAccount
Consumes a stored nonce, replacing it with a successor
§Account references
[WRITE]
Nonce account[]
RecentBlockhashes sysvar[SIGNER]
Nonce authority
WithdrawNonceAccount(u64)
Withdraw funds from a nonce account
§Account references
[WRITE]
Nonce account[WRITE]
Recipient account[]
RecentBlockhashes sysvar[]
Rent sysvar[SIGNER]
Nonce authority
The u64
parameter is the lamports to withdraw, which must leave the
account balance above the rent exempt reserve or at zero.
InitializeNonceAccount(Pubkey)
Drive state of Uninitialized nonce account to Initialized, setting the nonce value
§Account references
[WRITE]
Nonce account[]
RecentBlockhashes sysvar[]
Rent sysvar
The Pubkey
parameter specifies the entity authorized to execute nonce
instruction on the account
No signatures are required to execute this instruction, enabling derived nonce account addresses
AuthorizeNonceAccount(Pubkey)
Change the entity authorized to execute nonce instructions on the account
§Account references
[WRITE]
Nonce account[SIGNER]
Nonce authority
The Pubkey
parameter identifies the entity to authorize
Allocate
Allocate space in a (possibly new) account without funding
§Account references
[WRITE, SIGNER]
New account
AllocateWithSeed
Fields
Allocate space for and assign an account at an address derived from a base public key and a seed
§Account references
[WRITE]
Allocated account[SIGNER]
Base account
AssignWithSeed
Fields
Assign account to a program based on a seed
§Account references
[WRITE]
Assigned account[SIGNER]
Base account
TransferWithSeed
Fields
Transfer lamports from a derived address
§Account references
[WRITE]
Funding account[SIGNER]
Base for funding account[WRITE]
Recipient account
UpgradeNonceAccount
One-time idempotent upgrade of legacy nonce versions in order to bump them out of chain blockhash domain.
§Account references
[WRITE]
Nonce account
Trait Implementations§
§impl Clone for SystemInstruction
impl Clone for SystemInstruction
§fn clone(&self) -> SystemInstruction
fn clone(&self) -> SystemInstruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for SystemInstruction
impl Debug for SystemInstruction
§impl<'de> Deserialize<'de> for SystemInstruction
impl<'de> Deserialize<'de> for SystemInstruction
§fn deserialize<__D>(
__deserializer: __D
) -> Result<SystemInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SystemInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for SystemInstruction
impl PartialEq for SystemInstruction
§fn eq(&self, other: &SystemInstruction) -> bool
fn eq(&self, other: &SystemInstruction) -> bool
self
and other
values to be equal, and is used
by ==
.§impl Serialize for SystemInstruction
impl Serialize for SystemInstruction
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for SystemInstruction
impl StructuralPartialEq for SystemInstruction
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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