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

§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

Create a new account

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE, SIGNER] New account
§

Assign

Fields

§owner: Pubkey

Owner program account

Assign account to a program

Account references

  1. [WRITE, SIGNER] Assigned account public key
§

Transfer

Fields

§lamports: u64

Transfer lamports

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE] Recipient account
§

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

  1. [WRITE, SIGNER] Funding account
  2. [WRITE] Created account
  3. [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

  1. [WRITE] Nonce account
  2. [] RecentBlockhashes sysvar
  3. [SIGNER] Nonce authority
§

WithdrawNonceAccount(u64)

Withdraw funds from a nonce account

Account references

  1. [WRITE] Nonce account
  2. [WRITE] Recipient account
  3. [] RecentBlockhashes sysvar
  4. [] Rent sysvar
  5. [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

  1. [WRITE] Nonce account
  2. [] RecentBlockhashes sysvar
  3. [] 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

  1. [WRITE] Nonce account
  2. [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

  1. [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

  1. [WRITE] Allocated account
  2. [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

  1. [WRITE] Assigned account
  2. [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

  1. [WRITE] Funding account
  2. [SIGNER] Base for funding account
  3. [WRITE] Recipient account
§

UpgradeNonceAccount

One-time idempotent upgrade of legacy nonce versions in order to bump them out of chain blockhash domain.

Account references

  1. [WRITE] Nonce account

Trait Implementations§

source§

impl AbiEnumVisitor for SystemInstruction

source§

fn visit_for_abi(&self, digester: &mut AbiDigester) -> DigestResult

source§

impl AbiExample for SystemInstruction

source§

fn example() -> Self

source§

impl Clone for SystemInstruction

source§

fn clone(&self) -> SystemInstruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SystemInstruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SystemInstruction

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<SystemInstruction> for SystemInstruction

source§

fn eq(&self, other: &SystemInstruction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SystemInstruction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SystemInstruction

source§

impl StructuralEq for SystemInstruction

source§

impl StructuralPartialEq for SystemInstruction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> AbiEnumVisitor for Twhere
    T: Serialize + AbiExample + ?Sized,

source§

default fn visit_for_abi(
    &self,
    digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiEnumVisitor for Twhere
    T: Serialize + ?Sized,

source§

default fn visit_for_abi(
    &self,
    _digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere
    T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere
    V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for Twhere
    T: for<'de> Deserialize<'de>,