@@ -6,9 +6,11 @@ use revm::{
6
6
instructions:: { EthInstructions , InstructionProvider } ,
7
7
EvmTr ,
8
8
} ,
9
+ inspector:: { InspectorEvmTr , JournalExt } ,
9
10
interpreter:: {
10
11
interpreter:: EthInterpreter , Host , Interpreter , InterpreterAction , InterpreterTypes ,
11
12
} ,
13
+ Inspector ,
12
14
} ;
13
15
14
16
pub struct OpEvm < CTX , INSP , I = EthInstructions < EthInterpreter , CTX > , P = OpPrecompiles > (
@@ -25,6 +27,36 @@ impl<CTX: Host, INSP> OpEvm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, OpP
25
27
}
26
28
}
27
29
30
+ impl < CTX : ContextSetters , INSP , I , P > InspectorEvmTr for OpEvm < CTX , INSP , I , P >
31
+ where
32
+ CTX : ContextTr < Journal : JournalExt > ,
33
+ I : InstructionProvider <
34
+ Context = CTX ,
35
+ InterpreterTypes : InterpreterTypes < Output = InterpreterAction > ,
36
+ > ,
37
+ INSP : Inspector < CTX , I :: InterpreterTypes > ,
38
+ {
39
+ type Inspector = INSP ;
40
+
41
+ fn inspector ( & mut self ) -> & mut Self :: Inspector {
42
+ & mut self . 0 . data . inspector
43
+ }
44
+
45
+ fn ctx_inspector ( & mut self ) -> ( & mut Self :: Context , & mut Self :: Inspector ) {
46
+ ( & mut self . 0 . data . ctx , & mut self . 0 . data . inspector )
47
+ }
48
+
49
+ fn run_inspect_interpreter (
50
+ & mut self ,
51
+ interpreter : & mut Interpreter <
52
+ <Self :: Instructions as InstructionProvider >:: InterpreterTypes ,
53
+ > ,
54
+ ) -> <<Self :: Instructions as InstructionProvider >:: InterpreterTypes as InterpreterTypes >:: Output
55
+ {
56
+ self . 0 . run_inspect_interpreter ( interpreter)
57
+ }
58
+ }
59
+
28
60
impl < CTX : ContextSetters , INSP , I , P > ContextSetters for OpEvm < CTX , INSP , I , P > {
29
61
type Tx = <CTX as ContextSetters >:: Tx ;
30
62
type Block = <CTX as ContextSetters >:: Block ;
0 commit comments