1use solana_program::pubkey::Pubkey;
2use steel::*;
3
4#[repr(C)]
6#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
7pub struct ConfigInitializedEvent {
8 pub admin: Pubkey,
9 pub mint_fee_lamports: u64,
10 pub allocation_fee_per_recipient_lamports: u64,
11 pub fee_account: Pubkey,
12 pub initialized_at: i64,
13}
14
15#[repr(C)]
17#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
18pub struct MintCreatedEvent {
19 pub mint: Pubkey,
20 pub mint_authority: Pubkey,
21 pub admin: Pubkey,
22 pub max_supply: u64,
24 pub created_at: i64,
25}
26
27#[repr(C)]
29#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
30pub struct CampaignCreatedEvent {
31 pub campaign: Pubkey,
32 pub mint: Pubkey,
33 pub owner: Pubkey,
34 pub merkle_root: [u8; 32],
35 pub initial_supply: u64,
36 pub created_at: i64,
37}
38
39#[repr(C)]
41#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
42pub struct TokensAllocatedEvent {
43 pub campaign: Pubkey,
44 pub recipient: Pubkey,
45 pub amount: u64,
46}
47
48#[repr(C)]
50#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
51pub struct TokensClaimedEvent {
52 pub campaign: Pubkey,
53 pub recipient: Pubkey,
54 pub amount: u64,
55 pub method: u8, pub _padding: [u8; 7], }
58
59#[repr(C)]
61#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
62pub struct ConfigUpdatedEvent {
63 pub admin: Pubkey,
64 pub mint_fee_lamports: u64,
65 pub allocation_fee_per_recipient_lamports: u64,
66 pub merkle_fee_per_recipient_lamports: u64,
67 pub direct_transfer_fee_per_recipient_lamports: u64,
68 pub updated_at: i64,
69}
70
71#[repr(C)]
73#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
74pub struct FeesWithdrawnEvent {
75 pub admin: Pubkey,
76 pub beneficiary: Pubkey,
77 pub amount: u64,
78 pub remaining_balance: u64,
79}
80
81#[repr(C)]
83#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
84pub struct TokensMintedEvent {
85 pub campaign: Pubkey,
86 pub mint: Pubkey,
87 pub amount: u64,
88 pub new_supply: u64,
89 pub minted_at: i64,
90}
91
92#[repr(C)]
94#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
95pub struct TokensReplenishedEvent {
96 pub campaign: Pubkey,
97 pub mint: Pubkey,
98 pub amount: u64,
99 pub new_balance: u64,
100 pub replenished_at: i64,
101}
102
103#[repr(C)]
105#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
106pub struct TokensDirectTransferredEvent {
107 pub campaign: Pubkey,
108 pub recipient_count: u8,
109 pub _padding1: [u8; 7], pub total_amount: u64,
111 pub transferred_at: i64,
112 pub _padding2: [u8; 8], }
114
115event!(ConfigInitializedEvent);
116event!(MintCreatedEvent);
117event!(CampaignCreatedEvent);
118event!(TokensAllocatedEvent);
119event!(TokensClaimedEvent);
120event!(ConfigUpdatedEvent);
121event!(FeesWithdrawnEvent);
122event!(TokensMintedEvent);
123event!(TokensReplenishedEvent);
124event!(TokensDirectTransferredEvent);