Compare commits

...

5 Commits

Author SHA1 Message Date
Omar Abdulla b8a71b40e2 Merge remote-tracking branch 'origin/main' into chore/update-version-of-tests2 2025-11-03 02:47:53 +03:00
Omar Abdulla 6df00f567c Update the version of tests 2025-11-03 02:45:47 +03:00
Omar 75159229df Update the commit hash of resolc compiler tests (#201) 2025-11-02 21:27:26 +00:00
Omar Abdulla 9b75a4f236 Update the commit hash of resolc compiler tests 2025-11-03 00:25:56 +03:00
Omar 2af1a62319 Supply the revert reason in the logs (#200) 2025-11-02 17:54:11 +00:00
5 changed files with 21 additions and 7 deletions
+4 -1
View File
@@ -598,7 +598,10 @@ where
let expected = !assertion.exception; let expected = !assertion.exception;
let actual = receipt.status(); let actual = receipt.status();
if actual != expected { if actual != expected {
let revert_reason = tracing_result.revert_reason.as_ref(); let revert_reason = tracing_result
.revert_reason
.as_ref()
.or(tracing_result.error.as_ref());
tracing::error!( tracing::error!(
expected, expected,
actual, actual,
+11 -3
View File
@@ -1,5 +1,6 @@
use std::{collections::HashMap, fmt::Display, str::FromStr}; use std::{collections::HashMap, fmt::Display, str::FromStr};
use alloy::hex::ToHexExt;
use alloy::primitives::{FixedBytes, utils::parse_units}; use alloy::primitives::{FixedBytes, utils::parse_units};
use alloy::{ use alloy::{
eips::BlockNumberOrTag, eips::BlockNumberOrTag,
@@ -686,8 +687,8 @@ impl Calldata {
Calldata::Compound(items) => { Calldata::Compound(items) => {
stream::iter(items.iter().zip(other.chunks(32))) stream::iter(items.iter().zip(other.chunks(32)))
.map(|(this, other)| async move { .map(|(this, other)| async move {
// The matterlabs format supports wildcards and therefore we // The MatterLabs format supports wildcards and therefore we also need to
// also need to support them. // support them.
if this.as_ref() == "*" { if this.as_ref() == "*" {
return Ok::<_, anyhow::Error>(true); return Ok::<_, anyhow::Error>(true);
} }
@@ -768,7 +769,14 @@ impl CalldataItem {
match stack.as_slice() { match stack.as_slice() {
// Empty stack means that we got an empty compound calldata which we resolve to zero. // Empty stack means that we got an empty compound calldata which we resolve to zero.
[] => Ok(U256::ZERO), [] => Ok(U256::ZERO),
[CalldataToken::Item(item)] => Ok(*item), [CalldataToken::Item(item)] => {
tracing::debug!(
original_item = ?self,
resolved_item = item.to_be_bytes::<32>().encode_hex(),
"Resolution Done"
);
Ok(*item)
}
_ => Err(anyhow::anyhow!( _ => Err(anyhow::anyhow!(
"Invalid calldata arithmetic operation - Invalid stack" "Invalid calldata arithmetic operation - Invalid stack"
)), )),
@@ -62,7 +62,10 @@ where
) -> TransportResult<Self::Fillable> { ) -> TransportResult<Self::Fillable> {
match self.inner.prepare(provider, tx).await { match self.inner.prepare(provider, tx).await {
Ok(fill) => Ok(Some(fill)), Ok(fill) => Ok(Some(fill)),
Err(_) => Ok(None), Err(err) => {
tracing::debug!(error = ?err, "Gas Provider Estimation Failed, using fallback");
Ok(None)
}
} }
} }