use solana_program::pubkey::Pubkey;
use steel::*;
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Initialize {
pub admin: Pubkey,
pub mint_fee_lamports: [u8; 8],
pub allocation_fee_per_recipient_lamports: [u8; 8],
pub merkle_fee_per_recipient_lamports: [u8; 8],
pub direct_transfer_fee_per_recipient_lamports: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct CreateMint {
pub mint_id: [u8; 32],
pub noise: [u8; 4],
pub mint: Pubkey,
pub name: [u8; 32],
pub symbol: [u8; 10],
pub uri: [u8; 128],
pub decimals: u8,
pub max_supply: [u8; 8],
pub _padding: [u8; 3],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct CreateCampaign {
pub campaign_id: [u8; 32],
pub mint: Pubkey,
pub merkle_root: [u8; 32],
pub recipient_count: [u8; 8],
pub initial_supply: [u8; 8],
pub max_supply: [u8; 8],
pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Replenish {
pub campaign_id: [u8; 32],
pub amount: [u8; 8],
pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct MintTokens {
pub campaign_id: [u8; 32],
pub amount: [u8; 8],
pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Allocate {
pub campaign_id: [u8; 32],
pub count: u8,
pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct Claim {
pub campaign_id: [u8; 32],
pub method: u8,
pub amount: [u8; 8],
pub merkle_proof_length: u8,
pub _padding: [u8; 6],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct UpdateConfig {
pub new_admin: Pubkey,
pub mint_fee_lamports: [u8; 8],
pub allocation_fee_per_recipient_lamports: [u8; 8],
pub merkle_fee_per_recipient_lamports: [u8; 8],
pub direct_transfer_fee_per_recipient_lamports: [u8; 8],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct DirectTransfer {
pub campaign_id: [u8; 32],
pub count: u8,
pub _padding: [u8; 7],
}
#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
pub struct WithdrawFees {
pub amount: [u8; 8],
}
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive)]
pub enum AirdropInstruction {
CreateMint = 0,
CreateCampaign = 1,
Allocate = 2, Claim = 3, DirectTransfer = 4, Replenish = 5, MintTokens = 6,
Initialize = 100, UpdateConfig = 101, WithdrawFees = 102, }
instruction!(AirdropInstruction, CreateMint);
instruction!(AirdropInstruction, CreateCampaign);
instruction!(AirdropInstruction, Allocate);
instruction!(AirdropInstruction, Claim);
instruction!(AirdropInstruction, DirectTransfer);
instruction!(AirdropInstruction, Replenish);
instruction!(AirdropInstruction, MintTokens);
instruction!(AirdropInstruction, Initialize);
instruction!(AirdropInstruction, UpdateConfig);
instruction!(AirdropInstruction, WithdrawFees);