Skip to content

Commit 20da997

Browse files
committed
Add resolution logic for other matterlabs variables
1 parent 6d7cd67 commit 20da997

File tree

4 files changed

+258
-43
lines changed

4 files changed

+258
-43
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/core/src/driver/mod.rs

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! The test driver handles the compilation and execution of the test cases.
22
33
use alloy::json_abi::JsonAbi;
4-
use alloy::network::TransactionBuilder;
4+
use alloy::network::{Ethereum, TransactionBuilder};
55
use alloy::rpc::types::TransactionReceipt;
66
use alloy::rpc::types::trace::geth::GethTrace;
77
use alloy::{
@@ -135,17 +135,21 @@ where
135135
std::any::type_name::<T>()
136136
);
137137

138-
let tx =
139-
match input.legacy_transaction(nonce, &self.deployed_contracts, &self.deployed_abis) {
140-
Ok(tx) => {
141-
tracing::debug!("Legacy transaction data: {tx:#?}");
142-
tx
143-
}
144-
Err(err) => {
145-
tracing::error!("Failed to construct legacy transaction: {err:?}");
146-
return Err(err);
147-
}
148-
};
138+
let tx = match input.legacy_transaction(
139+
nonce,
140+
&self.deployed_contracts,
141+
&self.deployed_abis,
142+
node,
143+
) {
144+
Ok(tx) => {
145+
tracing::debug!("Legacy transaction data: {tx:#?}");
146+
tx
147+
}
148+
Err(err) => {
149+
tracing::error!("Failed to construct legacy transaction: {err:?}");
150+
return Err(err);
151+
}
152+
};
149153

150154
tracing::trace!("Executing transaction for input: {input:?}");
151155

@@ -231,10 +235,12 @@ where
231235
// automatically fill in all of the missing fields from the provider that we
232236
// are using.
233237
let code = alloy::hex::decode(&code)?;
234-
let tx = TransactionRequest::default()
235-
.nonce(nonce)
236-
.from(input.caller)
237-
.with_deploy_code(code);
238+
let tx = {
239+
let tx = TransactionRequest::default()
240+
.nonce(nonce)
241+
.from(input.caller);
242+
TransactionBuilder::<Ethereum>::with_deploy_code(tx, code)
243+
};
238244

239245
let receipt = match node.execute_transaction(tx) {
240246
Ok(receipt) => receipt,

crates/format/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ repository.workspace = true
99
rust-version.workspace = true
1010

1111
[dependencies]
12+
revive-dt-node-interaction = { workspace = true }
13+
1214
alloy = { workspace = true }
1315
alloy-primitives = { workspace = true }
1416
alloy-sol-types = { workspace = true }

0 commit comments

Comments
 (0)