Enum solana_program::system_instruction::SystemInstruction[][src]

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
Expand description

Create a new account

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE, SIGNER] New account
Show fields

Fields of CreateAccount

lamports: u64
Expand description

Number of lamports to transfer to the new account

space: u64
Expand description

Number of bytes of memory to allocate

owner: Pubkey
Expand description

Address of program that will own the new account

Assign
Expand description

Assign account to a program

Account references

  1. [WRITE, SIGNER] Assigned account public key
Show fields

Fields of Assign

owner: Pubkey
Expand description

Owner program account

Transfer
Expand description

Transfer lamports

Account references

  1. [WRITE, SIGNER] Funding account
  2. [WRITE] Recipient account
Show fields

Fields of Transfer

lamports: u64
CreateAccountWithSeed
Expand description

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
Show fields

Fields of CreateAccountWithSeed

base: Pubkey
Expand description

Base public key

seed: String
Expand description

String of ASCII chars, no longer than Pubkey::MAX_SEED_LEN

lamports: u64
Expand description

Number of lamports to transfer to the new account

space: u64
Expand description

Number of bytes of memory to allocate

owner: Pubkey
Expand description

Owner program account address

AdvanceNonceAccount
Expand description

Consumes a stored nonce, replacing it with a successor

Account references

  1. [WRITE] Nonce account
  2. [] RecentBlockhashes sysvar
  3. [SIGNER] Nonce authority
WithdrawNonceAccount(u64)
Expand description

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)
Expand description

Drive state of Uninitalized 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)
Expand description

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
Expand description

Allocate space in a (possibly new) account without funding

Account references

  1. [WRITE, SIGNER] New account
Show fields

Fields of Allocate

space: u64
Expand description

Number of bytes of memory to allocate

AllocateWithSeed
Expand description

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
Show fields

Fields of AllocateWithSeed

base: Pubkey
Expand description

Base public key

seed: String
Expand description

String of ASCII chars, no longer than pubkey::MAX_SEED_LEN

space: u64
Expand description

Number of bytes of memory to allocate

owner: Pubkey
Expand description

Owner program account

AssignWithSeed
Expand description

Assign account to a program based on a seed

Account references

  1. [WRITE] Assigned account
  2. [SIGNER] Base account
Show fields

Fields of AssignWithSeed

base: Pubkey
Expand description

Base public key

seed: String
Expand description

String of ASCII chars, no longer than pubkey::MAX_SEED_LEN

owner: Pubkey
Expand description

Owner program account

TransferWithSeed
Expand description

Transfer lamports from a derived address

Account references

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

Fields of TransferWithSeed

lamports: u64
Expand description

Amount to transfer

from_seed: String
Expand description

Seed to use to derive the funding account address

from_owner: Pubkey
Expand description

Owner to use to derive the funding account address

Trait Implementations

impl AbiEnumVisitor for SystemInstruction[src]

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

impl AbiExample for SystemInstruction[src]

fn example() -> Self[src]

impl Clone for SystemInstruction[src]

fn clone(&self) -> SystemInstruction[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for SystemInstruction[src]

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

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for SystemInstruction[src]

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

Deserialize this value from the given Serde deserializer. Read more

impl PartialEq<SystemInstruction> for SystemInstruction[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &SystemInstruction) -> bool[src]

This method tests for !=.

impl Serialize for SystemInstruction[src]

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

Serialize this value into the given Serde serializer. Read more

impl StructuralPartialEq for SystemInstruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> AbiEnumVisitor for T where
    T: Serialize + AbiExample + ?Sized
[src]

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

impl<T> AbiEnumVisitor for T where
    T: Serialize + ?Sized
[src]

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

impl<T> AbiExample for T[src]

pub default fn example() -> T[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]