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

chore(evm): remove trace printer, trim inspector stack #7437

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 8 additions & 4 deletions crates/cast/bin/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ pub struct RunArgs {
debug: bool,

/// Print out opcode traces.
#[arg(long, short)]
#[deprecated]
#[arg(long, short, hide = true)]
trace_printer: bool,

/// Executes the transaction only with the state from the previous block.
Expand Down Expand Up @@ -82,6 +83,11 @@ impl RunArgs {
///
/// Note: This executes the transaction(s) as is: Cheatcodes are disabled
pub async fn run(self) -> Result<()> {
#[allow(deprecated)]
if self.trace_printer {
eprintln!("WARNING: --trace-printer is deprecated and has no effect\n");
}

let figment =
Config::figment_with_root(find_project_root_path(None).unwrap()).merge(self.rpc);
let evm_opts = figment.extract::<EvmOpts>()?;
Expand Down Expand Up @@ -129,7 +135,7 @@ impl RunArgs {

env.block.number = U256::from(tx_block_number);

if let Some(ref block) = block {
if let Some(block) = &block {
env.block.timestamp = block.header.timestamp;
env.block.coinbase = block.header.miner;
env.block.difficulty = block.header.difficulty;
Expand Down Expand Up @@ -213,8 +219,6 @@ impl RunArgs {

// Execute our transaction
let result = {
executor.set_trace_printer(self.trace_printer);

configure_tx_env(&mut env, &tx);

if let Some(to) = tx.to {
Expand Down
6 changes: 0 additions & 6 deletions crates/evm/evm/src/executors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ impl Executor {
self
}

#[inline]
pub fn set_trace_printer(&mut self, trace_printer: bool) -> &mut Self {
self.inspector.print(trace_printer);
self
}

#[inline]
pub fn set_gas_limit(&mut self, gas_limit: U256) -> &mut Self {
self.gas_limit = gas_limit;
Expand Down
3 changes: 0 additions & 3 deletions crates/evm/evm/src/inspectors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ pub use debugger::Debugger;
mod logs;
pub use logs::LogCollector;

mod printer;
pub use printer::TracePrinter;

mod stack;
pub use stack::{InspectorData, InspectorStack, InspectorStackBuilder};
66 changes: 0 additions & 66 deletions crates/evm/evm/src/inspectors/printer.rs

This file was deleted.

Loading
Loading