From 22b54295b083d7b8b495d0540b56a4c55f5134d9 Mon Sep 17 00:00:00 2001 From: Pavlo Khrystenko
,
+
+ records: Vec,
+ pending: Vec,
+ records_inner: Vec,
+ /// Track the calls that must be skipped.
+ /// We track this on a different stack to easily skip the `call_end`
+ /// instances, if they were marked to be skipped in the `call_start`.
+ call_skip_tracker: Vec,
+ /// Mark the next call at a given depth and having the given address accesses.
+ /// This is useful, for example to skip nested constructor calls after CREATE,
+ /// to allow us to omit/flatten them like in EVM.
+ skip_next_call: Option<(u64, CallAddresses)>,
+}
+
+/// Represents the account access during vm execution.
+#[derive(Debug, Clone)]
+pub struct AccountAccess {
+ /// Call depth.
+ pub depth: u64,
+ /// Call type.
+ pub kind: AccountAccessKind,
+ /// Account that was accessed.
+ pub account: H160,
+ /// Accessor account.
+ pub accessor: H160,
+ /// Call data.
+ pub data: Bytes,
+ /// Deployed bytecode hash if CREATE.
+ pub deployed_bytecode_hash: Option,
+ /// Call value.
+ pub value: U256,
+ /// Previous balance of the accessed account.
+ pub old_balance: U256,
+ /// New balance of the accessed account.
+ pub new_balance: U256,
+ /// Storage slots that were accessed.
+ pub storage_accesses: Vec,
+}
+
+#[derive(Debug, Default, Clone)]
+struct CallAddresses {
+ pub to: H160,
+ pub from: H160,
+}
+
+impl StorageTracer {
+ pub fn get_records(&self) -> Vec {
+ assert!(
+ self.call_skip_tracker.is_empty(),
+ "call skip tracker is not empty; found calls without matching returns: {:?}",
+ self.call_skip_tracker
+ );
+ assert!(
+ self.skip_next_call.is_none(),
+ "skip next call is not empty: {:?}",
+ self.skip_next_call
+ );
+ assert!(
+ self.pending.is_empty(),
+ "pending call stack is not empty; found calls without matching returns: {:?}",
+ self.pending
+ );
+ assert!(
+ self.records_inner.is_empty(),
+ "inner stack is not empty; found calls without matching returns: {:?}",
+ self.records_inner
+ );
+ self.records.clone()
+ }
+}
+
+impl Tracing for StorageTracer {
+ fn instantiate_code(&mut self, code: &Code, _salt: Option<&[u8; 32]>) {
+ self.is_create = Some(code.clone());
+ }
+
+ fn enter_child_span(
+ &mut self,
+ from: H160,
+ to: H160,
+ is_delegate_call: bool,
+ is_read_only: bool,
+ value: U256,
+ input: &[u8],
+ _gas: Weight,
+ ) {
+ use pallet_revive::{AccountId32Mapper, AddressMapper};
+ let system_addr = AccountId32Mapper::::to_address(
+ &pallet_revive::Pallet::::account_id(),
+ );
+ if system_addr == from || system_addr == to || is_read_only {
+ self.call_skip_tracker.push(true);
+ return;
+ }
+ let kind = if self.is_create.is_some() {
+ AccountAccessKind::Create
+ } else {
+ AccountAccessKind::Call
+ };
+
+ let last_depth = if !self.pending.is_empty() {
+ self.pending.last().map(|record| record.depth).expect("must have at least one record")
+ } else {
+ self.records.last().map(|record| record.depth).unwrap_or_default()
+ };
+ let new_depth = last_depth.checked_add(1).expect("overflow in recording call depth");
+
+ // For create we expect another CALL if the constructor is invoked. We need to skip/flatten
+ // this call so it is consistent with CREATE in the EVM.
+ match kind {
+ AccountAccessKind::Create => {
+ // skip the next nested call to the created address from the caller.
+ self.skip_next_call =
+ Some((new_depth.saturating_add(1), CallAddresses { to, from }));
+ }
+ AccountAccessKind::Call => {
+ if let Some((depth, call_addr)) = self.skip_next_call.take()
+ && depth == new_depth
+ && call_addr.from == from
+ && call_addr.to == to
+ {
+ self.call_skip_tracker.push(true);
+ return;
+ }
+ }
+ _ => panic!("cant be matched"),
+ }
+ self.call_skip_tracker.push(false);
+ self.pending.push(AccountAccess {
+ depth: new_depth,
+ kind,
+ account: to,
+ accessor: from,
+ // TODO: call.input is different from evm
+ data: Bytes::from(input.to_vec()),
+ deployed_bytecode_hash: None,
+ value,
+ old_balance: pallet_revive::Pallet::::evm_balance(&to),
+ new_balance: U256::zero(),
+ storage_accesses: Default::default(),
+ });
+
+ if !is_delegate_call {
+ self.current_addr = to;
+ }
+ }
+
+ fn exit_child_span_with_error(
+ &mut self,
+ _error: polkadot_sdk::sp_runtime::DispatchError,
+ _gas_left: Weight,
+ ) {
+ self.is_create = None
+ }
+
+ fn exit_child_span(
+ &mut self,
+ _output: &polkadot_sdk::pallet_revive::ExecReturnValue,
+ _gas_left: Weight,
+ ) {
+ let skip_call =
+ self.call_skip_tracker.pop().expect("unexpected return while skipping call recording");
+ if skip_call {
+ return;
+ }
+ let mut record = self.pending.pop().expect("unexpected return while recording call");
+ record.new_balance = pallet_revive::Pallet::::evm_balance(&self.current_addr);
+ let is_create = self.is_create.take();
+ if is_create.is_some() {
+ match is_create {
+ Some(Code::Existing(_)) => (),
+ Some(Code::Upload(_)) => (),
+ None => (),
+ }
+ }
+
+ if let Some((depth, _)) = &self.skip_next_call
+ && record.depth < *depth
+ {
+ // reset call skip if not encountered (depth has been crossed)
+ self.skip_next_call = None;
+ }
+
+ if self.pending.is_empty() {
+ // no more pending records, append everything recorded so far.
+ self.records.push(record);
+
+ // also append the inner records.
+ if !self.records_inner.is_empty() {
+ self.records.extend(std::mem::take(&mut self.records_inner));
+ }
+ } else {
+ // we have pending records, so record to inner.
+ self.records_inner.push(record);
+ }
+ }
+
+ fn storage_read(&mut self, key: &polkadot_sdk::pallet_revive::Key, value: Option<&[u8]>) {
+ let record = self.pending.last_mut().expect("expected at least one record");
+ record.storage_accesses.push(StorageAccess {
+ account: self.current_addr.0.into(),
+ slot: RU256::from_be_slice(key.unhashed()).into(),
+ isWrite: false,
+ previousValue: RU256::from_be_slice(value.unwrap_or_default()).into(),
+ newValue: RU256::from_be_slice(value.unwrap_or_default()).into(),
+ reverted: false,
+ });
+ }
+ fn storage_write(
+ &mut self,
+ key: &polkadot_sdk::pallet_revive::Key,
+ old_value: Option>,
+ new_value: Option<&[u8]>,
+ ) {
+ let record = self.pending.last_mut().expect("expected at least one record");
+ record.storage_accesses.push(StorageAccess {
+ account: self.current_addr.0.into(),
+ slot: RU256::from_be_slice(key.unhashed()).into(),
+ isWrite: true,
+ previousValue: RU256::from_be_slice(old_value.unwrap_or_default().as_slice()).into(),
+ newValue: RU256::from_be_slice(new_value.unwrap_or_default()).into(),
+ reverted: false,
+ });
+ }
+}
diff --git a/crates/revive-utils/Cargo.toml b/crates/revive-utils/Cargo.toml
new file mode 100644
index 0000000000000..80e74221d3922
--- /dev/null
+++ b/crates/revive-utils/Cargo.toml
@@ -0,0 +1,28 @@
+[package]
+name = "revive-utils"
+description = "Foundry revive helpers"
+
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+authors.workspace = true
+license.workspace = true
+homepage.workspace = true
+repository.workspace = true
+exclude.workspace = true
+
+[dependencies]
+foundry-evm-core.workspace = true
+foundry-evm-traces.workspace = true
+polkadot-sdk = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "master", features = [
+ "experimental",
+ "runtime",
+ "polkadot-runtime-common",
+ "pallet-revive",
+ "pallet-balances",
+ "pallet-timestamp"
+]}
+revive-env.workspace = true
+
+alloy-primitives.workspace = true
+revm.workspace = true
diff --git a/crates/revive-utils/src/lib.rs b/crates/revive-utils/src/lib.rs
new file mode 100644
index 0000000000000..d913a785ebf5f
--- /dev/null
+++ b/crates/revive-utils/src/lib.rs
@@ -0,0 +1,330 @@
+use alloy_primitives::{Address, B256, Bytes, Log, U256 as RU256};
+use foundry_evm_core::{Ecx, InspectorExt};
+use foundry_evm_traces::{
+ CallTraceArena, GethTraceBuilder, ParityTraceBuilder, TracingInspector, TracingInspectorConfig,
+};
+use polkadot_sdk::pallet_revive::evm::{CallTrace, CallType};
+use revm::{
+ Inspector,
+ context::{ContextTr, CreateScheme},
+ inspector::JournalExt,
+ interpreter::{
+ CallInputs, CallOutcome, CreateInputs, CreateOutcome, Gas, InstructionResult, Interpreter,
+ InterpreterResult,
+ },
+};
+
+/// A Wrapper around [TracingInspector] to allow adding zkEVM traces.
+#[derive(Clone, Debug, Default)]
+pub struct TraceCollector {
+ inner: TracingInspector,
+}
+
+impl TraceCollector {
+ /// Returns a new instance for the given config
+ pub fn new(config: TracingInspectorConfig) -> Self {
+ Self { inner: TracingInspector::new(config) }
+ }
+
+ /// Returns the inner [`TracingInspector`]
+ #[inline]
+ pub fn inner(&mut self) -> &mut TracingInspector {
+ &mut self.inner
+ }
+
+ /// Resets the inspector to its initial state of [Self::new].
+ /// This makes the inspector ready to be used again.
+ ///
+ /// Note that this method has no effect on the allocated capacity of the vector.
+ #[inline]
+ pub fn fuse(&mut self) {
+ self.inner.fuse()
+ }
+
+ /// Resets the inspector to it's initial state of [Self::new].
+ #[inline]
+ pub fn fused(self) -> Self {
+ Self { inner: self.inner.fused() }
+ }
+
+ /// Returns the config of the inspector.
+ pub const fn config(&self) -> &TracingInspectorConfig {
+ self.inner.config()
+ }
+
+ /// Returns a mutable reference to the config of the inspector.
+ pub fn config_mut(&mut self) -> &mut TracingInspectorConfig {
+ self.inner.config_mut()
+ }
+
+ /// Updates the config of the inspector.
+ pub fn update_config(
+ &mut self,
+ f: impl FnOnce(TracingInspectorConfig) -> TracingInspectorConfig,
+ ) {
+ self.inner.update_config(f);
+ }
+
+ /// Gets a reference to the recorded call traces.
+ pub const fn traces(&self) -> &CallTraceArena {
+ self.inner.traces()
+ }
+
+ /// Gets a mutable reference to the recorded call traces.
+ pub fn traces_mut(&mut self) -> &mut CallTraceArena {
+ self.inner.traces_mut()
+ }
+
+ /// Consumes the inspector and returns the recorded call traces.
+ pub fn into_traces(self) -> CallTraceArena {
+ self.inner.into_traces()
+ }
+
+ /// Manually the gas used of the root trace.
+ ///
+ /// This is useful if the root trace's gasUsed should mirror the actual gas used by the
+ /// transaction.
+ ///
+ /// This allows setting it manually by consuming the execution result's gas for example.
+ #[inline]
+ pub fn set_transaction_gas_used(&mut self, gas_used: u64) {
+ self.inner.set_transaction_gas_used(gas_used)
+ }
+
+ /// Convenience function for [ParityTraceBuilder::set_transaction_gas_used] that consumes the
+ /// type.
+ #[inline]
+ pub fn with_transaction_gas_used(self, gas_used: u64) -> Self {
+ Self { inner: self.inner.with_transaction_gas_used(gas_used) }
+ }
+
+ /// Consumes the Inspector and returns a [ParityTraceBuilder].
+ #[inline]
+ pub fn into_parity_builder(self) -> ParityTraceBuilder {
+ self.inner.into_parity_builder()
+ }
+
+ /// Consumes the Inspector and returns a [GethTraceBuilder].
+ #[inline]
+ pub fn into_geth_builder(self) -> GethTraceBuilder<'static> {
+ self.inner.into_geth_builder()
+ }
+}
+
+impl Inspector for TraceCollector
+where
+ CTX: ContextTr,
+{
+ #[inline]
+ fn step(&mut self, interp: &mut Interpreter, context: &mut CTX) {
+ self.inner.step(interp, context)
+ }
+
+ #[inline]
+ fn step_end(&mut self, interp: &mut Interpreter, context: &mut CTX) {
+ self.inner.step_end(interp, context)
+ }
+
+ fn log(&mut self, interp: &mut Interpreter, context: &mut CTX, log: Log) {
+ self.inner.log(interp, context, log)
+ }
+
+ fn call(&mut self, context: &mut CTX, inputs: &mut CallInputs) -> Option {
+ self.inner.call(context, inputs)
+ }
+
+ fn call_end(&mut self, context: &mut CTX, inputs: &CallInputs, outcome: &mut CallOutcome) {
+ self.inner.call_end(context, inputs, outcome)
+ }
+
+ fn create(&mut self, context: &mut CTX, inputs: &mut CreateInputs) -> Option {
+ self.inner.create(context, inputs)
+ }
+
+ fn create_end(
+ &mut self,
+ context: &mut CTX,
+ inputs: &CreateInputs,
+ outcome: &mut CreateOutcome,
+ ) {
+ self.inner.create_end(context, inputs, outcome)
+ }
+
+ // EOF create hooks were removed in current revm version; only standard create is supported.
+
+ fn selfdestruct(&mut self, contract: Address, target: Address, value: RU256) {
+ >::selfdestruct(&mut self.inner, contract, target, value)
+ }
+}
+
+impl InspectorExt for TraceCollector {
+ fn trace_revive(
+ &mut self,
+ context: Ecx<'_, '_, '_>,
+ call_traces: Box,
+ record_top_call: bool,
+ ) {
+ let call_traces = *call_traces
+ .downcast::()
+ .expect("TraceCollector::trace_revive expected call traces to be a CallTrace");
+ use revm::Inspector;
+ fn trace_call_recursive(
+ tracer: &mut TracingInspector,
+ context: Ecx<'_, '_, '_>,
+ call: CallTrace,
+ suppressed_top_call: bool,
+ ) -> u64 {
+ let inputs = &mut CallInputs {
+ input: revm::interpreter::CallInput::Bytes(call.input.0.clone().into()),
+ gas_limit: call.gas.as_u64(),
+ scheme: revm::interpreter::CallScheme::Call,
+ caller: call.from.0.into(),
+ value: revm::interpreter::CallValue::Transfer(RU256::from_be_bytes(
+ call.value.unwrap_or_default().to_big_endian(),
+ )),
+ target_address: call.to.0.into(),
+ bytecode_address: call.to.0.into(),
+ is_static: false,
+ return_memory_offset: Default::default(),
+ };
+ let is_first_non_system_call = !suppressed_top_call;
+
+ // We ignore traces from system addresses, the default account abstraction calls on
+ // caller address, and the original call (identified when neither `to` or
+ // `from` are system addresses) since it is already included in EVM trace.
+ let record_trace =
+ !is_first_non_system_call && inputs.target_address != context.tx.caller;
+
+ let mut outcome = if let Some(reason) = &call.revert_reason {
+ CallOutcome {
+ result: InterpreterResult {
+ result: InstructionResult::Revert,
+ output: reason.as_bytes().to_owned().into(),
+ gas: Gas::new_spent(call.gas_used.as_u64()),
+ },
+ memory_offset: Default::default(),
+ }
+ } else {
+ CallOutcome {
+ result: InterpreterResult {
+ result: InstructionResult::Return,
+ output: call.output.clone().0.into(),
+ gas: Gas::new_spent(call.gas_used.as_u64()),
+ },
+ memory_offset: Default::default(),
+ }
+ };
+
+ let mut create_inputs =
+ if matches!(call.call_type, CallType::Create | CallType::Create2) {
+ let scheme = match call.call_type {
+ CallType::Create => CreateScheme::Create,
+ CallType::Create2 => CreateScheme::Create2 {
+ salt: RU256::from_be_slice(call.input.0.as_ref()),
+ },
+ _ => panic!("impossible"),
+ };
+ Some(CreateInputs {
+ caller: inputs.caller,
+ scheme,
+ value: inputs.value.get(),
+ init_code: inputs.input.bytes(context),
+ gas_limit: inputs.gas_limit,
+ })
+ } else {
+ None
+ };
+
+ // start span
+ if record_trace {
+ if let Some(inputs) = &mut create_inputs {
+ tracer.create(context, inputs);
+ } else {
+ tracer.call(context, inputs);
+ }
+ }
+ for log in call.logs {
+ tracer.log(
+ &mut Default::default(),
+ context,
+ Log::new_unchecked(
+ log.address.0.into(),
+ log.topics.iter().map(|x| B256::from_slice(x.as_bytes())).collect(),
+ log.data.0.into(),
+ ),
+ );
+ }
+
+ // We increment the depth for inner calls as normally traces are processed
+ // during execution, where the environment takes care of updating the context
+ let (new_depth, overflow) = context.journaled_state.depth.overflowing_add(1);
+ if !overflow && record_trace {
+ context.journaled_state.depth = new_depth;
+ }
+
+ // recurse into inner calls
+ // record extra gas from ignored traces, to add it at end
+ let mut extra_gas = if record_trace { 0u64 } else { call.gas_used.as_u64() };
+ for inner_call in call.calls {
+ let inner_extra_gas = trace_call_recursive(
+ tracer,
+ context,
+ inner_call,
+ suppressed_top_call || is_first_non_system_call,
+ );
+ extra_gas = extra_gas.saturating_add(inner_extra_gas);
+ }
+
+ // We then decrement the call depth so `call_end`/`create_end` has the correct context
+ if !overflow && record_trace {
+ context.journaled_state.depth = context.journaled_state.depth.saturating_sub(1);
+ }
+
+ // finish span
+ if record_trace {
+ if let Some(inputs) = &mut create_inputs {
+ let mut outcome = if let Some(reason) = call.revert_reason {
+ CreateOutcome {
+ result: InterpreterResult {
+ result: InstructionResult::Revert,
+ output: reason.as_bytes().to_owned().into(),
+ gas: Gas::new_spent(call.gas_used.as_u64() + extra_gas),
+ },
+ address: None,
+ }
+ } else {
+ CreateOutcome {
+ result: InterpreterResult {
+ result: InstructionResult::Return,
+ output: Bytes::from(call.output.clone().0),
+ gas: Gas::new_spent(call.gas_used.as_u64() + extra_gas),
+ },
+ address: Some(call.to.0.into()),
+ }
+ };
+
+ tracer.create_end(context, inputs, &mut outcome);
+ } else {
+ if extra_gas != 0 {
+ outcome.result.gas = Gas::new_spent(outcome.result.gas.spent() + extra_gas);
+ }
+ tracer.call_end(context, inputs, &mut outcome);
+ }
+ }
+
+ extra_gas
+ }
+
+ let (new_depth, overflow) = context.journaled_state.depth.overflowing_add(1);
+ // If we are going to record the top call then we don't want to change the call depth
+ if !overflow && !record_top_call {
+ context.journaled_state.depth = new_depth;
+ }
+
+ trace_call_recursive(&mut self.inner, context, call_traces, record_top_call);
+
+ if !overflow && !record_top_call {
+ context.journaled_state.depth = context.journaled_state.depth.saturating_sub(1);
+ }
+ }
+}
From ebd0fbe97c63011a9fc4b4cb02256abbf899235f Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Wed, 22 Oct 2025 14:17:53 +0200
Subject: [PATCH 02/12] fixup rest of the tests
---
crates/forge/tests/cli/revive_vm.rs | 125 +++++++++----------
crates/revive-strategy/src/cheatcodes/mod.rs | 15 ++-
2 files changed, 74 insertions(+), 66 deletions(-)
diff --git a/crates/forge/tests/cli/revive_vm.rs b/crates/forge/tests/cli/revive_vm.rs
index 71019b67f96f6..7341542e48fc6 100644
--- a/crates/forge/tests/cli/revive_vm.rs
+++ b/crates/forge/tests/cli/revive_vm.rs
@@ -304,9 +304,8 @@ contract Load is DSTest {
Vm constant vm = Vm(HEVM_ADDRESS);
function testFuzz_Load(uint256 x) public {
- vm.pvm(true);
- Counter counter = new Counter(x);
- bytes32 res = vm.load(address(counter), bytes32(uint256(0)));
+ address counter = address(new Counter(x));
+ bytes32 res = vm.load(counter, bytes32(uint256(0)));
assertEq(uint256(res), x);
}
}
@@ -314,7 +313,7 @@ function testFuzz_Load(uint256 x) public {
)
.unwrap();
- let res = cmd.args(["test", "--resolc", "-vvv"]).assert_success();
+ let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvv"]).assert_success();
res.stderr_eq(str![""]).stdout_eq(str![[r#"
[COMPILING_FILES] with [SOLC_VERSION]
[SOLC_VERSION] [ELAPSED]
@@ -405,7 +404,7 @@ function test_expectRevert() public {
.unwrap();
prj.update_config(|config| config.evm_version = EvmVersion::Cancun);
- let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert();
+ let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert_success();
res.stderr_eq("").stdout_eq(str![[r#"
[COMPILING_FILES] with [SOLC_VERSION]
[SOLC_VERSION] [ELAPSED]
@@ -418,52 +417,52 @@ Ran 2 tests for src/CounterTest.t.sol:CounterTest
[PASS] test_Increment() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[6405872] CounterTest::test_Increment()
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 5
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(55)
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(55)
│ ├─ emit SetNumber(result: 55)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 55
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::increment()
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::increment()
│ ├─ emit Increment(result: 56)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 56
└─ ← [Stop]
[PASS] test_expectRevert() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[1280139] CounterTest::test_expectRevert()
├─ [0] VM::expectRevert(custom error 0xf28dceb3: 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006456941a80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076661696c7572650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
│ └─ ← [Return]
- ├─ [1271300] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::failed_call() [staticcall]
+ ├─ [1271300] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::failed_call() [staticcall]
│ └─ ← [Revert] Revert("failure")
└─ ← [Stop]
@@ -587,7 +586,7 @@ contract RecordTest is DSTest {
.unwrap();
prj.update_config(|config| config.evm_version = EvmVersion::Cancun);
- let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert();
+ let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert_success();
res.stdout_eq(str![[r#"
[COMPILING_FILES] with [SOLC_VERSION]
[SOLC_VERSION] [ELAPSED]
@@ -904,7 +903,7 @@ contract Emitterv2 {
.unwrap();
prj.update_config(|config| config.evm_version = EvmVersion::Cancun);
- let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert();
+ let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert_success();
res.stderr_eq("").stdout_eq(str![[r#"
[COMPILING_FILES] with [SOLC_VERSION]
[SOLC_VERSION] [ELAPSED]
@@ -917,21 +916,21 @@ Ran 7 tests for src/Test.t.sol:RecordLogsTest
[PASS] testEmitRecordEmit() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[2618379] RecordLogsTest::testEmitRecordEmit()
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic12(topic1: 1, topic2: 2, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic1(topic1: 3, data: 0x2e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
+ │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -939,12 +938,12 @@ Traces:
[PASS] testRecordOffGetsNothing() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1330390] RecordLogsTest::testRecordOffGetsNothing()
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
@@ -956,7 +955,7 @@ Traces:
[PASS] testRecordOnEmitDifferentDepths() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -964,26 +963,26 @@ Traces:
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ emit LogTopic(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1301614] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1301614] → new @0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9
│ └─ ← [Return] 10554 bytes of code
- ├─ [1301600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
- │ ├─ [180261329] 0x104fBc016F4bb334D775a19E8A6510109AC63E00::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1301600] 0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ │ ├─ [180261329000] 0x5B0091f49210e7B2A57B03dfE1AB9D08289d9294::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x104fBc016F4bb334D775a19E8A6510109AC63E00)]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::getEmitterAddr() [staticcall]
- │ └─ ← [Return] 0x104fBc016F4bb334D775a19E8A6510109AC63E00
+ │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x5B0091f49210e7B2A57B03dfE1AB9D08289d9294)]
+ ├─ [1271500] 0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9::getEmitterAddr() [staticcall]
+ │ └─ ← [Return] 0x5B0091f49210e7B2A57B03dfE1AB9D08289d9294
└─ ← [Stop]
[PASS] testRecordOnNoLogs() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -997,35 +996,35 @@ Traces:
[PASS] testRecordOnSingleLog() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1297357] RecordLogsTest::testRecordOnSingleLog()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x4576656e74204461746120696e20537472696e67)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
└─ ← [Stop]
[PASS] testRecordOnSingleLogTopic0() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1334639] RecordLogsTest::testRecordOnSingleLogTopic0()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
+ │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -1033,36 +1032,36 @@ Traces:
[PASS] testRecordsConsumednAsRead() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[6525856] RecordLogsTest::testRecordsConsumednAsRead()
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
│ ├─ emit LogTopic1(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ [0] VM::getRecordedLogs()
│ └─ ← [Return] []
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
- ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ ├─ emit LogTopic123(topic1: 7, topic2: 8, topic3: 9, data: 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -1200,7 +1199,7 @@ forgetest!(record_accesses, |prj, cmd| {
.unwrap();
prj.update_config(|config| config.evm_version = EvmVersion::Cancun);
- let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert();
+ let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvvvv"]).assert_success();
res.stdout_eq(str![[r#"
[COMPILING_FILES] with [SOLC_VERSION]
[SOLC_VERSION] [ELAPSED]
@@ -1213,57 +1212,57 @@ Ran 3 tests for src/Test.t.sol:StateDiffTest
[PASS] testCallAcceses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
- ├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
- │ └─ ← [Return] 5531 bytes of code
├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ │ └─ ← [Return] 5531 bytes of code
+ ├─ [1291513] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
[1320342] StateDiffTest::testCallAcceses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
- ├─ [1291500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setter(55)
+ ├─ [1291500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setter(55)
│ └─ ← [Stop]
├─ [0] VM::stopAndReturnStateDiff()
- │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 1)]
+ │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 1)]
└─ ← [Stop]
[PASS] testCallProxyAcceses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
- ├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
- │ └─ ← [Return] 5531 bytes of code
├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ │ └─ ← [Return] 5531 bytes of code
+ ├─ [1291513] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
[1338955] StateDiffTest::testCallProxyAcceses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
- ├─ [1301600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::proxyCall(55)
- │ ├─ [276683525] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setter(55)
+ ├─ [1301600] 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a::proxyCall(55)
+ │ ├─ [276683525000] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setter(55)
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::stopAndReturnStateDiff()
- │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 0, 0xac1b14ff0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000000, false, 0x0000000000000000000000007d8cb8f412b3ee9ac79558791333f41d2b1ccdac, 0x0000000000000000000000007d8cb8f412b3ee9ac79558791333f41d2b1ccdac, false)], 1), ((0, 31337 [3.133e4]), 0, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 2)]
+ │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 0, 0xac1b14ff0000000000000000000000000000000000000000000000000000000000000037, false, [(0xF62849F9A0B5Bf2913b396098F7c7019b51A820a, 0x0000000000000000000000000000000000000000000000000000000000000000, false, 0x0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f, 0x0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f, false)], 1), ((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 2)]
└─ ← [Stop]
[PASS] testCreateAcceses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
- ├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
- │ └─ ← [Return] 5531 bytes of code
├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ │ └─ ← [Return] 5531 bytes of code
+ ├─ [1291513] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
[1345790] StateDiffTest::testCreateAcceses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
- ├─ [1291511] → new @0x2e234DAe75C793f67A35089C9d99245E1C58470b
+ ├─ [1291511] → new @0xc7183455a4C133Ae270771860664b6B7ec320bB1
│ └─ ← [Return] 5531 bytes of code
├─ [0] VM::stopAndReturnStateDiff()
- │ └─ ← [Return] [((0, 31337 [3.133e4]), 4, 0x2e234DAe75C793f67A35089C9d99245E1C58470b, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 1000000000000000000 [1e18], 0x0000000000000000000000000000000000000000000000000000000000000064, false, [(0x2e234DAe75C793f67A35089C9d99245E1C58470b, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, false), (0x2e234DAe75C793f67A35089C9d99245E1C58470b, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000064, false)], 1)]
+ │ └─ ← [Return] [((0, 31337 [3.133e4]), 4, 0xc7183455a4C133Ae270771860664b6B7ec320bB1, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 1000000000000000000 [1e18], 0x0000000000000000000000000000000000000000000000000000000000000064, false, [(0xc7183455a4C133Ae270771860664b6B7ec320bB1, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, false), (0xc7183455a4C133Ae270771860664b6B7ec320bB1, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000064, false)], 1)]
└─ ← [Stop]
Suite result: ok. 3 passed; 0 failed; 0 skipped; [ELAPSED]
diff --git a/crates/revive-strategy/src/cheatcodes/mod.rs b/crates/revive-strategy/src/cheatcodes/mod.rs
index 846e760a467d9..87dadaaa56f39 100644
--- a/crates/revive-strategy/src/cheatcodes/mod.rs
+++ b/crates/revive-strategy/src/cheatcodes/mod.rs
@@ -741,9 +741,14 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
- // TODO: Find a way how to do it correctly
- // Use pallet-revive origin to bypass EIP-3607.
- let origin = OriginFor::::signed(Pallet::::account_id());
+ let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
+ &H160::from_slice(input.caller().as_slice()),
+ ));
+ // Pre-Dispatch Increments the nonce of the origin, so let's make sure we do
+ // that here too to replicate the same address generation.
+ System::inc_account_nonce(&AccountId::to_fallback_account_id(
+ &H160::from_slice(input.caller().as_slice()),
+ ));
let evm_value = sp_core::U256::from_little_endian(&input.value().as_le_bytes());
let (gas_limit, storage_deposit_limit) =
@@ -751,6 +756,7 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
gas_limit,
)
.expect("gas limit is valid");
+
let storage_deposit_limit = DepositLimit::Balance(storage_deposit_limit);
let code = Code::Upload(contract.resolc_bytecode.as_bytes().unwrap().to_vec());
let data = constructor_args.to_vec();
@@ -882,6 +888,9 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
&H160::from_slice(call.caller.as_slice()),
));
+ System::inc_account_nonce(&AccountId::to_fallback_account_id(
+ &H160::from_slice(call.caller.as_slice()),
+ ));
let evm_value =
sp_core::U256::from_little_endian(&call.call_value().as_le_bytes());
From 8dd5987a8508948a9064da18923a274f300dc6d0 Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Wed, 22 Oct 2025 14:54:24 +0200
Subject: [PATCH 03/12] upd tests again
---
crates/forge/tests/cli/revive_vm.rs | 114 +++++++++----------
crates/revive-strategy/src/cheatcodes/mod.rs | 21 ++--
2 files changed, 66 insertions(+), 69 deletions(-)
diff --git a/crates/forge/tests/cli/revive_vm.rs b/crates/forge/tests/cli/revive_vm.rs
index 7341542e48fc6..1645112392ee8 100644
--- a/crates/forge/tests/cli/revive_vm.rs
+++ b/crates/forge/tests/cli/revive_vm.rs
@@ -417,52 +417,52 @@ Ran 2 tests for src/CounterTest.t.sol:CounterTest
[PASS] test_Increment() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291514] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
+ ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[6405872] CounterTest::test_Increment()
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
│ └─ ← [Return] 5
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(55)
+ ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::setNumber(55)
│ ├─ emit SetNumber(result: 55)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
│ └─ ← [Return] 55
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::increment()
+ ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::increment()
│ ├─ emit Increment(result: 56)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
│ └─ ← [Return] 56
└─ ← [Stop]
[PASS] test_expectRevert() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291514] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
+ ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[1280139] CounterTest::test_expectRevert()
├─ [0] VM::expectRevert(custom error 0xf28dceb3: 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006456941a80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076661696c7572650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
│ └─ ← [Return]
- ├─ [1271300] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::failed_call() [staticcall]
+ ├─ [1271300] 0x34A1D3fff3958843C43aD80F30b94c510645C316::failed_call() [staticcall]
│ └─ ← [Revert] Revert("failure")
└─ ← [Stop]
@@ -599,50 +599,50 @@ Ran 2 tests for src/Test.t.sol:RecordTest
[PASS] testRecordAccess() ([GAS])
Traces:
[3873734] RecordTest::testRecordAccess()
- ├─ [1250013] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250013] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 4095 bytes of code
- ├─ [1250012] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250012] → new @0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496
│ └─ ← [Return] 2182 bytes of code
├─ [0] VM::record()
│ └─ ← [Return]
- ├─ [1301608] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
- │ ├─ [269107405] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
+ ├─ [1301608] 0x34A1D3fff3958843C43aD80F30b94c510645C316::record(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
+ │ ├─ [269107405000] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
- ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
+ ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000001], [0x0000000000000000000000000000000000000000000000000000000000000001]
- ├─ [0] VM::accesses(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
+ ├─ [0] VM::accesses(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000002], [0x0000000000000000000000000000000000000000000000000000000000000002]
└─ ← [Stop]
[PASS] testStopRecordAccess() ([GAS])
Traces:
[5179200] RecordTest::testStopRecordAccess()
- ├─ [1250013] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ ├─ [1250013] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 4095 bytes of code
- ├─ [1250012] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250012] → new @0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496
│ └─ ← [Return] 2182 bytes of code
├─ [0] VM::record()
│ └─ ← [Return]
- ├─ [1301608] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
- │ ├─ [269107405] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
+ ├─ [1301608] 0x34A1D3fff3958843C43aD80F30b94c510645C316::record(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
+ │ ├─ [269107405000] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
- ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
+ ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000001], [0x0000000000000000000000000000000000000000000000000000000000000001]
├─ [0] VM::stopRecord()
│ └─ ← [Return]
- ├─ [1301600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
- │ ├─ [269187053] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
+ ├─ [1301600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::record(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
+ │ ├─ [269187053000] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
- ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
+ ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000001], [0x0000000000000000000000000000000000000000000000000000000000000001]
├─ [0] VM::record()
│ └─ ← [Return]
├─ [0] VM::stopRecord()
│ └─ ← [Return]
- ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
+ ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
│ └─ ← [Return] [], []
└─ ← [Stop]
@@ -916,21 +916,21 @@ Ran 7 tests for src/Test.t.sol:RecordLogsTest
[PASS] testEmitRecordEmit() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[2618379] RecordLogsTest::testEmitRecordEmit()
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic12(topic1: 1, topic2: 2, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic1(topic1: 3, data: 0x2e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -938,12 +938,12 @@ Traces:
[PASS] testRecordOffGetsNothing() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1330390] RecordLogsTest::testRecordOffGetsNothing()
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
@@ -955,7 +955,7 @@ Traces:
[PASS] testRecordOnEmitDifferentDepths() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -963,26 +963,26 @@ Traces:
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ emit LogTopic(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1301614] → new @0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9
+ ├─ [1301614] → new @0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496
│ └─ ← [Return] 10554 bytes of code
- ├─ [1301600] 0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
- │ ├─ [180261329000] 0x5B0091f49210e7B2A57B03dfE1AB9D08289d9294::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1301600] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ │ ├─ [180261329000] 0x2b42C737b072481672Bb458260e9b59CB2268dc6::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x5B0091f49210e7B2A57B03dfE1AB9D08289d9294)]
- ├─ [1271500] 0x5991A2dF15A8F6A256D3Ec51E99254Cd3fb576A9::getEmitterAddr() [staticcall]
- │ └─ ← [Return] 0x5B0091f49210e7B2A57B03dfE1AB9D08289d9294
+ │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x2b42C737b072481672Bb458260e9b59CB2268dc6)]
+ ├─ [1271500] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::getEmitterAddr() [staticcall]
+ │ └─ ← [Return] 0x2b42C737b072481672Bb458260e9b59CB2268dc6
└─ ← [Stop]
[PASS] testRecordOnNoLogs() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -996,35 +996,35 @@ Traces:
[PASS] testRecordOnSingleLog() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1297357] RecordLogsTest::testRecordOnSingleLog()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x4576656e74204461746120696e20537472696e67)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
└─ ← [Stop]
[PASS] testRecordOnSingleLogTopic0() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1334639] RecordLogsTest::testRecordOnSingleLogTopic0()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -1032,36 +1032,36 @@ Traces:
[PASS] testRecordsConsumednAsRead() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[6525856] RecordLogsTest::testRecordsConsumednAsRead()
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
│ ├─ emit LogTopic1(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ [0] VM::getRecordedLogs()
│ └─ ← [Return] []
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
+ ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ ├─ emit LogTopic123(topic1: 7, topic2: 8, topic3: 9, data: 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
diff --git a/crates/revive-strategy/src/cheatcodes/mod.rs b/crates/revive-strategy/src/cheatcodes/mod.rs
index 87dadaaa56f39..41436264b1342 100644
--- a/crates/revive-strategy/src/cheatcodes/mod.rs
+++ b/crates/revive-strategy/src/cheatcodes/mod.rs
@@ -695,10 +695,10 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
}
if let Some(CreateScheme::Create) = input.scheme() {
- let caller = input.caller();
+ let caller = ecx.tx.caller;
let nonce = ecx
.journaled_state
- .load_account(input.caller())
+ .load_account(ecx.tx.caller)
.expect("to load caller account")
.info
.nonce;
@@ -736,18 +736,18 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
1u128 << 99,
);
let gas_limit = sp_core::U256::from(input.gas_limit()).min(max_gas);
- let is_recording = state.recorded_account_diffs_stack.is_some();
- let mut tracer = Tracer::new(is_recording);
+ let mut tracer = Tracer::new(true);
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
- &H160::from_slice(input.caller().as_slice()),
+ &H160::from_slice(ecx.tx.caller.as_slice()),
));
+
// Pre-Dispatch Increments the nonce of the origin, so let's make sure we do
// that here too to replicate the same address generation.
System::inc_account_nonce(&AccountId::to_fallback_account_id(
- &H160::from_slice(input.caller().as_slice()),
+ &H160::from_slice(ecx.tx.caller.as_slice()),
));
let evm_value = sp_core::U256::from_little_endian(&input.value().as_le_bytes());
@@ -880,17 +880,14 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
1u128 << 99,
);
let gas_limit = sp_core::U256::from(call.gas_limit).min(max_gas);
- let is_recording = state.recorded_account_diffs_stack.is_some();
- let mut tracer = Tracer::new(is_recording);
+ let mut tracer = Tracer::new(true);
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
- &H160::from_slice(call.caller.as_slice()),
- ));
- System::inc_account_nonce(&AccountId::to_fallback_account_id(
- &H160::from_slice(call.caller.as_slice()),
+ &H160::from_slice(ecx.tx.caller.as_slice()),
));
+
let evm_value =
sp_core::U256::from_little_endian(&call.call_value().as_le_bytes());
From 0e12159e806c8e454523ecb60c7b2511c95a2ace Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Wed, 22 Oct 2025 15:07:59 +0200
Subject: [PATCH 04/12] temp hack
---
crates/forge/tests/cli/revive_vm.rs | 86 ++++++++++----------
crates/revive-strategy/src/cheatcodes/mod.rs | 34 ++++++--
2 files changed, 70 insertions(+), 50 deletions(-)
diff --git a/crates/forge/tests/cli/revive_vm.rs b/crates/forge/tests/cli/revive_vm.rs
index 1645112392ee8..c80c816901779 100644
--- a/crates/forge/tests/cli/revive_vm.rs
+++ b/crates/forge/tests/cli/revive_vm.rs
@@ -313,7 +313,7 @@ function testFuzz_Load(uint256 x) public {
)
.unwrap();
- let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvv"]).assert_success();
+ let res = cmd.args(["test", "--resolc", "--resolc-startup", "-vvv"]).assert_success();
res.stderr_eq(str![""]).stdout_eq(str![[r#"
[COMPILING_FILES] with [SOLC_VERSION]
[SOLC_VERSION] [ELAPSED]
@@ -417,52 +417,52 @@ Ran 2 tests for src/CounterTest.t.sol:CounterTest
[PASS] test_Increment() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::setNumber(5)
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[6405872] CounterTest::test_Increment()
- ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 5
- ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::setNumber(55)
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(55)
│ ├─ emit SetNumber(result: 55)
│ └─ ← [Stop]
- ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 55
- ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::increment()
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::increment()
│ ├─ emit Increment(result: 56)
│ └─ ← [Stop]
- ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 56
└─ ← [Stop]
[PASS] test_expectRevert() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::setNumber(5)
+ ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x34A1D3fff3958843C43aD80F30b94c510645C316::number() [staticcall]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[1280139] CounterTest::test_expectRevert()
├─ [0] VM::expectRevert(custom error 0xf28dceb3: 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006456941a80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076661696c7572650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
│ └─ ← [Return]
- ├─ [1271300] 0x34A1D3fff3958843C43aD80F30b94c510645C316::failed_call() [staticcall]
+ ├─ [1271300] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::failed_call() [staticcall]
│ └─ ← [Revert] Revert("failure")
└─ ← [Stop]
@@ -916,21 +916,21 @@ Ran 7 tests for src/Test.t.sol:RecordLogsTest
[PASS] testEmitRecordEmit() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[2618379] RecordLogsTest::testEmitRecordEmit()
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic12(topic1: 1, topic2: 2, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic1(topic1: 3, data: 0x2e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
+ │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -938,12 +938,12 @@ Traces:
[PASS] testRecordOffGetsNothing() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1330390] RecordLogsTest::testRecordOffGetsNothing()
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
@@ -955,7 +955,7 @@ Traces:
[PASS] testRecordOnEmitDifferentDepths() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -963,26 +963,26 @@ Traces:
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ emit LogTopic(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1301614] → new @0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496
+ ├─ [1301614] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
│ └─ ← [Return] 10554 bytes of code
- ├─ [1301600] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
- │ ├─ [180261329000] 0x2b42C737b072481672Bb458260e9b59CB2268dc6::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1301600] 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ │ ├─ [180261329000] 0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x2b42C737b072481672Bb458260e9b59CB2268dc6)]
- ├─ [1271500] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::getEmitterAddr() [staticcall]
- │ └─ ← [Return] 0x2b42C737b072481672Bb458260e9b59CB2268dc6
+ │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2)]
+ ├─ [1271500] 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a::getEmitterAddr() [staticcall]
+ │ └─ ← [Return] 0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2
└─ ← [Stop]
[PASS] testRecordOnNoLogs() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -996,35 +996,35 @@ Traces:
[PASS] testRecordOnSingleLog() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1297357] RecordLogsTest::testRecordOnSingleLog()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x4576656e74204461746120696e20537472696e67)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
└─ ← [Stop]
[PASS] testRecordOnSingleLogTopic0() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1334639] RecordLogsTest::testRecordOnSingleLogTopic0()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
+ │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -1032,36 +1032,36 @@ Traces:
[PASS] testRecordsConsumednAsRead() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[6525856] RecordLogsTest::testRecordsConsumednAsRead()
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
│ ├─ emit LogTopic1(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ [0] VM::getRecordedLogs()
│ └─ ← [Return] []
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
- ├─ [1281400] 0x34A1D3fff3958843C43aD80F30b94c510645C316::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ ├─ emit LogTopic123(topic1: 7, topic2: 8, topic3: 9, data: 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x34A1D3fff3958843C43aD80F30b94c510645C316)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
diff --git a/crates/revive-strategy/src/cheatcodes/mod.rs b/crates/revive-strategy/src/cheatcodes/mod.rs
index 41436264b1342..66de54fc05a06 100644
--- a/crates/revive-strategy/src/cheatcodes/mod.rs
+++ b/crates/revive-strategy/src/cheatcodes/mod.rs
@@ -695,10 +695,10 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
}
if let Some(CreateScheme::Create) = input.scheme() {
- let caller = ecx.tx.caller;
+ let caller = input.caller();
let nonce = ecx
.journaled_state
- .load_account(ecx.tx.caller)
+ .load_account(input.caller())
.expect("to load caller account")
.info
.nonce;
@@ -740,14 +740,24 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
+ // TODO: temporary hack
+ let caller =
+ if Pallet::::code(&H160::from_slice(input.caller().as_slice()))
+ .is_empty()
+ {
+ input.caller()
+ } else {
+ ecx.tx.caller
+ };
+
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
- &H160::from_slice(ecx.tx.caller.as_slice()),
+ &H160::from_slice(caller.as_slice()),
));
-
+
// Pre-Dispatch Increments the nonce of the origin, so let's make sure we do
// that here too to replicate the same address generation.
System::inc_account_nonce(&AccountId::to_fallback_account_id(
- &H160::from_slice(ecx.tx.caller.as_slice()),
+ &H160::from_slice(caller.as_slice()),
));
let evm_value = sp_core::U256::from_little_endian(&input.value().as_le_bytes());
@@ -884,10 +894,20 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
+ // TODO: temporary hack
+ let caller =
+ if Pallet::::code(&H160::from_slice(call.caller.as_slice()))
+ .is_empty()
+ {
+ call.caller
+ } else {
+ ecx.tx.caller
+ };
+
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
- &H160::from_slice(ecx.tx.caller.as_slice()),
+ &H160::from_slice(caller.as_slice()),
));
-
+
let evm_value =
sp_core::U256::from_little_endian(&call.call_value().as_le_bytes());
From 99b003bc14416ea180b6d32a1b7c630e4767d3f1 Mon Sep 17 00:00:00 2001
From: Sebastian Miasojed
Date: Thu, 16 Oct 2025 12:31:12 +0300
Subject: [PATCH 05/12] Fix the address of the test contract
---
crates/evm/core/src/backend/mod.rs | 29 ++--
crates/forge/tests/cli/revive_vm.rs | 140 +++++++++----------
crates/revive-strategy/src/cheatcodes/mod.rs | 30 +---
3 files changed, 90 insertions(+), 109 deletions(-)
diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs
index ef9c0331eda57..d278e856b357b 100644
--- a/crates/evm/core/src/backend/mod.rs
+++ b/crates/evm/core/src/backend/mod.rs
@@ -752,17 +752,24 @@ impl Backend {
self.set_caller(env.tx.caller);
self.set_spec_id(env.evm_env.cfg_env.spec);
- let test_contract = match env.tx.kind {
- TxKind::Call(to) => to,
- TxKind::Create => {
- let nonce = self
- .basic_ref(env.tx.caller)
- .map(|b| b.unwrap_or_default().nonce)
- .unwrap_or_default();
- env.tx.caller.create(nonce)
- }
- };
- self.set_test_contract(test_contract);
+ // Only set test contract if it hasn't been set yet.
+ // In foundry-polkadot, test_contract is set early (before CREATE2 deployer) via
+ // explicit set_test_contract() call in runner.rs to enable PVM mode detection.
+ // This prevents infrastructure deployments (like CREATE2 deployer) from
+ // overwriting the actual test contract address.
+ if self.inner.test_contract.is_none() {
+ let test_contract = match env.tx.kind {
+ TxKind::Call(to) => to,
+ TxKind::Create => {
+ let nonce = self
+ .basic_ref(env.tx.caller)
+ .map(|b| b.unwrap_or_default().nonce)
+ .unwrap_or_default();
+ env.tx.caller.create(nonce)
+ }
+ };
+ self.set_test_contract(test_contract);
+ }
}
/// Executes the configured test call of the `env` without committing state changes.
diff --git a/crates/forge/tests/cli/revive_vm.rs b/crates/forge/tests/cli/revive_vm.rs
index c80c816901779..2fa07a68f5b10 100644
--- a/crates/forge/tests/cli/revive_vm.rs
+++ b/crates/forge/tests/cli/revive_vm.rs
@@ -417,52 +417,52 @@ Ran 2 tests for src/CounterTest.t.sol:CounterTest
[PASS] test_Increment() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291514] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
+ ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[6405872] CounterTest::test_Increment()
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 5
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(55)
+ ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(55)
│ ├─ emit SetNumber(result: 55)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 55
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::increment()
+ ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::increment()
│ ├─ emit Increment(result: 56)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 56
└─ ← [Stop]
[PASS] test_expectRevert() ([GAS])
Traces:
[3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291514] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setNumber(5)
+ ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::number() [staticcall]
+ ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
[1280139] CounterTest::test_expectRevert()
├─ [0] VM::expectRevert(custom error 0xf28dceb3: 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006456941a80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076661696c7572650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
│ └─ ← [Return]
- ├─ [1271300] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::failed_call() [staticcall]
+ ├─ [1271300] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::failed_call() [staticcall]
│ └─ ← [Revert] Revert("failure")
└─ ← [Stop]
@@ -599,50 +599,50 @@ Ran 2 tests for src/Test.t.sol:RecordTest
[PASS] testRecordAccess() ([GAS])
Traces:
[3873734] RecordTest::testRecordAccess()
- ├─ [1250013] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250013] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 4095 bytes of code
- ├─ [1250012] → new @0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496
+ ├─ [1250012] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 2182 bytes of code
├─ [0] VM::record()
│ └─ ← [Return]
- ├─ [1301608] 0x34A1D3fff3958843C43aD80F30b94c510645C316::record(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
- │ ├─ [269107405000] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::record()
+ ├─ [1301608] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
+ │ ├─ [269107405000] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
- ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
+ ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000001], [0x0000000000000000000000000000000000000000000000000000000000000001]
- ├─ [0] VM::accesses(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
+ ├─ [0] VM::accesses(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000002], [0x0000000000000000000000000000000000000000000000000000000000000002]
└─ ← [Stop]
[PASS] testStopRecordAccess() ([GAS])
Traces:
[5179200] RecordTest::testStopRecordAccess()
- ├─ [1250013] → new @0x34A1D3fff3958843C43aD80F30b94c510645C316
+ ├─ [1250013] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 4095 bytes of code
- ├─ [1250012] → new @0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496
+ ├─ [1250012] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 2182 bytes of code
├─ [0] VM::record()
│ └─ ← [Return]
- ├─ [1301608] 0x34A1D3fff3958843C43aD80F30b94c510645C316::record(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
- │ ├─ [269107405000] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::record()
+ ├─ [1301608] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
+ │ ├─ [269107405000] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
- ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
+ ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000001], [0x0000000000000000000000000000000000000000000000000000000000000001]
├─ [0] VM::stopRecord()
│ └─ ← [Return]
- ├─ [1301600] 0x34A1D3fff3958843C43aD80F30b94c510645C316::record(0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496)
- │ ├─ [269187053000] 0xA8452Ec99ce0C64f20701dB7dD3abDb607c00496::record()
+ ├─ [1301600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
+ │ ├─ [269187053000] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
- ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
+ ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
│ └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000001], [0x0000000000000000000000000000000000000000000000000000000000000001]
├─ [0] VM::record()
│ └─ ← [Return]
├─ [0] VM::stopRecord()
│ └─ ← [Return]
- ├─ [0] VM::accesses(0x34A1D3fff3958843C43aD80F30b94c510645C316)
+ ├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
│ └─ ← [Return] [], []
└─ ← [Stop]
@@ -916,21 +916,21 @@ Ran 7 tests for src/Test.t.sol:RecordLogsTest
[PASS] testEmitRecordEmit() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[2618379] RecordLogsTest::testEmitRecordEmit()
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 2, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic12(topic1: 1, topic2: 2, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(3, 0x2e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic1(topic1: 3, data: 0x2e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0x7c7d81fafce31d4330303f05da0ccb9d970101c475382b40aa072986ee4caaad, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000102e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -938,12 +938,12 @@ Traces:
[PASS] testRecordOffGetsNothing() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1330390] RecordLogsTest::testRecordOffGetsNothing()
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
@@ -955,7 +955,7 @@ Traces:
[PASS] testRecordOnEmitDifferentDepths() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -963,26 +963,26 @@ Traces:
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ emit LogTopic(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1301614] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
+ ├─ [1301614] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 10554 bytes of code
- ├─ [1301600] 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
- │ ├─ [180261329000] 0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1301600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ │ ├─ [180261329000] 0x104fBc016F4bb334D775a19E8A6510109AC63E00::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2)]
- ├─ [1271500] 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a::getEmitterAddr() [staticcall]
- │ └─ ← [Return] 0x4f81992FCe2E1846dD528eC0102e6eE1f61ed3e2
+ │ └─ ← [Return] [([0x61fb7db3625c10432927a76bb32400c33a94e9bb6374137c4cd59f6e465bfdcb, 0x0000000000000000000000000000000000000000000000000000000000000001], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001043a26051362b8040b289abe93334a5e300000000000000000000000000000000, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496), ([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC), ([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x104fBc016F4bb334D775a19E8A6510109AC63E00)]
+ ├─ [1271500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::getEmitterAddr() [staticcall]
+ │ └─ ← [Return] 0x104fBc016F4bb334D775a19E8A6510109AC63E00
└─ ← [Stop]
[PASS] testRecordOnNoLogs() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
@@ -996,35 +996,35 @@ Traces:
[PASS] testRecordOnSingleLog() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1297357] RecordLogsTest::testRecordOnSingleLog()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 2, 3, 0x4576656e74204461746120696e20537472696e67)
│ ├─ emit LogTopic123(topic1: 1, topic2: 2, topic3: 3, data: 0x4576656e74204461746120696e20537472696e67)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000001, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000144576656e74204461746120696e20537472696e67000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
└─ ← [Stop]
[PASS] testRecordOnSingleLogTopic0() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[1334639] RecordLogsTest::testRecordOnSingleLogTopic0()
├─ [0] VM::recordLogs()
│ └─ ← [Return]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a429)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c1693502e38edeff9493e0004540e975027a42900000000000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -1032,36 +1032,36 @@ Traces:
[PASS] testRecordsConsumednAsRead() ([GAS])
Traces:
[1287757] RecordLogsTest::setUp()
- ├─ [1250014] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1250014] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 12583 bytes of code
└─ ← [Stop]
[6525856] RecordLogsTest::testRecordsConsumednAsRead()
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(1, 0x43a26051362b8040b289abe93334a5e3)
│ ├─ emit LogTopic1(topic1: 1, data: 0x43a26051362b8040b289abe93334a5e3)
│ └─ ← [Stop]
├─ [0] VM::recordLogs()
│ └─ ← [Return]
├─ [0] VM::getRecordedLogs()
│ └─ ← [Return] []
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(2, 3, 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ ├─ emit LogTopic12(topic1: 2, topic2: 3, data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
+ │ └─ ← [Return] [([0x7af92d5e3102a27d908bb1859fdef71b723f3c438e5d84f3af49dab68e18dc6d, 0x0000000000000000000000000000000000000000000000000000000000000002, 0x0000000000000000000000000000000000000000000000000000000000000003], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001843a26051362b8040b289abe93334a5e3662751aa691185ae0000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(4, 5, 6, 0x43a26051362b8040b289abe93334a5e3662751aa)
│ ├─ emit LogTopic123(topic1: 4, topic2: 5, topic3: 6, data: 0x43a26051362b8040b289abe93334a5e3662751aa)
│ └─ ← [Stop]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ ├─ emit LogTopic0(data: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
- ├─ [1281400] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000004, 0x0000000000000000000000000000000000000000000000000000000000000005, 0x0000000000000000000000000000000000000000000000000000000000000006], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001443a26051362b8040b289abe93334a5e3662751aa000000000000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC), ([0x0a28c6fad56bcbad1788721e440963b3b762934a3134924733eaf8622cb44279], 0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002043a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
+ ├─ [1281400] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::emitEvent(7, 8, 9, 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ ├─ emit LogTopic123(topic1: 7, topic2: 8, topic3: 9, data: 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4)
│ └─ ← [Stop]
├─ [0] VM::getRecordedLogs()
- │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)]
+ │ └─ ← [Return] [([0xb6d650e5d0bbc0e92ff784e346ada394e49aa2d74a5cee8b099fa1a469bdc452, 0x0000000000000000000000000000000000000000000000000000000000000007, 0x0000000000000000000000000000000000000000000000000000000000000008, 0x0000000000000000000000000000000000000000000000000000000000000009], 0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000182e38edeff9493e0004540e975027a429ee666d1289f2c7a40000000000000000, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)]
├─ storage changes:
│ @ 1: 0x43a26051362b8040b289abe93334a5e3662751aa691185ae9e9a2e1e0c169350 → 0x2e38edeff9493e0004540e975027a429ee666d1289f2c7a4232d03ee63e14e30
└─ ← [Stop]
@@ -1212,57 +1212,57 @@ Ran 3 tests for src/Test.t.sol:StateDiffTest
[PASS] testCallAcceses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
- ├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 5531 bytes of code
- ├─ [1291513] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
+ ├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
[1320342] StateDiffTest::testCallAcceses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
- ├─ [1291500] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setter(55)
+ ├─ [1291500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setter(55)
│ └─ ← [Stop]
├─ [0] VM::stopAndReturnStateDiff()
- │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 1)]
+ │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 1)]
└─ ← [Stop]
[PASS] testCallProxyAcceses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
- ├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 5531 bytes of code
- ├─ [1291513] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
+ ├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
[1338955] StateDiffTest::testCallProxyAcceses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
- ├─ [1301600] 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a::proxyCall(55)
- │ ├─ [276683525000] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::setter(55)
+ ├─ [1301600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::proxyCall(55)
+ │ ├─ [276683525000] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setter(55)
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::stopAndReturnStateDiff()
- │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 0, 0xac1b14ff0000000000000000000000000000000000000000000000000000000000000037, false, [(0xF62849F9A0B5Bf2913b396098F7c7019b51A820a, 0x0000000000000000000000000000000000000000000000000000000000000000, false, 0x0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f, 0x0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f, false)], 1), ((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0xF62849F9A0B5Bf2913b396098F7c7019b51A820a, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 2)]
+ │ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 0, 0xac1b14ff0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000000, false, 0x0000000000000000000000007d8cb8f412b3ee9ac79558791333f41d2b1ccdac, 0x0000000000000000000000007d8cb8f412b3ee9ac79558791333f41d2b1ccdac, false)], 1), ((0, 31337 [3.133e4]), 0, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 2)]
└─ ← [Stop]
[PASS] testCreateAcceses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
- ├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 5531 bytes of code
- ├─ [1291513] → new @0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
+ ├─ [1291513] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
[1345790] StateDiffTest::testCreateAcceses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
- ├─ [1291511] → new @0xc7183455a4C133Ae270771860664b6B7ec320bB1
+ ├─ [1291511] → new @0x2e234DAe75C793f67A35089C9d99245E1C58470b
│ └─ ← [Return] 5531 bytes of code
├─ [0] VM::stopAndReturnStateDiff()
- │ └─ ← [Return] [((0, 31337 [3.133e4]), 4, 0xc7183455a4C133Ae270771860664b6B7ec320bB1, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 1000000000000000000 [1e18], 0x0000000000000000000000000000000000000000000000000000000000000064, false, [(0xc7183455a4C133Ae270771860664b6B7ec320bB1, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, false), (0xc7183455a4C133Ae270771860664b6B7ec320bB1, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000064, false)], 1)]
+ │ └─ ← [Return] [((0, 31337 [3.133e4]), 4, 0x2e234DAe75C793f67A35089C9d99245E1C58470b, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 1000000000000000000 [1e18], 0x0000000000000000000000000000000000000000000000000000000000000064, false, [(0x2e234DAe75C793f67A35089C9d99245E1C58470b, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, false), (0x2e234DAe75C793f67A35089C9d99245E1C58470b, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000064, false)], 1)]
└─ ← [Stop]
Suite result: ok. 3 passed; 0 failed; 0 skipped; [ELAPSED]
diff --git a/crates/revive-strategy/src/cheatcodes/mod.rs b/crates/revive-strategy/src/cheatcodes/mod.rs
index 66de54fc05a06..53dea5cfa4c5f 100644
--- a/crates/revive-strategy/src/cheatcodes/mod.rs
+++ b/crates/revive-strategy/src/cheatcodes/mod.rs
@@ -740,24 +740,8 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
- // TODO: temporary hack
- let caller =
- if Pallet::::code(&H160::from_slice(input.caller().as_slice()))
- .is_empty()
- {
- input.caller()
- } else {
- ecx.tx.caller
- };
-
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
- &H160::from_slice(caller.as_slice()),
- ));
-
- // Pre-Dispatch Increments the nonce of the origin, so let's make sure we do
- // that here too to replicate the same address generation.
- System::inc_account_nonce(&AccountId::to_fallback_account_id(
- &H160::from_slice(caller.as_slice()),
+ &H160::from_slice(input.caller().as_slice()),
));
let evm_value = sp_core::U256::from_little_endian(&input.value().as_le_bytes());
@@ -894,18 +878,8 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
let res = execute_with_externalities(|externalities| {
externalities.execute_with(|| {
tracer.trace(|| {
- // TODO: temporary hack
- let caller =
- if Pallet::::code(&H160::from_slice(call.caller.as_slice()))
- .is_empty()
- {
- call.caller
- } else {
- ecx.tx.caller
- };
-
let origin = OriginFor::::signed(AccountId::to_fallback_account_id(
- &H160::from_slice(caller.as_slice()),
+ &H160::from_slice(call.caller.as_slice()),
));
let evm_value =
From 2ea6370bb12b73f44d4ae04b14899266a51b17f2 Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Thu, 23 Oct 2025 18:14:57 +0200
Subject: [PATCH 06/12] review comment
---
crates/revive-strategy/src/tracing/storage_tracer.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/crates/revive-strategy/src/tracing/storage_tracer.rs b/crates/revive-strategy/src/tracing/storage_tracer.rs
index 3702e4b145d0a..eea15e5322f57 100644
--- a/crates/revive-strategy/src/tracing/storage_tracer.rs
+++ b/crates/revive-strategy/src/tracing/storage_tracer.rs
@@ -146,7 +146,6 @@ impl Tracing for StorageTracer {
kind,
account: to,
accessor: from,
- // TODO: call.input is different from evm
data: Bytes::from(input.to_vec()),
deployed_bytecode_hash: None,
value,
From 4e5891ec436e1d3ca939eb9b20d4b774ff51df5a Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Fri, 24 Oct 2025 12:45:55 +0200
Subject: [PATCH 07/12] clippy
---
crates/revive-utils/src/lib.rs | 2 --
1 file changed, 2 deletions(-)
diff --git a/crates/revive-utils/src/lib.rs b/crates/revive-utils/src/lib.rs
index 23bf3c16f3e6e..2fced70425504 100644
--- a/crates/revive-utils/src/lib.rs
+++ b/crates/revive-utils/src/lib.rs
@@ -1,5 +1,3 @@
-use std::u64;
-
use alloy_primitives::{Address, B256, Bytes, Log, U256 as RU256};
use foundry_evm_core::{Ecx, InspectorExt};
use foundry_evm_traces::{
From 6a5f7c8386fafdeb011d8dcd8b61cc89dcd09d92 Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Fri, 24 Oct 2025 12:47:01 +0200
Subject: [PATCH 08/12] typos
---
crates/revive-strategy/src/tracing/mod.rs | 24 +++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/crates/revive-strategy/src/tracing/mod.rs b/crates/revive-strategy/src/tracing/mod.rs
index 0984d5f4ab43f..d4589a5d4926a 100644
--- a/crates/revive-strategy/src/tracing/mod.rs
+++ b/crates/revive-strategy/src/tracing/mod.rs
@@ -17,7 +17,7 @@ use crate::execute_with_externalities;
pub struct Tracer {
pub call_tracer: CallTracer U256>,
pub prestate_tracer: PrestateTracer,
- pub storage_acceses: Option,
+ pub storage_accesses: Option,
}
impl Tracer {
@@ -36,7 +36,7 @@ impl Tracer {
let storage_tracer = if is_recording { Some(Default::default()) } else { None };
- Self { call_tracer, prestate_tracer, storage_acceses: storage_tracer }
+ Self { call_tracer, prestate_tracer, storage_accesses: storage_tracer }
}
pub fn trace R>(&mut self, f: F) -> R {
@@ -59,7 +59,7 @@ impl Tracer {
/// Collects recorded accesess
pub fn get_recorded_acceses(&mut self) -> Vec {
- self.storage_acceses.take().unwrap_or_default().get_records()
+ self.storage_accesses.take().unwrap_or_default().get_records()
}
/// Applies `PrestateTrace` diffs to the revm state
@@ -119,7 +119,7 @@ impl Tracing for Tracer {
fn watch_address(&mut self, addr: &polkadot_sdk::sp_core::H160) {
self.prestate_tracer.watch_address(addr);
self.call_tracer.watch_address(addr);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.watch_address(addr);
}
}
@@ -152,7 +152,7 @@ impl Tracing for Tracer {
input,
gas,
);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.enter_child_span(
from,
to,
@@ -172,7 +172,7 @@ impl Tracing for Tracer {
) {
self.prestate_tracer.instantiate_code(code, salt);
self.call_tracer.instantiate_code(code, salt);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.instantiate_code(code, salt);
}
}
@@ -180,7 +180,7 @@ impl Tracing for Tracer {
fn balance_read(&mut self, addr: &polkadot_sdk::sp_core::H160, value: U256) {
self.prestate_tracer.balance_read(addr, value);
self.call_tracer.balance_read(addr, value);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.balance_read(addr, value);
}
}
@@ -188,7 +188,7 @@ impl Tracing for Tracer {
fn storage_read(&mut self, key: &polkadot_sdk::pallet_revive::Key, value: Option<&[u8]>) {
self.prestate_tracer.storage_read(key, value);
self.call_tracer.storage_read(key, value);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.storage_read(key, value);
}
}
@@ -201,7 +201,7 @@ impl Tracing for Tracer {
) {
self.prestate_tracer.storage_write(key, old_value.clone(), new_value);
self.call_tracer.storage_write(key, old_value.clone(), new_value);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.storage_write(key, old_value, new_value);
}
}
@@ -214,7 +214,7 @@ impl Tracing for Tracer {
) {
self.prestate_tracer.log_event(event, topics, data);
self.call_tracer.log_event(event, topics, data);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.log_event(event, topics, data);
}
}
@@ -226,7 +226,7 @@ impl Tracing for Tracer {
) {
self.prestate_tracer.exit_child_span(output, gas_left);
self.call_tracer.exit_child_span(output, gas_left);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.exit_child_span(output, gas_left);
}
}
@@ -238,7 +238,7 @@ impl Tracing for Tracer {
) {
self.prestate_tracer.exit_child_span_with_error(error, gas_left);
self.call_tracer.exit_child_span_with_error(error, gas_left);
- if let Some(storage_tracer) = &mut self.storage_acceses {
+ if let Some(storage_tracer) = &mut self.storage_accesses {
storage_tracer.exit_child_span_with_error(error, gas_left);
}
}
From c1cc3d192170000934d73e3ce662af407036ede8 Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Fri, 24 Oct 2025 13:05:16 +0200
Subject: [PATCH 09/12] more typos
---
crates/cheatcodes/src/strategy.rs | 2 +-
crates/forge/tests/cli/revive_vm.rs | 18 +++++++++---------
crates/revive-strategy/src/cheatcodes/mod.rs | 4 ++--
crates/revive-strategy/src/tracing/mod.rs | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/crates/cheatcodes/src/strategy.rs b/crates/cheatcodes/src/strategy.rs
index 9a9875cbc9abd..2623c3fd04893 100644
--- a/crates/cheatcodes/src/strategy.rs
+++ b/crates/cheatcodes/src/strategy.rs
@@ -257,7 +257,7 @@ pub trait CheatcodeInspectorStrategyExt {
) -> Option {
None
}
- // Remove duplicate acceses in storage_recorder
+ // Remove duplicate accesses in storage_recorder
fn revive_remove_duplicate_account_access(&self, _state: &mut crate::Cheatcodes) {}
}
diff --git a/crates/forge/tests/cli/revive_vm.rs b/crates/forge/tests/cli/revive_vm.rs
index 2fa07a68f5b10..09fe71c8e742d 100644
--- a/crates/forge/tests/cli/revive_vm.rs
+++ b/crates/forge/tests/cli/revive_vm.rs
@@ -1120,7 +1120,7 @@ forgetest!(record_accesses, |prj, cmd| {
proxy = address(new Proxy(existing));
}
- function testCreateAcceses() public {
+ function testCreateaccesses() public {
vm.startStateDiffRecording();
C target = new C{value: 1 ether}(100);
Vm.AccountAccess[] memory records = vm.stopAndReturnStateDiff();
@@ -1143,7 +1143,7 @@ forgetest!(record_accesses, |prj, cmd| {
assertEq(records[0].storageAccesses[1].reverted, false);
}
- function testCallAcceses() public {
+ function testCallaccesses() public {
vm.startStateDiffRecording();
(bool success,) = address(existing).call(abi.encodeWithSelector(C.setter.selector, 55));
if (!success) {
@@ -1168,7 +1168,7 @@ forgetest!(record_accesses, |prj, cmd| {
assertEq(records[0].storageAccesses[1].newValue, bytes32(uint(55)), "newValue");
assertEq(records[0].storageAccesses[1].reverted, false);
}
- function testCallProxyAcceses() public {
+ function testCallProxyaccesses() public {
vm.startStateDiffRecording();
(bool success,) = address(proxy).call(abi.encodeWithSelector(Proxy.proxyCall.selector, 55));
if (!success) {
@@ -1209,7 +1209,7 @@ Compiler run successful!
Compiler run successful!
Ran 3 tests for src/Test.t.sol:StateDiffTest
-[PASS] testCallAcceses() ([GAS])
+[PASS] testCallaccesses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
@@ -1218,7 +1218,7 @@ Traces:
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
- [1320342] StateDiffTest::testCallAcceses()
+ [1320342] StateDiffTest::testCallaccesses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
├─ [1291500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setter(55)
@@ -1227,7 +1227,7 @@ Traces:
│ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 1)]
└─ ← [Stop]
-[PASS] testCallProxyAcceses() ([GAS])
+[PASS] testCallProxyaccesses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
@@ -1236,7 +1236,7 @@ Traces:
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
- [1338955] StateDiffTest::testCallProxyAcceses()
+ [1338955] StateDiffTest::testCallProxyaccesses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
├─ [1301600] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::proxyCall(55)
@@ -1247,7 +1247,7 @@ Traces:
│ └─ ← [Return] [((0, 31337 [3.133e4]), 0, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496, true, 0, 1000000000000000000 [1e18], 0x, 0, 0xac1b14ff0000000000000000000000000000000000000000000000000000000000000037, false, [(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, 0x0000000000000000000000000000000000000000000000000000000000000000, false, 0x0000000000000000000000007d8cb8f412b3ee9ac79558791333f41d2b1ccdac, 0x0000000000000000000000007d8cb8f412b3ee9ac79558791333f41d2b1ccdac, false)], 1), ((0, 31337 [3.133e4]), 0, 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f, true, 1000000000000000000 [1e18], 1000000000000000000 [1e18], 0x, 0, 0xd423740b0000000000000000000000000000000000000000000000000000000000000037, false, [(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, false, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000064, false), (0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC, 0x0000000000000000000000000000000000000000000000000000000000000001, true, 0x0000000000000000000000000000000000000000000000000000000000000064, 0x0000000000000000000000000000000000000000000000000000000000000037, false)], 2)]
└─ ← [Stop]
-[PASS] testCreateAcceses() ([GAS])
+[PASS] testCreateaccesses() ([GAS])
Traces:
[2675638] StateDiffTest::setUp()
├─ [1291513] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
@@ -1256,7 +1256,7 @@ Traces:
│ └─ ← [Return] 6405 bytes of code
└─ ← [Stop]
- [1345790] StateDiffTest::testCreateAcceses()
+ [1345790] StateDiffTest::testCreateaccesses()
├─ [0] VM::startStateDiffRecording()
│ └─ ← [Return]
├─ [1291511] → new @0x2e234DAe75C793f67A35089C9d99245E1C58470b
diff --git a/crates/revive-strategy/src/cheatcodes/mod.rs b/crates/revive-strategy/src/cheatcodes/mod.rs
index 68d6b6e590652..450e4c1903aae 100644
--- a/crates/revive-strategy/src/cheatcodes/mod.rs
+++ b/crates/revive-strategy/src/cheatcodes/mod.rs
@@ -809,7 +809,7 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
res.storage_deposit.charge_or_zero(),
);
if res.result.as_ref().is_ok_and(|r| !r.result.did_revert()) {
- self.append_recorded_accesses(state, ecx, tracer.get_recorded_acceses());
+ self.append_recorded_accesses(state, ecx, tracer.get_recorded_accesses());
}
post_exec(state, ecx, executor, &mut tracer, false);
match res.result {
@@ -934,7 +934,7 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
);
if res.result.as_ref().is_ok_and(|r| !r.did_revert()) {
- self.append_recorded_accesses(state, ecx, tracer.get_recorded_acceses());
+ self.append_recorded_accesses(state, ecx, tracer.get_recorded_accesses());
}
post_exec(state, ecx, executor, &mut tracer, call.is_static);
diff --git a/crates/revive-strategy/src/tracing/mod.rs b/crates/revive-strategy/src/tracing/mod.rs
index d4589a5d4926a..6e3b4a0f1d826 100644
--- a/crates/revive-strategy/src/tracing/mod.rs
+++ b/crates/revive-strategy/src/tracing/mod.rs
@@ -57,8 +57,8 @@ impl Tracer {
})
}
- /// Collects recorded accesess
- pub fn get_recorded_acceses(&mut self) -> Vec {
+ /// Collects recorded accessess
+ pub fn get_recorded_accesses(&mut self) -> Vec {
self.storage_accesses.take().unwrap_or_default().get_records()
}
From 794201214a2f5f47a9fb1a69f5955a62b935fd7c Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Fri, 24 Oct 2025 13:25:34 +0200
Subject: [PATCH 10/12] typos again
---
crates/revive-strategy/src/tracing/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/revive-strategy/src/tracing/mod.rs b/crates/revive-strategy/src/tracing/mod.rs
index 6e3b4a0f1d826..ffe0bf9f52e41 100644
--- a/crates/revive-strategy/src/tracing/mod.rs
+++ b/crates/revive-strategy/src/tracing/mod.rs
@@ -57,7 +57,7 @@ impl Tracer {
})
}
- /// Collects recorded accessess
+ /// Collects recorded accesses
pub fn get_recorded_accesses(&mut self) -> Vec {
self.storage_accesses.take().unwrap_or_default().get_records()
}
From 6a5f4ad74ceff8051c302955263599f0ab7c0e6c Mon Sep 17 00:00:00 2001
From: Pavlo Khrystenko
Date: Fri, 24 Oct 2025 23:26:07 +0200
Subject: [PATCH 11/12] upd snaphsots
---
crates/forge/tests/cli/revive_vm.rs | 168 ++++++++++++++--------------
1 file changed, 84 insertions(+), 84 deletions(-)
diff --git a/crates/forge/tests/cli/revive_vm.rs b/crates/forge/tests/cli/revive_vm.rs
index 09fe71c8e742d..9b5532e67c4a3 100644
--- a/crates/forge/tests/cli/revive_vm.rs
+++ b/crates/forge/tests/cli/revive_vm.rs
@@ -416,53 +416,53 @@ Compiler run successful!
Ran 2 tests for src/CounterTest.t.sol:CounterTest
[PASS] test_Increment() ([GAS])
Traces:
- [3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ [765075403] CounterTest::setUp()
+ ├─ [262294819] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
+ ├─ [385250826] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [117489011] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
- [6405872] CounterTest::test_Increment()
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ [737726031] CounterTest::test_Increment()
+ ├─ [117489011] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 5
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(55)
+ ├─ [385250826] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(55)
│ ├─ emit SetNumber(result: 55)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [117489011] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 55
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::increment()
+ ├─ [0] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::increment()
│ ├─ emit Increment(result: 56)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [117489011] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 56
└─ ← [Stop]
[PASS] test_expectRevert() ([GAS])
Traces:
- [3895361] CounterTest::setUp()
- ├─ [1291514] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ [765075403] CounterTest::setUp()
+ ├─ [262294819] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 7404 bytes of code
├─ [0] VM::expectEmit()
│ └─ ← [Return]
├─ emit SetNumber(result: 5)
- ├─ [1291600] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
+ ├─ [385250826] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::setNumber(5)
│ ├─ emit SetNumber(result: 5)
│ └─ ← [Stop]
- ├─ [1271500] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
+ ├─ [117489011] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::number() [staticcall]
│ └─ ← [Return] 5
└─ ← [Stop]
- [1280139] CounterTest::test_expectRevert()
+ [56930227] CounterTest::test_expectRevert()
├─ [0] VM::expectRevert(custom error 0xf28dceb3: 0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006456941a80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000076661696c7572650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
│ └─ ← [Return]
- ├─ [1271300] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::failed_call() [staticcall]
+ ├─ [56921388] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::failed_call() [staticcall]
│ └─ ← [Revert] Revert("failure")
└─ ← [Stop]
@@ -598,15 +598,15 @@ Compiler run successful!
Ran 2 tests for src/Test.t.sol:RecordTest
[PASS] testRecordAccess() ([GAS])
Traces:
- [3873734] RecordTest::testRecordAccess()
- ├─ [1250013] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ [961089406] RecordTest::testRecordAccess()
+ ├─ [16788608] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
│ └─ ← [Return] 4095 bytes of code
- ├─ [1250012] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
+ ├─ [16788608] → new @0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← [Return] 2182 bytes of code
├─ [0] VM::record()
│ └─ ← [Return]
- ├─ [1301608] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
- │ ├─ [269107405000] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
+ ├─ [927440089] 0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC::record(0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f)
+ │ ├─ [0] 0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f::record()
│ │ └─ ← [Return]
│ └─ ← [Stop]
├─ [0] VM::accesses(0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC)
@@ -617,23 +617,23 @@ Traces:
[PASS] testStopRecordAccess() ([GAS])
Traces:
- [5179200] RecordTest::testStopRecordAccess()
- ├─ [1250013] → new @0x7D8CB8F412B3ee9AC79558791333F41d2b1ccDAC
+ [961093272] RecordTest::testStopRecordAccess()
+ ├─ [16788608] → new