fix: Pass vm_traces to DecoderContext (#264)

#time 2h 39m
This commit is contained in:
dianacarvalho1
2025-09-12 16:51:19 +01:00
committed by GitHub
parent 298bf13e87
commit 89b56e2d42
3 changed files with 6 additions and 3 deletions

View File

@@ -8455,7 +8455,6 @@ dependencies = [
[[package]]
name = "tycho-simulation"
version = "0.158.0"
source = "git+https://github.com/propeller-heads/tycho-simulation.git?tag=0.158.0#bf864f437c9eb3014449146b86628c2251adce61"
dependencies = [
"alloy",
"async-stream",

View File

@@ -11,7 +11,7 @@ tracing = "0.1.37"
# Tycho dependencies
tycho-common = "0.83.4"
tycho-client = "0.83.4"
tycho-simulation = { git = "https://github.com/propeller-heads/tycho-simulation.git", tag = "0.158.0", features = ["evm"] }
tycho-simulation = { git = "https://github.com/propeller-heads/tycho-simulation.git", tag = "0.159.0", features = ["evm"] }
## TODO: for local development
#tycho-simulation = { path = "../../tycho-simulation" }
num-bigint = "0.4"

View File

@@ -213,6 +213,7 @@ impl TestRunner {
skip_balance_check,
config,
&self.adapter_contract_builder,
self.vm_traces,
)
},
&test.expected_components,
@@ -245,6 +246,7 @@ fn validate_state(
skip_balance_check: bool,
config: &IntegrationTestsConfig,
adapter_contract_builder: &AdapterContractBuilder,
vm_traces: bool,
) -> miette::Result<()> {
let rt = Runtime::new().unwrap();
@@ -362,7 +364,9 @@ fn validate_state(
tycho_simulation::evm::engine_db::SHARED_TYCHO_DB.clear();
let mut decoder = TychoStreamDecoder::new();
let decoder_context = DecoderContext::new().vm_adapter_path(adapter_contract_path_str);
let decoder_context = DecoderContext::new()
.vm_adapter_path(adapter_contract_path_str)
.vm_trace(vm_traces);
decoder.register_decoder_with_context::<EVMPoolState<PreCachedDB>>(
protocol_system,
decoder_context,