From ce98a4e042c8e9dd7b3a6160245f4928654f9749 Mon Sep 17 00:00:00 2001 From: John Smith Date: Tue, 8 Aug 2023 15:12:56 +0800 Subject: [PATCH] fix: misused `max_priority_fee_per_gas` and `max_fee_per_gas` --- eth-types/src/geth_types.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 66323c04d7..2d0a43c45f 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -180,8 +180,8 @@ impl From<&Transaction> for crate::Transaction { gas: tx.gas_limit.to_word(), value: tx.value, gas_price: Some(tx.gas_price), - max_priority_fee_per_gas: Some(tx.gas_fee_cap), - max_fee_per_gas: Some(tx.gas_tip_cap), + max_priority_fee_per_gas: Some(tx.gas_tip_cap), + max_fee_per_gas: Some(tx.gas_cap_cap), input: tx.call_data.clone(), access_list: tx.access_list.clone(), v: tx.v.into(), @@ -201,8 +201,8 @@ impl From<&crate::Transaction> for Transaction { gas_limit: tx.gas.as_u64().into(), value: tx.value, gas_price: tx.gas_price.unwrap_or_default(), - gas_fee_cap: tx.max_priority_fee_per_gas.unwrap_or_default(), - gas_tip_cap: tx.max_fee_per_gas.unwrap_or_default(), + gas_tip_cap: tx.max_priority_fee_per_gas.unwrap_or_default(), + gas_cap_cap: tx.max_fee_per_gas.unwrap_or_default(), call_data: tx.input.clone(), access_list: tx.access_list.clone(), v: tx.v.as_u64(),