Support Calldata arithmetic (#77)

* Re-order the input file.

This commit reorders the input file such that we have a definitions
section and an implementations section and such that the the order of
the items in both sections is the same.

* Implement a reverse polish calculator for calldata arithmetic
This commit is contained in:
Omar
2025-07-24 18:35:25 +03:00
committed by GitHub
parent 90fb89adc0
commit 8f5bcf08ad
4 changed files with 532 additions and 248 deletions
+2 -2
View File
@@ -509,7 +509,7 @@ where
.iter()
.zip(actual_event.topics())
{
let expected = Calldata::Compound(vec![expected.clone()]);
let expected = Calldata::new_compound([expected]);
if !expected.is_equivalent(
&actual.0,
deployed_contracts,
@@ -718,7 +718,7 @@ where
);
let _guard = tracing_span.enter();
let case_idx = CaseIdx::new_from(case_idx);
let case_idx = CaseIdx::new(case_idx);
// For inputs if one of the inputs fail we move on to the next case (we do not move
// on to the next input as it doesn't make sense. It depends on the previous one).