11//! Execution traits for [`EvEvm`], mirroring the Reth mainnet implementations
22//! while inserting the EV-specific handler that redirects the base fee.
33
4- use crate :: { evm:: EvEvm , handler:: EvHandler } ;
4+ use crate :: { evm:: EvEvm , handler:: EvHandler , tx_env :: { BatchCallsTx , SponsorPayerTx } } ;
55use alloy_primitives:: { Address , Bytes } ;
66use reth_revm:: revm:: {
77 context:: { result:: ExecResultAndState , ContextSetters } ,
@@ -26,7 +26,9 @@ pub type EvExecutionResult = ExecutionResult<HaltReason>;
2626
2727impl < CTX , INSP , PRECOMP > ExecuteEvm for EvEvm < CTX , INSP , PRECOMP >
2828where
29- CTX : ContextTr < Journal : JournalTr < State = EvmState > > + ContextSetters ,
29+ CTX : ContextTr < Journal : JournalTr < State = EvmState > , Tx : SponsorPayerTx + BatchCallsTx >
30+ + ContextSetters ,
31+ <CTX as ContextTr >:: Tx : Clone ,
3032 <CTX as ContextTr >:: Db : Database ,
3133 <CTX as ContextTr >:: Journal :
3234 JournalTr < State = EvmState > + JournalTr < Database = <CTX as ContextTr >:: Db > ,
6971
7072impl < CTX , INSP , PRECOMP > ExecuteCommitEvm for EvEvm < CTX , INSP , PRECOMP >
7173where
72- CTX : ContextTr < Db : DatabaseCommit , Journal : JournalTr < State = EvmState > > + ContextSetters ,
74+ CTX : ContextTr <
75+ Db : DatabaseCommit ,
76+ Journal : JournalTr < State = EvmState > ,
77+ Tx : SponsorPayerTx + BatchCallsTx ,
78+ >
79+ + ContextSetters ,
80+ <CTX as ContextTr >:: Tx : Clone ,
7381 PRECOMP : PrecompileProvider < CTX , Output = InterpreterResult > ,
7482{
7583 fn commit ( & mut self , state : Self :: State ) {
7987
8088impl < CTX , INSP , PRECOMP > InspectEvm for EvEvm < CTX , INSP , PRECOMP >
8189where
82- CTX : ContextTr < Journal : JournalTr < State = EvmState > + JournalExt > + ContextSetters ,
90+ CTX : ContextTr < Journal : JournalTr < State = EvmState > + JournalExt , Tx : SponsorPayerTx + BatchCallsTx >
91+ + ContextSetters ,
92+ <CTX as ContextTr >:: Tx : Clone ,
8393 INSP : Inspector < CTX , EthInterpreter > ,
8494 PRECOMP : PrecompileProvider < CTX , Output = InterpreterResult > ,
8595{
@@ -100,16 +110,23 @@ where
100110
101111impl < CTX , INSP , PRECOMP > InspectCommitEvm for EvEvm < CTX , INSP , PRECOMP >
102112where
103- CTX : ContextTr < Journal : JournalTr < State = EvmState > + JournalExt , Db : DatabaseCommit >
113+ CTX : ContextTr <
114+ Journal : JournalTr < State = EvmState > + JournalExt ,
115+ Db : DatabaseCommit ,
116+ Tx : SponsorPayerTx + BatchCallsTx ,
117+ >
104118 + ContextSetters ,
119+ <CTX as ContextTr >:: Tx : Clone ,
105120 INSP : Inspector < CTX , EthInterpreter > ,
106121 PRECOMP : PrecompileProvider < CTX , Output = InterpreterResult > ,
107122{
108123}
109124
110125impl < CTX , INSP , PRECOMP > SystemCallEvm for EvEvm < CTX , INSP , PRECOMP >
111126where
112- CTX : ContextTr < Journal : JournalTr < State = EvmState > , Tx : SystemCallTx > + ContextSetters ,
127+ CTX : ContextTr < Journal : JournalTr < State = EvmState > , Tx : SystemCallTx + SponsorPayerTx + BatchCallsTx >
128+ + ContextSetters ,
129+ <CTX as ContextTr >:: Tx : Clone ,
113130 PRECOMP : PrecompileProvider < CTX , Output = InterpreterResult > ,
114131{
115132 fn system_call_one_with_caller (
@@ -134,8 +151,12 @@ where
134151
135152impl < CTX , INSP , PRECOMP > InspectSystemCallEvm for EvEvm < CTX , INSP , PRECOMP >
136153where
137- CTX : ContextTr < Journal : JournalTr < State = EvmState > + JournalExt , Tx : SystemCallTx >
154+ CTX : ContextTr <
155+ Journal : JournalTr < State = EvmState > + JournalExt ,
156+ Tx : SystemCallTx + SponsorPayerTx + BatchCallsTx ,
157+ >
138158 + ContextSetters ,
159+ <CTX as ContextTr >:: Tx : Clone ,
139160 INSP : Inspector < CTX , EthInterpreter > ,
140161 PRECOMP : PrecompileProvider < CTX , Output = InterpreterResult > ,
141162{
0 commit comments