@@ -9,50 +9,59 @@ import (
99	_ "github.com/scroll-tech/go-ethereum/eth/tracers/native" 
1010)
1111
12+ // MuxTracer is a tracer mux, to support running multiple tracers together 
1213type  MuxTracer  struct  {
1314	tracers  []vm.EVMLogger 
1415}
1516
17+ // NewMuxTracer creates a new MuxTracer with multiple tracers 
1618func  NewMuxTracer (tracers  ... vm.EVMLogger ) * MuxTracer  {
1719	return  & MuxTracer {tracers }
1820}
1921
22+ // CaptureStart runs CaptureStart for each tracer in the MuxTracer 
2023func  (t  * MuxTracer ) CaptureStart (env  * vm.EVM , from  common.Address , to  common.Address , create  bool , input  []byte , gas  uint64 , value  * big.Int ) {
2124	for  _ , tracer  :=  range  t .tracers  {
2225		tracer .CaptureStart (env , from , to , create , input , gas , value )
2326	}
2427}
2528
29+ // CaptureState runs CaptureState for each tracer in the MuxTracer 
2630func  (t  * MuxTracer ) CaptureState (pc  uint64 , op  vm.OpCode , gas , cost  uint64 , scope  * vm.ScopeContext , rData  []byte , depth  int , err  error ) {
2731	for  _ , tracer  :=  range  t .tracers  {
2832		tracer .CaptureState (pc , op , gas , cost , scope , rData , depth , err )
2933	}
3034}
3135
36+ // CaptureStateAfter runs CaptureStateAfter for each tracer in the MuxTracer 
3237func  (t  * MuxTracer ) CaptureStateAfter (pc  uint64 , op  vm.OpCode , gas , cost  uint64 , scope  * vm.ScopeContext , rData  []byte , depth  int , err  error ) {
3338	for  _ , tracer  :=  range  t .tracers  {
3439		tracer .CaptureStateAfter (pc , op , gas , cost , scope , rData , depth , err )
3540	}
3641}
3742
43+ // CaptureEnter runs CaptureEnter for each tracer in the MuxTracer 
3844func  (t  * MuxTracer ) CaptureEnter (typ  vm.OpCode , from  common.Address , to  common.Address , input  []byte , gas  uint64 , value  * big.Int ) {
3945	for  _ , tracer  :=  range  t .tracers  {
4046		tracer .CaptureEnter (typ , from , to , input , gas , value )
4147	}
4248}
4349
50+ // CaptureExit runs CaptureExit for each tracer in the MuxTracer 
4451func  (t  * MuxTracer ) CaptureExit (output  []byte , gasUsed  uint64 , err  error ) {
4552	for  _ , tracer  :=  range  t .tracers  {
4653		tracer .CaptureExit (output , gasUsed , err )
4754	}
4855}
4956
57+ // CaptureFault runs CaptureFault for each tracer in the MuxTracer 
5058func  (t  * MuxTracer ) CaptureFault (pc  uint64 , op  vm.OpCode , gas , cost  uint64 , scope  * vm.ScopeContext , depth  int , err  error ) {
5159	for  _ , tracer  :=  range  t .tracers  {
5260		tracer .CaptureFault (pc , op , gas , cost , scope , depth , err )
5361	}
5462}
5563
64+ // CaptureEnd runs CaptureEnd for each tracer in the MuxTracer 
5665func  (t  * MuxTracer ) CaptureEnd (output  []byte , gasUsed  uint64 , d  time.Duration , err  error ) {
5766	for  _ , tracer  :=  range  t .tracers  {
5867		tracer .CaptureEnd (output , gasUsed , d , err )
0 commit comments