Module transaction

Source
Expand description

This module defines the core transaction handling logic for different blockchain networks, including Ethereum (EVM), Solana, and Stellar. It provides a unified interface for preparing, submitting, handling, canceling, replacing, signing, and validating transactions across these networks. The module also includes a factory for creating network-specific transaction handlers based on relayer and repository information.

The main components of this module are:

  • Transaction trait: Defines the operations for handling transactions.
  • NetworkTransaction enum: Represents a transaction for different network types.
  • RelayerTransactionFactory: A factory for creating network transactions.

The module leverages async traits to handle asynchronous operations and uses the eyre crate for error handling.

Re-exports§

pub use common::is_final_state;
pub use evm::ensure_status;
pub use evm::ensure_status_one_of;
pub use evm::DefaultEvmTransaction;
pub use evm::EvmRelayerTransaction;
pub use solana::DefaultSolanaTransaction;
pub use solana::SolanaRelayerTransaction;
pub use stellar::DefaultStellarTransaction;
pub use stellar::StellarRelayerTransaction;
pub use common::*;

Modules§

common
Common transaction utilities shared across all blockchain networks.
evm
solana
stellar

Structs§

RelayerTransactionFactory
A factory for creating relayer transactions.

Enums§

NetworkTransaction
An enum representing a transaction for different network types.

Traits§

RelayerTransactionFactoryTrait
A trait for creating network transactions.
Transaction
A trait that defines the operations for handling transactions across different networks.

Functions§

get_age_since_created
Gets the age of a transaction since it was created.
get_relayer_transaction
Creates a relayer network transaction instance based on the relayer ID.
get_relayer_transaction_by_model
Creates a relayer network transaction using a relayer model.
get_transaction_by_id
Retrieves a transaction by its ID.
solana_not_supported_transaction
Returns an error indicating that Solana relayers are not supported.