pub enum SystemInstruction {
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,
},
}
Variants
CreateAccount
Fields
lamports: u64
Number of lamports to transfer to the new account
space: u64
Number of bytes of memory to allocate
owner: Pubkey
Address of program that will own the new account
Assign
Fields
owner: Pubkey
Owner program account
Transfer
Fields
lamports: u64
CreateAccountWithSeed
Fields
base: Pubkey
Base public key
seed: String
String of ASCII chars, no longer than Pubkey::MAX_SEED_LEN
lamports: u64
Number of lamports to transfer to the new account
space: u64
Number of bytes of memory to allocate
owner: Pubkey
Owner program account address
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
Fields
space: u64
Number of bytes of memory to allocate
Allocate space in a (possibly new) account without funding
Account references
[WRITE, SIGNER]
New account
AllocateWithSeed
Fields
base: Pubkey
Base public key
seed: String
String of ASCII chars, no longer than pubkey::MAX_SEED_LEN
space: u64
Number of bytes of memory to allocate
owner: Pubkey
Owner program account
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
base: Pubkey
Base public key
seed: String
String of ASCII chars, no longer than pubkey::MAX_SEED_LEN
owner: Pubkey
Owner program account
Assign account to a program based on a seed
Account references
[WRITE]
Assigned account[SIGNER]
Base account
TransferWithSeed
Fields
lamports: u64
Amount to transfer
from_seed: String
Seed to use to derive the funding account address
from_owner: Pubkey
Owner to use to derive the funding account address
Transfer lamports from a derived address
Account references
[WRITE]
Funding account[SIGNER]
Base for funding account[WRITE]
Recipient account
Trait Implementations
sourceimpl AbiEnumVisitor for SystemInstruction
impl AbiEnumVisitor for SystemInstruction
fn visit_for_abi(&self, digester: &mut AbiDigester) -> DigestResult
sourceimpl AbiExample for SystemInstruction
impl AbiExample for SystemInstruction
sourceimpl Clone for SystemInstruction
impl Clone for SystemInstruction
sourcefn clone(&self) -> SystemInstruction
fn clone(&self) -> SystemInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SystemInstruction
impl Debug for SystemInstruction
sourceimpl<'de> Deserialize<'de> for SystemInstruction
impl<'de> Deserialize<'de> for SystemInstruction
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<SystemInstruction> for SystemInstruction
impl PartialEq<SystemInstruction> for SystemInstruction
sourcefn eq(&self, other: &SystemInstruction) -> bool
fn eq(&self, other: &SystemInstruction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SystemInstruction) -> bool
fn ne(&self, other: &SystemInstruction) -> bool
This method tests for !=
.
sourceimpl Serialize for SystemInstruction
impl Serialize for SystemInstruction
impl StructuralPartialEq for SystemInstruction
Auto Trait Implementations
impl RefUnwindSafe for SystemInstruction
impl Send for SystemInstruction
impl Sync for SystemInstruction
impl Unpin for SystemInstruction
impl UnwindSafe for SystemInstruction
Blanket Implementations
sourceimpl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
sourceimpl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more