Skip to content

Commit 1f9fdc8

Browse files
committed
store platform's balance from event payout
1 parent c4d8982 commit 1f9fdc8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/event_factory/event_factory.cairo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,10 @@ pub mod EventFactory {
609609
- ((event_balance_padded * 3) / 100);
610610
let event_balance_minus_fee = event_balance_padded_minus_fee / E18;
611611

612+
let crowd_pass_fee = event_balance - event_balance_minus_fee;
613+
let crowd_pass_balance = self.crowd_pass_balance.entry(event_id).read();
614+
self.crowd_pass_balance.entry(event_id).write(crowd_pass_balance + crowd_pass_fee);
615+
612616
IERC20Dispatcher { contract_address: STRK_TOKEN_ADDRESS.try_into().unwrap() }
613617
.transfer(organizer, event_balance_minus_fee);
614618

0 commit comments

Comments
 (0)