Better handling for length in equivalency checks

This commit is contained in:
Omar Abdulla
2025-07-23 14:53:19 +03:00
parent ca1ce3e5b4
commit 2b6ee18e40
+9 -1
View File
@@ -214,8 +214,16 @@ impl Calldata {
continue;
}
let other = if other.len() < 32 {
let mut vec = other.to_vec();
vec.resize(32, 0);
std::borrow::Cow::Owned(vec)
} else {
std::borrow::Cow::Borrowed(other)
};
let this = resolve_argument(this, deployed_contracts, chain_state_provider)?;
let other = U256::from_be_slice(other);
let other = U256::from_be_slice(&other);
if this != other {
return Ok(false);
}