Skip to content

Commit

Permalink
Check balance overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
icodezjb committed Feb 4, 2024
1 parent cfef5ca commit 2b12902
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frame/evm/src/runner/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,12 @@ impl<'vicinity, 'config, T: Config> StackStateT<'config>
T::Currency::transfer(
&source,
&target,
value.low_u128().unique_saturated_into(),
value
.try_into()
.map_err(|_| ExitError::OutOfFund)?,
ExistenceRequirement::AllowDeath,
)
.map_err(|_| ExitError::OutOfFund)
.map_err(|_| ExitError::OutOfFund)
}

fn reset_balance(&mut self, _address: H160) {
Expand Down

0 comments on commit 2b12902

Please sign in to comment.