@@ -12,7 +12,7 @@ use alloy_rlp::Encodable;
1212use alloy_rpc_types:: ConversionError ;
1313use alloy_serde:: WithOtherFields ;
1414use op_alloy_consensus:: { DEPOSIT_TX_TYPE_ID , OpTransaction as OpTransactionTrait , TxDeposit } ;
15- use op_revm:: { OpTransaction , transaction :: deposit :: DepositTransactionParts } ;
15+ use op_revm:: OpTransaction ;
1616use revm:: context:: TxEnv ;
1717
1818/// Container type for signed, typed transactions.
@@ -174,9 +174,7 @@ impl FromRecoveredTx<FoundryTxEnvelope> for TxEnv {
174174 FoundryTxEnvelope :: Legacy ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
175175 FoundryTxEnvelope :: Eip2930 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
176176 FoundryTxEnvelope :: Eip1559 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
177- FoundryTxEnvelope :: Eip4844 ( signed_tx) => {
178- Self :: from_recovered_tx ( signed_tx. tx ( ) . tx ( ) , caller)
179- }
177+ FoundryTxEnvelope :: Eip4844 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
180178 FoundryTxEnvelope :: Eip7702 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
181179 FoundryTxEnvelope :: Deposit ( sealed_tx) => {
182180 Self :: from_recovered_tx ( sealed_tx. inner ( ) , caller)
@@ -187,19 +185,16 @@ impl FromRecoveredTx<FoundryTxEnvelope> for TxEnv {
187185
188186impl FromRecoveredTx < FoundryTxEnvelope > for OpTransaction < TxEnv > {
189187 fn from_recovered_tx ( tx : & FoundryTxEnvelope , caller : Address ) -> Self {
190- let base = TxEnv :: from_recovered_tx ( tx, caller) ;
191-
192- let deposit = if let FoundryTxEnvelope :: Deposit ( deposit_tx) = tx {
193- DepositTransactionParts {
194- source_hash : deposit_tx. source_hash ,
195- mint : Some ( deposit_tx. mint ) ,
196- is_system_transaction : deposit_tx. is_system_transaction ,
188+ match tx {
189+ FoundryTxEnvelope :: Legacy ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
190+ FoundryTxEnvelope :: Eip2930 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
191+ FoundryTxEnvelope :: Eip1559 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
192+ FoundryTxEnvelope :: Eip4844 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
193+ FoundryTxEnvelope :: Eip7702 ( signed_tx) => Self :: from_recovered_tx ( signed_tx, caller) ,
194+ FoundryTxEnvelope :: Deposit ( sealed_tx) => {
195+ Self :: from_recovered_tx ( sealed_tx. inner ( ) , caller)
197196 }
198- } else {
199- Default :: default ( )
200- } ;
201-
202- Self { base, deposit, enveloped_tx : None }
197+ }
203198 }
204199}
205200
0 commit comments