Skip to content

Commit

Permalink
Merge pull request #33 from HerodotusDev/hotfix/overflow
Browse files Browse the repository at this point in the history
fix : overflow on transforming value
  • Loading branch information
rkdud007 authored Mar 8, 2024
2 parents 15c9324 + cea6f5f commit 9d7de9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/evaluator/src/aggregation_functions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::str::FromStr;

use alloy_primitives::U256;
use anyhow::{bail, Result};

pub mod integer;
Expand Down Expand Up @@ -67,7 +68,7 @@ impl AggregationFunction {
.map(|hex_str| {
if hex_str.starts_with("0x") {
let hex_value = hex_str.trim_start_matches("0x").to_string();
u64::from_str_radix(&hex_value, 16).unwrap().to_string()
U256::from_str_radix(&hex_value, 16).unwrap().to_string()
} else {
hex_str.to_string()
}
Expand Down

0 comments on commit 9d7de9a

Please sign in to comment.