Module evm

Source

Modules§

evm_transaction
This module provides functionality related to Ethereum Virtual Machine (EVM) transactions. It includes the core transaction logic and utility functions for handling EVM transactions. This module defines the EvmRelayerTransaction struct and its associated functionality for handling Ethereum Virtual Machine (EVM) transactions. It includes methods for preparing, submitting, handling status, and managing notifications for transactions. The module leverages various services and repositories to perform these operations asynchronously.
price_calculator
Gas price calculation module for Ethereum transactions.
replacement
This module contains the replacement and resubmission functionality for EVM transactions. It includes methods for determining replacement pricing, validating price bumps, and handling transaction compatibility checks.
status
This module contains the status-related functionality for EVM transactions. It includes methods for checking transaction status, determining when to resubmit or replace transactions with NOOPs, and updating transaction status in the repository.

Structs§

EvmRelayerTransaction
PriceCalculator
Primary struct for calculating gas prices with an injected EvmGasPriceServiceTrait.
PriceParams

Traits§

PriceCalculatorTrait

Functions§

calculate_min_bump
Safely calculates the minimum required gas price for a replacement transaction. Uses saturating arithmetic to prevent overflow and maintains precision.
calculate_replacement_price
Calculates replacement pricing with fresh market rates.
check_transaction_compatibility
Checks if an old transaction and new transaction request are compatible for replacement.
determine_replacement_pricing
Determines the pricing strategy for a replacement transaction.
get_age_of_sent_at
Gets the age of a transaction since it was sent.
has_enough_confirmations
Helper function to check if a transaction has enough confirmations.
has_explicit_prices
Checks if an EVM transaction data has explicit prices.
is_noop
Checks if a transaction is already a NOOP transaction
is_pending_transaction
is_transaction_valid
Checks if a transaction is still valid based on its valid_until timestamp.
make_noop
Updates an existing transaction to be a “noop” transaction (transaction to self with zero value and no data) This is commonly used for cancellation and replacement transactions For Arbitrum networks, uses eth_estimateGas to account for L1 + L2 costs
too_many_attempts
Checks if a transaction has too many attempts
too_many_noop_attempts
Checks if a transaction has too many NOOP attempts
validate_explicit_price_bump
Validates explicit gas prices from a replacement request against bump requirements.

Type Aliases§

DefaultEvmTransaction