diff --git a/crates/consensus/src/transaction/eip1559.rs b/crates/consensus/src/transaction/eip1559.rs index 2d03c6fa9cc..b11f710c405 100644 --- a/crates/consensus/src/transaction/eip1559.rs +++ b/crates/consensus/src/transaction/eip1559.rs @@ -23,7 +23,7 @@ pub struct TxEip1559 { /// this transaction. This is paid up-front, before any /// computation is done and may not be increased /// later; formally Tg. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, /// A scalar value equal to the maximum /// amount of gas that should be used in executing diff --git a/crates/consensus/src/transaction/eip2930.rs b/crates/consensus/src/transaction/eip2930.rs index 412206a46e8..bfb3008f320 100644 --- a/crates/consensus/src/transaction/eip2930.rs +++ b/crates/consensus/src/transaction/eip2930.rs @@ -32,7 +32,7 @@ pub struct TxEip2930 { /// this transaction. This is paid up-front, before any /// computation is done and may not be increased /// later; formally Tg. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, /// The 160-bit address of the message call’s recipient or, for a contract creation /// transaction, ∅, used here to denote the only member of B0 ; formally Tt. diff --git a/crates/consensus/src/transaction/eip4844.rs b/crates/consensus/src/transaction/eip4844.rs index 123646d88d1..536d1891732 100644 --- a/crates/consensus/src/transaction/eip4844.rs +++ b/crates/consensus/src/transaction/eip4844.rs @@ -350,7 +350,7 @@ pub struct TxEip4844 { /// this transaction. This is paid up-front, before any /// computation is done and may not be increased /// later; formally Tg. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, /// A scalar value equal to the maximum /// amount of gas that should be used in executing diff --git a/crates/consensus/src/transaction/eip7702.rs b/crates/consensus/src/transaction/eip7702.rs index e915d3e5929..a2cc0b8aec6 100644 --- a/crates/consensus/src/transaction/eip7702.rs +++ b/crates/consensus/src/transaction/eip7702.rs @@ -26,7 +26,7 @@ pub struct TxEip7702 { /// this transaction. This is paid up-front, before any /// computation is done and may not be increased /// later; formally Tg. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, /// A scalar value equal to the maximum /// amount of gas that should be used in executing diff --git a/crates/consensus/src/transaction/legacy.rs b/crates/consensus/src/transaction/legacy.rs index a447ab67476..a958cdc2ca4 100644 --- a/crates/consensus/src/transaction/legacy.rs +++ b/crates/consensus/src/transaction/legacy.rs @@ -41,7 +41,7 @@ pub struct TxLegacy { /// this transaction. This is paid up-front, before any /// computation is done and may not be increased /// later; formally Tg. - #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity"))] + #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))] pub gas_limit: u64, /// The 160-bit address of the message call’s recipient or, for a contract creation /// transaction, ∅, used here to denote the only member of B0 ; formally Tt.