Skip to content

Commit

Permalink
fix: adds carry check add transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
obatirou committed Nov 22, 2024
1 parent 204b3d7 commit fb5bd82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cairo_zero/kakarot/state.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ namespace State {
[recipient.balance], transfer.amount
);

if (carry != 0) {
return 0;
}

let sender = Account.set_balance(sender, &sender_balance_new);
let recipient = Account.set_balance(recipient, &recipient_balance_new);

Expand Down

0 comments on commit fb5bd82

Please sign in to comment.