airdrop_api/state/config.rs
1use solana_program::pubkey::Pubkey;
2use steel::*;
3
4/// Config is a singleton account which manages program global variables.
5#[repr(C)]
6#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
7pub struct Config {
8 /// Program admin authority (can update config, withdraw fees)
9 pub admin: Pubkey,
10
11 /// Fee account PDA (where collected fees accumulate)
12 pub fee_account: Pubkey,
13
14 /// Fee for creating a new mint (in lamports)
15 pub mint_fee_lamports: u64,
16
17 /// Fee per recipient allocation (in lamports)
18 /// Charged when creating allocation accounts (Mode 0)
19 pub allocation_fee_per_recipient_lamports: u64,
20
21 /// Fee per recipient for merkle tree campaigns (in lamports)
22 /// Charged when setting merkle root in CreateCampaign
23 pub merkle_fee_per_recipient_lamports: u64,
24
25 /// Fee per recipient for direct transfers (in lamports)
26 /// Charged when campaign owner transfers tokens directly via DirectTransfer
27 pub direct_transfer_fee_per_recipient_lamports: u64,
28
29 /// Total fees collected (for tracking/transparency, in lamports)
30 pub total_fees_collected: u64,
31
32 /// Last update timestamp
33 pub updated_at: i64,
34}
35
36use crate::consts::AirdropAccount;
37account!(AirdropAccount, Config);