Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into merge/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Jan 7, 2025
2 parents 7f21538 + 1bf9175 commit 3415702
Show file tree
Hide file tree
Showing 95 changed files with 10,880 additions and 6,974 deletions.
49 changes: 30 additions & 19 deletions Cargo.lock

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

7 changes: 5 additions & 2 deletions crates/edr_evm/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ pub struct Trace<HaltReasonT: HaltReasonTrait> {
#[derive(Clone, Debug)]
pub struct Step {
/// The program counter
pub pc: u64,
pub pc: u32,
/// The call depth
pub depth: u64,
/// The executed op code
Expand Down Expand Up @@ -515,7 +515,10 @@ impl<HaltReasonT: HaltReasonTrait> TraceCollector<HaltReasonT> {
None
};
self.current_trace_mut().add_step(Step {
pc: interp.program_counter() as u64,
pc: interp
.program_counter()
.try_into()
.expect("program counter fits into u32"),
depth: data.journaled_state.depth(),
opcode: interp.current_opcode(),
stack,
Expand Down
1 change: 1 addition & 0 deletions crates/edr_generic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ edr_eth = { path = "../edr_eth" }
edr_evm = { path = "../edr_evm" }
edr_provider = { path = "../edr_provider" }
edr_rpc_eth = { path = "../edr_rpc_eth" }
edr_solidity = { path = "../edr_solidity" }
log = { version = "0.4.17", default-features = false }
serde = { version = "1.0.209", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.37", default-features = false }
Expand Down
5 changes: 3 additions & 2 deletions crates/edr_generic/tests/integration/issue_570.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::str::FromStr as _;
use std::{str::FromStr as _, sync::Arc};

use edr_eth::{l1, B256};
use edr_evm::hardfork;
Expand All @@ -7,10 +7,10 @@ use edr_provider::{
hardhat_rpc_types::ForkConfig, test_utils::create_test_config_with_fork, time::CurrentTime,
MethodInvocation, NoopLogger, Provider, ProviderError, ProviderRequest,
};
use edr_solidity::contract_decoder::ContractDecoder;
use edr_test_utils::env::get_alchemy_url;
use serial_test::serial;
use tokio::runtime;

// SAFETY: tests that modify the environment should be run serially.

fn get_provider() -> anyhow::Result<Provider<GenericChainSpec>> {
Expand Down Expand Up @@ -39,6 +39,7 @@ fn get_provider() -> anyhow::Result<Provider<GenericChainSpec>> {
logger,
subscriber,
config,
Arc::<ContractDecoder>::default(),
CurrentTime,
)?)
}
Expand Down
6 changes: 6 additions & 0 deletions crates/edr_napi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @nomicfoundation/edr

## 0.7.0

### Minor Changes

- d419f36: Add a `stackTrace` getter to the provider's response and remove the old, lower-level `solidityTrace` getter.

## 0.6.5

### Patch Changes
Expand Down
Loading

0 comments on commit 3415702

Please sign in to comment.