solana/sdk/src/system_instruction.rs

27 lines
812 B
Rust
Raw Normal View History

2018-12-14 20:39:10 -08:00
use crate::pubkey::Pubkey;
2018-11-16 08:04:46 -08:00
#[derive(Serialize, Deserialize, Debug, Clone)]
pub enum SystemInstruction {
/// Create a new account
/// * Transaction::keys[0] - source
/// * Transaction::keys[1] - new account key
/// * tokens - number of tokens to transfer to the new account
/// * space - memory to allocate if greater then zero
/// * program_id - the program id of the new account
CreateAccount {
tokens: u64,
space: u64,
program_id: Pubkey,
},
/// Assign account to a program
/// * Transaction::keys[0] - account to assign
Assign { program_id: Pubkey },
/// Move tokens
/// * Transaction::keys[0] - source
/// * Transaction::keys[1] - destination
Move { tokens: u64 },
/// Spawn a new program from an account
Spawn,
}