Skip to content

Commit

Permalink
Correcct the balance of the contract address upon creation, noting th…
Browse files Browse the repository at this point in the history
…at the address may have a pre-existing balance. (#2113)
  • Loading branch information
saeed-zil authored Jan 9, 2025
1 parent 6732b58 commit e78617c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zilliqa/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ fn scilla_create(
let transitions = contract_info.transitions;

let account = state.load_account(contract_address)?;
account.account.balance = txn.amount.get();
account.account.balance += txn.amount.get();
account.account.code = Code::Scilla {
code: txn.code.clone(),
init_data,
Expand Down

0 comments on commit e78617c

Please sign in to comment.