diff --git a/crates/rpc/rpc-types-compat/src/transaction/mod.rs b/crates/rpc/rpc-types-compat/src/transaction/mod.rs index 4a00bf7a4390..9bb2a8b5d92a 100644 --- a/crates/rpc/rpc-types-compat/src/transaction/mod.rs +++ b/crates/rpc/rpc-types-compat/src/transaction/mod.rs @@ -37,11 +37,12 @@ pub trait TransactionCompat: Send + Sync + Unpin + Clone + fmt::Debug { /// Formats gas price and max fee per gas for RPC transaction response w.r.t. network specific /// transaction type. fn gas_price(signed_tx: &TransactionSigned, base_fee: Option) -> GasPrice { + #[allow(unreachable_patterns)] match signed_tx.tx_type() { TxType::Legacy | TxType::Eip2930 => { GasPrice { gas_price: Some(signed_tx.max_fee_per_gas()), max_fee_per_gas: None } } - TxType::Eip1559 | TxType::Eip4844 => { + TxType::Eip1559 | TxType::Eip4844 | TxType::Eip7702 => { // the gas price field for EIP1559 is set to `min(tip, gasFeeCap - baseFee) + // baseFee` let gas_price = base_fee