From c1d92fea84331f65721afc0a931d0ec8b051b2c5 Mon Sep 17 00:00:00 2001 From: Jorge Zerpa Date: Fri, 25 Oct 2024 12:43:33 -0400 Subject: [PATCH] [test] #137 fix errors surged after merging with dev --- contracts/src/fund.cairo | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/contracts/src/fund.cairo b/contracts/src/fund.cairo index b26b5b3..afe686e 100644 --- a/contracts/src/fund.cairo +++ b/contracts/src/fund.cairo @@ -41,6 +41,7 @@ mod Fund { #[derive(Drop, starknet::Event)] enum Event { DonationWithdraw: DonationWithdraw, + NewVoteReceived: NewVoteReceived } #[derive(Drop, starknet::Event)] @@ -51,6 +52,13 @@ mod Fund { pub withdrawn_amount: u256 } + #[derive(Drop, starknet::Event)] + pub struct NewVoteReceived { + #[key] + pub voter: ContractAddress, + pub fund: ContractAddress, + pub votes: u32 + } // ************************************************************************* // STORAGE // ************************************************************************* @@ -84,24 +92,6 @@ mod Fund { self.state.write(FundStates::RECOLLECTING_VOTES); } - // ************************************************************************* - // EVENTS - // ************************************************************************* - #[event] - #[derive(Drop, starknet::Event)] - enum Event { - NewVoteReceived: NewVoteReceived - } - - #[derive(Drop, starknet::Event)] - pub struct NewVoteReceived { - #[key] - pub voter: ContractAddress, - pub fund: ContractAddress, - pub votes: u32 - } - - // ************************************************************************* // EXTERNALS // *************************************************************************