airdrop_api/state/allocation.rs
1use solana_program::pubkey::Pubkey;
2use steel::*;
3
4/// Allocation account stores individual recipient allocation (for on-chain mode)
5#[repr(C)]
6#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
7pub struct Allocation {
8 /// Campaign this allocation belongs to
9 pub campaign: Pubkey,
10
11 /// Recipient wallet address
12 pub recipient: Pubkey,
13
14 /// Amount of tokens allocated
15 pub amount: u64,
16
17 /// Allocation timestamp
18 pub allocated_at: i64,
19
20 /// Claim timestamp (0 if not claimed)
21 pub claimed_at: i64,
22
23 /// Whether this allocation has been claimed (0=unclaimed, 1=claimed)
24 pub claimed: u8,
25
26 /// Padding for alignment
27 pub _padding: [u8; 7],
28}
29
30use crate::consts::AirdropAccount;
31account!(AirdropAccount, Allocation);