Skip to content

Commit

Permalink
feat: stack trace support for deployment, setup, fuzz & invariant tes…
Browse files Browse the repository at this point in the history
…ts (#799)
  • Loading branch information
agostbiro authored Feb 11, 2025
1 parent 8776f0c commit 43e9b9c
Show file tree
Hide file tree
Showing 18 changed files with 491 additions and 254 deletions.
97 changes: 2 additions & 95 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions crates/edr_solidity/src/solidity_stack_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,16 @@ impl StackTraceEntry {
| StackTraceEntry::UnrecognizedContractError { .. } => None,
}
}

/// Whether the stack trace entry is an unrecognized contract call to the
/// specified address.
pub fn is_unrecognized_contract_call_error(&self, contract_address: &Address) -> bool {
match self {
StackTraceEntry::UnrecognizedContractCallstackEntry { address }
| StackTraceEntry::UnrecognizedContractError { address, .. } => {
address == contract_address
}
_ => false,
}
}
}
12 changes: 0 additions & 12 deletions crates/edr_solidity_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,21 @@ alloy-dyn-abi.workspace = true
alloy-json-abi.workspace = true
alloy-primitives = { workspace = true, features = ["serde"] }

revm_foundry = { version = "=13.0.0", package = "revm" }
revm_primitives_foundry = { version = "=8.0.0", package = "revm-primitives" }
revm_edr = { version = "=12.1.0", package = "revm" }
revm_primitives_edr = { version = "=7.1.0", package = "revm-primitives" }

tokio = { workspace = true, features = ["time"] }
evm-disassembler.workspace = true
thiserror = "1.0.61"
log = "0.4.22"
anyhow = "1.0.91"

[dev-dependencies]
edr_test_utils.workspace = true

mockall = "0.12"
criterion = "0.5"
futures = "0.3"
globset = "0.4"
itertools.workspace = true
once_cell = "1"
paste = "1.0"
path-slash = "0.2"
regex = "1"
similar-asserts.workspace = true
semver = "1"
serial_test = "2.0.0"
svm = { package = "svm-rs", version = "0.5", default-features = false, features = ["rustls"] }
tempfile.workspace = true
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }

Expand Down
3 changes: 1 addition & 2 deletions crates/edr_solidity_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ pub use config::{SolidityTestRunnerConfig, SolidityTestRunnerConfigError};

pub mod result;

mod stack_trace;
pub use stack_trace::StackTraceError;
pub use foundry_evm::executors::stack_trace::StackTraceError;

mod test_filter;

Expand Down
Loading

0 comments on commit 43e9b9c

Please sign in to comment.