Skip to content

Commit

Permalink
feat(tracing): implement muxTracer (#57)
Browse files Browse the repository at this point in the history
Adds support for `muxTracer`. Depends on changes from
alloy-rs/alloy#252

Once both PR's are good to go I'll open a PR also for `reth`.
  • Loading branch information
ArtificialPB committed Mar 7, 2024
1 parent 8613909 commit f0551cb
Show file tree
Hide file tree
Showing 4 changed files with 571 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ clippy.lint_groups_priority = "allow"
# eth
alloy-sol-types = "0.6"
alloy-primitives = "0.6"
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "975a52a" }
alloy-rpc-trace-types = { git = "https://github.com/alloy-rs/alloy", rev = "975a52a" }
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "64d0352" }
alloy-rpc-trace-types = { git = "https://github.com/alloy-rs/alloy", rev = "64d0352" }
revm = { version = "6.0", default-features = false, features = ["std"] }

anstyle = "1.0"
colorchoice = "1.0"
thiserror = { version = "1"}

# serde
serde = { version = "1", optional = true, features = ["derive"] }
serde_json = { version = "1" }

# js-tracer
boa_engine = { version = "0.17", optional = true }
boa_gc = { version = "0.17", optional = true }
thiserror = { version = "1", optional = true }
serde_json = { version = "1", optional = true }

[dev-dependencies]
expect-test = "1.4"

[features]
serde = ["dep:serde", "revm/serde"]
js-tracer = ["dep:boa_engine", "dep:boa_gc", "dep:thiserror", "dep:serde_json"]
js-tracer = ["dep:boa_engine", "dep:boa_gc"]
3 changes: 3 additions & 0 deletions src/tracing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ pub use writer::TraceWriter;
#[cfg(feature = "js-tracer")]
pub mod js;

mod mux;
pub use mux::{Error as MuxError, MuxInspector};

/// An inspector that collects call traces.
///
/// This [Inspector] can be hooked into revm's EVM which then calls the inspector
Expand Down
Loading

0 comments on commit f0551cb

Please sign in to comment.