mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-14 05:11:07 +00:00
Fix tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
use std::{collections::HashMap, str::FromStr};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use alloy::{
|
use alloy::{
|
||||||
json_abi::JsonAbi,
|
json_abi::JsonAbi,
|
||||||
@@ -210,7 +210,7 @@ fn resolve_argument(
|
|||||||
.ok_or_else(|| anyhow::anyhow!("`-0` is invalid literal"))?;
|
.ok_or_else(|| anyhow::anyhow!("`-0` is invalid literal"))?;
|
||||||
Ok(U256::MAX.checked_sub(value).expect("Always valid"))
|
Ok(U256::MAX.checked_sub(value).expect("Always valid"))
|
||||||
} else if let Some(value) = value.strip_prefix("0x") {
|
} else if let Some(value) = value.strip_prefix("0x") {
|
||||||
Ok(U256::from_str(value)
|
Ok(U256::from_str_radix(value, 16)
|
||||||
.map_err(|error| anyhow::anyhow!("Invalid hexadecimal literal: {}", error))?)
|
.map_err(|error| anyhow::anyhow!("Invalid hexadecimal literal: {}", error))?)
|
||||||
} else {
|
} else {
|
||||||
// TODO: This is a set of "variables" that we need to be able to resolve to be fully in
|
// TODO: This is a set of "variables" that we need to be able to resolve to be fully in
|
||||||
@@ -313,7 +313,7 @@ mod tests {
|
|||||||
.selector()
|
.selector()
|
||||||
.0;
|
.0;
|
||||||
|
|
||||||
let input = Input {
|
let input: Input = Input {
|
||||||
instance: "Contract".to_string(),
|
instance: "Contract".to_string(),
|
||||||
method: Method::FunctionName("send".to_owned()),
|
method: Method::FunctionName("send".to_owned()),
|
||||||
calldata: Some(Calldata::Compound(vec![
|
calldata: Some(Calldata::Compound(vec![
|
||||||
|
|||||||
Reference in New Issue
Block a user