Skip to content

Commit

Permalink
chore: remove eip1559 duplicate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Jan 5, 2024
1 parent 74e8207 commit ba60ce9
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions crates/network/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,14 @@ pub trait Transaction: Encodable + Decodable + Send + Sync + 'static {
/// Captures getters and setters common across EIP-1559 transactions across all networks
pub trait Eip1559Transaction: Transaction {
/// Get `max_priority_fee_per_gas`.
#[doc(alias = "max_tip")]
fn max_priority_fee_per_gas(&self) -> U256;
/// Set `max_priority_fee_per_gas`.
#[doc(alias = "set_max_tip")]
fn set_max_priority_fee_per_gas(&mut self, max_priority_fee_per_gas: U256);

/// Get `max_fee_per_gas`.
fn max_fee_per_gas(&self) -> U256;
/// Set `max_fee_per_gas`.
fn set_max_fee_per_gas(&mut self, max_fee_per_gas: U256);

/// Get `max_tip` (an alias for `max_priority_fee_per_gas`).
fn max_tip(&self) -> U256 {
self.max_priority_fee_per_gas()
}

/// Set max tip, (an alias for `max_priority_fee_per_gas`).
fn set_max_tip(&mut self, max_tip: U256) {
self.set_max_priority_fee_per_gas(max_tip)
}
}

0 comments on commit ba60ce9

Please sign in to comment.