use steel::*;
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
pub enum SettlementInstruction {
Sweep = 0, CreateVault = 1,
Initialize = 100,
UpdateAuthority = 101,
UpdateFeeRate = 102,
UpdateFeeDestination = 103,
UpdateMinFeeAmount = 104,
UpdateMinFeeAmountSol = 105,
UpdateProvisioningFee = 106,
UpdateDiscountedFeeRate = 107,
AcceptAuthority = 108, CancelAuthorityProposal = 109, InitShard = 110, CollectFromShard = 111, UpdateShardConfig = 112, }
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct CreateVault {
pub seller: Pubkey, }
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Sweep {
pub token_mint: Pubkey, pub amount: [u8; 8], pub is_sol: [u8; 1], pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Initialize {
pub fee_destination: Pubkey, pub min_fee_amount: [u8; 8], pub min_fee_amount_sol: [u8; 8], pub provisioning_fee_sol: [u8; 8], pub provisioning_fee_spl: [u8; 8], pub fee_bps: [u8; 2], pub discounted_fee_bps: [u8; 2], pub use_fee_shard: u8, pub shard_count: u8, pub _padding: [u8; 2], }
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateAuthority {
pub new_authority: Pubkey,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct AcceptAuthority {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct CancelAuthorityProposal {}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateFeeRate {
pub new_fee_bps: [u8; 2],
pub _padding: [u8; 6], }
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateFeeDestination {
pub new_fee_destination: Pubkey,
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateMinFeeAmount {
pub new_min_fee_amount: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateProvisioningFee {
pub new_provisioning_fee_sol: [u8; 8],
pub new_provisioning_fee_spl: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateDiscountedFeeRate {
pub new_discounted_fee_bps: [u8; 2],
pub _padding: [u8; 6],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateMinFeeAmountSol {
pub new_min_fee_amount_sol: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct InitShard {
pub index: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct CollectFromShard {
pub index: [u8; 8],
pub amount: [u8; 8],
pub is_sol: [u8; 1],
pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateShardConfig {
pub use_fee_shard: u8,
pub shard_count: u8,
pub _padding: [u8; 6],
}
instruction!(SettlementInstruction, Sweep);
instruction!(SettlementInstruction, CreateVault);
instruction!(SettlementInstruction, Initialize);
instruction!(SettlementInstruction, UpdateAuthority);
instruction!(SettlementInstruction, UpdateFeeRate);
instruction!(SettlementInstruction, UpdateFeeDestination);
instruction!(SettlementInstruction, UpdateMinFeeAmount);
instruction!(SettlementInstruction, UpdateMinFeeAmountSol);
instruction!(SettlementInstruction, UpdateProvisioningFee);
instruction!(SettlementInstruction, UpdateDiscountedFeeRate);
instruction!(SettlementInstruction, AcceptAuthority);
instruction!(SettlementInstruction, CancelAuthorityProposal);
instruction!(SettlementInstruction, InitShard);
instruction!(SettlementInstruction, CollectFromShard);
instruction!(SettlementInstruction, UpdateShardConfig);