Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit 9414beb

Browse files
fix warnings
1 parent 6b64f59 commit 9414beb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

bus-mapping/README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ The goal of this crate is to serve as:
2626
Given a JSON file or a JSON stream containing an execution trace from an EVM, you can parse it and construct a [`GethExecTrace`](eth_types::GethExecTrace) instance from it. This will automatically populate all of the bus-mapping instances of each [`ExecStep`](crate::circuit_input_builder::ExecStep) and fill an [`OperationContainer`](crate::operation::OperationContainer) with all of the memory, stack, and storage operations performed by the provided trace.
2727

2828
```rust
29-
use bus_mapping::{Error, mock::BlockData};
30-
use bus_mapping::state_db::{self, StateDB, CodeDB};
29+
use bus_mapping::mock::BlockData;
3130
use eth_types::{
32-
self, address, Address, Word, Hash, U64, GethExecTrace, GethExecStep, geth_types::GethData, bytecode
31+
GethExecTrace, GethExecStep, geth_types::GethData, bytecode
3332
};
3433
use mock::test_ctx::{TestContext, helpers::*};
35-
use bus_mapping::circuit_input_builder::{Block, CircuitInputBuilder};
3634

3735
let input_trace = r#"
3836
[
@@ -108,7 +106,7 @@ let builder = builder
108106
.handle_block(&block.eth_block, &block.geth_traces)
109107
.unwrap();
110108
let geth_steps: Vec<GethExecStep> = serde_json::from_str(input_trace).unwrap();
111-
let geth_trace = GethExecTrace {
109+
let _geth_trace = GethExecTrace {
112110
return_value: "".to_string(),
113111
gas: block.eth_block.transactions[0].gas.as_u64(),
114112
invalid: false,
@@ -117,9 +115,9 @@ let geth_trace = GethExecTrace {
117115
};
118116

119117
// Get an ordered vector with all of the Stack operations of this trace.
120-
let stack_ops = builder.block.container.sorted_stack();
118+
let _stack_ops = builder.block.container.sorted_stack();
121119
// You can also iterate over the steps of the trace and witness the EVM Proof.
122-
builder.block.txs()[0].steps().iter();
120+
let _ = builder.block.txs()[0].steps().iter();
123121
```
124122

125123
Assuming we have the following trace:

0 commit comments

Comments
 (0)