Add resolution logic for other matterlabs variables

This commit is contained in:
Omar Abdulla
2025-07-14 23:51:59 +03:00
parent 6d7cd67931
commit 20da99784e
4 changed files with 258 additions and 43 deletions
+22 -16
View File
@@ -1,7 +1,7 @@
//! The test driver handles the compilation and execution of the test cases.
use alloy::json_abi::JsonAbi;
use alloy::network::TransactionBuilder;
use alloy::network::{Ethereum, TransactionBuilder};
use alloy::rpc::types::TransactionReceipt;
use alloy::rpc::types::trace::geth::GethTrace;
use alloy::{
@@ -135,17 +135,21 @@ where
std::any::type_name::<T>()
);
let tx =
match input.legacy_transaction(nonce, &self.deployed_contracts, &self.deployed_abis) {
Ok(tx) => {
tracing::debug!("Legacy transaction data: {tx:#?}");
tx
}
Err(err) => {
tracing::error!("Failed to construct legacy transaction: {err:?}");
return Err(err);
}
};
let tx = match input.legacy_transaction(
nonce,
&self.deployed_contracts,
&self.deployed_abis,
node,
) {
Ok(tx) => {
tracing::debug!("Legacy transaction data: {tx:#?}");
tx
}
Err(err) => {
tracing::error!("Failed to construct legacy transaction: {err:?}");
return Err(err);
}
};
tracing::trace!("Executing transaction for input: {input:?}");
@@ -231,10 +235,12 @@ where
// automatically fill in all of the missing fields from the provider that we
// are using.
let code = alloy::hex::decode(&code)?;
let tx = TransactionRequest::default()
.nonce(nonce)
.from(input.caller)
.with_deploy_code(code);
let tx = {
let tx = TransactionRequest::default()
.nonce(nonce)
.from(input.caller);
TransactionBuilder::<Ethereum>::with_deploy_code(tx, code)
};
let receipt = match node.execute_transaction(tx) {
Ok(receipt) => receipt,