Skip to content

Commit

Permalink
Added user accounts only check
Browse files Browse the repository at this point in the history
  • Loading branch information
psorinionut committed Nov 22, 2024
1 parent d587001 commit 08af875
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ pub trait GuaranteedTicketsInitModule:

for multi_arg in address_number_pairs.into_iter() {
let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple();
require!(
!self.blockchain().is_smart_contract(&buyer),
"Only user accounts can participate"
);
require!(
total_tickets_allowance <= MAX_TICKETS_ALLOWANCE,
"Total number of tickets exceeds maximum allowed"
Expand Down

0 comments on commit 08af875

Please sign in to comment.