diff --git a/crates/rpc-types/src/eth/transaction/common.rs b/crates/rpc-types/src/eth/transaction/common.rs index 0f4969ae274..0d6d4e84039 100644 --- a/crates/rpc-types/src/eth/transaction/common.rs +++ b/crates/rpc-types/src/eth/transaction/common.rs @@ -19,6 +19,14 @@ pub struct TransactionInfo { pub base_fee: Option, } +impl TransactionInfo { + /// Returns a new [`TransactionInfo`] with the provided base fee. + pub const fn with_base_fee(mut self, base_fee: u128) -> Self { + self.base_fee = Some(base_fee); + self + } +} + impl From<&Transaction> for TransactionInfo { fn from(tx: &Transaction) -> Self { Self {