Skip to content

Commit d483274

Browse files
WodannCopilot
andauthored
fix: detection and reporting of calls to proxy contracts (#1333)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 538e9b0 commit d483274

23 files changed

Lines changed: 4800 additions & 284 deletions

File tree

.changeset/thirty-worlds-go.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@nomicfoundation/edr": patch
3+
---
4+
5+
Fixed detection of function signature for calls to proxies.
6+
7+
Previously, a call to a proxy contract was attributed to the proxy instead of the implementation. Now, it is correctly attributed to the implementation, allowing detection of the correct function signature.

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ alloy-transport-ws = { version = "1.0.22", default-features = false }
290290

291291
alloy-dyn-abi = { version = "1.2.1", features = ["eip712"] }
292292
alloy-json-abi = "1.2.1"
293-
alloy-primitives = { version = "1.4.1", features = [
293+
alloy-primitives = { version = "1.4.1", default-features = false, features = [
294294
"getrandom",
295-
"rand",
296295
"map-fxhash",
297296
"map-foldhash",
298297
"map-indexmap",
298+
"rand",
299299
] }
300300
alloy-sol-macro-expander = "1.2.1"
301301
alloy-sol-macro-input = "1.2.1"

crates/artifact/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ edition.workspace = true
55

66
[dependencies]
77
alloy-json-abi.workspace = true
8-
alloy-primitives.workspace = true
98
foundry-compilers.workspace = true
9+
edr_primitives.workspace = true
1010
semver.workspace = true
1111
serde.workspace = true
1212

crates/artifact/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use std::path::{Path, PathBuf};
55

66
use alloy_json_abi::JsonAbi;
7-
use alloy_primitives::Bytes;
7+
use edr_primitives::Bytes;
88
use semver::Version;
99

1010
// Adapted from <https://github.com/foundry-rs/compilers/blob/ea346377deaf18dc1f972a06fad76df3d9aed8d9/crates/compilers/src/artifact_output/mod.rs#L45>

crates/edr_common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition.workspace = true
66

77
[dependencies]
88
alloy-dyn-abi = { workspace = true, features = ["eip712"] }
9-
alloy-primitives = { workspace = true, features = ["serde", "getrandom", "arbitrary", "rlp"] }
9+
alloy-primitives = { workspace = true, features = ["arbitrary", "getrandom", "map-hashbrown", "rlp", "serde"] }
1010
alloy-provider.workspace = true
1111

1212
alloy-consensus.workspace = true

0 commit comments

Comments
 (0)