Function calculate_replacement_price

Source
pub async fn calculate_replacement_price<PC: PriceCalculatorTrait>(
    old_evm_data: &EvmTransactionData,
    new_evm_data: &EvmTransactionData,
    relayer: &RelayerRepoModel,
    price_calculator: &PC,
    network_lacks_mempool: bool,
) -> Result<PriceParams, TransactionError>
Expand description

Calculates replacement pricing with fresh market rates.

§Arguments

  • old_evm_data - The original transaction data for bump validation
  • new_evm_data - The new transaction data
  • relayer - The relayer model for policy validation
  • price_calculator - The price calculator instance
  • network_lacks_mempool - Whether the network lacks mempool (skips bump validation)

§Returns

A Result containing calculated price parameters or a TransactionError.