Skip to content

Commit 14551a8

Browse files
authored
Merge pull request #84 from manoahLinks/main
feat: Implement Comprehensive Event System and Query Functions (#79)
2 parents 455090c + 7d28ca4 commit 14551a8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/campaign.cairo

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ mod TokengiverCampaign {
5656
CreateCampaign: CreateCampaign,
5757
DonationCreated: DonationCreated,
5858
DeployedTokenGiverNFT: DeployedTokenGiverNFT,
59+
CampaignPoolClosed: CampaignPoolClosed,
60+
DonationReceived: DonationReceived,
61+
ApplicationStatusChanged: ApplicationStatusChanged,
5962
}
6063

6164
#[derive(Drop, starknet::Event)]
@@ -86,6 +89,34 @@ mod TokengiverCampaign {
8689
block_timestamp: u64,
8790
}
8891

92+
#[derive(Drop, starknet::Event)]
93+
pub struct CampaignPoolClosed {
94+
campaign_pool_address: ContractAddress,
95+
final_amount_raised: u256,
96+
total_applications: u32,
97+
total_votes: u32,
98+
closed_by: ContractAddress,
99+
timestamp: u64,
100+
}
101+
102+
#[derive(Drop, starknet::Event)]
103+
pub struct DonationReceived {
104+
campaign_pool_address: ContractAddress,
105+
donor: ContractAddress,
106+
amount: u256,
107+
total_pool_amount: u256,
108+
timestamp: u64,
109+
}
110+
111+
#[derive(Drop, starknet::Event)]
112+
pub struct ApplicationStatusChanged {
113+
campaign_address: ContractAddress,
114+
campaign_pool_address: ContractAddress,
115+
old_status: felt252,
116+
new_status: felt252,
117+
timestamp: u64,
118+
}
119+
89120
// *************************************************************************
90121
// CONSTRUCTOR
91122
// *************************************************************************

0 commit comments

Comments
 (0)