extern crate self as light_instruction_decoder;
use light_instruction_decoder_derive::InstructionDecoder;
#[derive(InstructionDecoder)]
#[instruction_decoder(
program_id = "11111111111111111111111111111111",
program_name = "System Program",
discriminator_size = 4
)]
pub enum SystemInstruction {
#[instruction_decoder(account_names = ["funding_account", "new_account"])]
CreateAccount { lamports: u64, space: u64 },
#[instruction_decoder(account_names = ["account"])]
Assign,
#[instruction_decoder(account_names = ["from", "to"])]
Transfer { lamports: u64 },
#[instruction_decoder(account_names = ["funding_account", "created_account", "base_account"])]
CreateAccountWithSeed { lamports: u64, space: u64 },
#[instruction_decoder(account_names = ["nonce_account", "recent_blockhashes_sysvar", "nonce_authority"])]
AdvanceNonceAccount,
#[instruction_decoder(account_names = ["nonce_account", "recipient", "recent_blockhashes_sysvar", "rent_sysvar", "nonce_authority"])]
WithdrawNonceAccount { lamports: u64 },
#[instruction_decoder(account_names = ["nonce_account", "recent_blockhashes_sysvar", "rent_sysvar"])]
InitializeNonceAccount,
#[instruction_decoder(account_names = ["nonce_account", "nonce_authority"])]
AuthorizeNonceAccount,
#[instruction_decoder(account_names = ["account"])]
Allocate { space: u64 },
#[instruction_decoder(account_names = ["account", "base_account"])]
AllocateWithSeed { space: u64 },
#[instruction_decoder(account_names = ["account", "base_account"])]
AssignWithSeed,
#[instruction_decoder(account_names = ["funding_account", "base_account", "recipient"])]
TransferWithSeed { lamports: u64 },
#[instruction_decoder(account_names = ["nonce_account"])]
UpgradeNonceAccount,
}