Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reth-eth-types: Do not import JsInspectorError by default #10202

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/rpc/rpc-eth-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ reth-trie.workspace = true
# ethereum
alloy-sol-types.workspace = true
revm.workspace = true
revm-inspectors = { workspace = true, features = ["js-tracer"] }
revm-inspectors = { workspace = true }
citizen-stig marked this conversation as resolved.
Show resolved Hide resolved
revm-primitives = { workspace = true, features = ["dev"] }

# rpc
Expand All @@ -56,3 +56,8 @@ tracing.workspace = true

[dev-dependencies]
serde_json.workspace = true


[features]
default = ["js_tracer_errors"]
js_tracer_errors = ["revm-inspectors/js-tracer"]
citizen-stig marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 4 additions & 1 deletion crates/rpc/rpc-eth-types/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ use reth_transaction_pool::error::{
PoolTransactionError,
};
use revm::primitives::{EVMError, ExecutionResult, HaltReason, OutOfGasError};
use revm_inspectors::tracing::{js::JsInspectorError, MuxError};
#[cfg(feature = "js_tracer_errors")]
use revm_inspectors::tracing::js::JsInspectorError;
use revm_inspectors::tracing::MuxError;
use tracing::error;

/// Result alias
Expand Down Expand Up @@ -191,6 +193,7 @@ impl From<EthApiError> for jsonrpsee_types::error::ErrorObject<'static> {
}
}

#[cfg(feature = "js_tracer_errors")]
impl From<JsInspectorError> for EthApiError {
fn from(error: JsInspectorError) -> Self {
match error {
Expand Down
Loading