Function determine_replacement_pricing

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

Determines the pricing strategy for a replacement transaction.

§Arguments

  • old_evm_data - The EVM transaction data from the old transaction
  • new_evm_data - The EVM transaction data for the new transaction
  • 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 the price parameters or a TransactionError.