1- use std:: ops:: Range ;
2-
31use self :: parity:: stack_push_count;
42use crate :: tracing:: {
53 arena:: PushTraceKind ,
@@ -18,25 +16,34 @@ use revm::{
1816 primitives:: SpecId ,
1917 Database , EvmContext , Inspector , JournalEntry ,
2018} ;
21- use types :: { CallTrace , CallTraceStep } ;
19+ use std :: ops :: Range ;
2220
2321mod arena;
22+ pub use arena:: CallTraceArena ;
2423
2524mod builder;
26- mod config;
27- mod fourbyte;
28- mod opcount;
29- pub mod types;
30- mod utils;
31- pub use arena:: CallTraceArena ;
3225pub use builder:: {
3326 geth:: { self , GethTraceBuilder } ,
3427 parity:: { self , ParityTraceBuilder } ,
3528} ;
29+
30+ mod config;
3631pub use config:: { StackSnapshotType , TracingInspectorConfig } ;
32+
33+ mod fourbyte;
3734pub use fourbyte:: FourByteInspector ;
35+
36+ mod opcount;
3837pub use opcount:: OpcodeCountInspector ;
3938
39+ pub mod types;
40+ use types:: { CallTrace , CallTraceStep } ;
41+
42+ mod utils;
43+
44+ mod writer;
45+ pub use writer:: TraceWriter ;
46+
4047#[ cfg( feature = "js-tracer" ) ]
4148pub mod js;
4249
@@ -391,7 +398,8 @@ impl TracingInspector {
391398
392399 // The gas cost is the difference between the recorded gas remaining at the start of the
393400 // step the remaining gas here, at the end of the step.
394- step. gas_cost = step. gas_remaining - self . gas_inspector . gas_remaining ( ) ;
401+ // TODO: Figure out why this can overflow. https://github.com/paradigmxyz/evm-inspectors/pull/38
402+ step. gas_cost = step. gas_remaining . saturating_sub ( self . gas_inspector . gas_remaining ( ) ) ;
395403
396404 // set the status
397405 step. status = interp. instruction_result ;
0 commit comments