Skip to main content

Crate apex_sdk_evm

Crate apex_sdk_evm 

Source
Expand description

§Apex SDK EVM Adapter

EVM blockchain adapter for the Apex SDK, providing unified access to Ethereum and EVM-compatible chains.

§Supported Networks

  • Ethereum Mainnet
  • Binance Smart Chain (BSC)
  • Polygon (Matic)
  • Avalanche C-Chain
  • And other EVM-compatible chains

§Features

  • HTTP and WebSocket Support: Flexible connection types
  • Transaction Management: Send, track, and query transactions
  • Smart Contract Interaction: Call and deploy contracts
  • Wallet Integration: Built-in wallet and signing support
  • Connection Pooling: Efficient resource management
  • Metrics Collection: Performance monitoring

§Quick Start

use apex_sdk_evm::EvmAdapter;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Connect to Ethereum mainnet
    let adapter = EvmAdapter::connect("https://eth.llamarpc.com").await?;

    // Get balance
    let balance = adapter.get_balance("0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7").await?;
    println!("Balance: {} wei", balance);

    Ok(())
}

Re-exports§

pub use adapter::EvmAdapter;
pub use broadcaster::EvmBroadcaster;
pub use fee_estimator::EvmFeeEstimator;
pub use nonce_manager::EvmNonceManager;
pub use provider::EvmProvider;
pub use receipt_watcher::EvmReceiptWatcher;
pub use signer::EvmSigner;
pub use transaction::TransactionExecutor;
pub use cache::EvmCache;
pub use metrics::Metrics;
pub use pool::ConnectionPool;
pub use wallet::Wallet;
pub use wallet::WalletManager;

Modules§

adapter
Unified EVM Adapter with Transaction Pipeline
broadcaster
EVM Broadcaster implementation
cache
Caching layer for EVM queries
contract
Smart contract interaction for EVM chains
fee_estimator
EVM Fee Estimator implementation
metrics
Metrics collection for EVM adapter operations
nonce_manager
EVM Nonce Manager implementation
pool
Connection pooling for EVM providers
provider
EVM Provider implementation
receipt_watcher
EVM Receipt Watcher implementation
signer
EVM Signer implementation
transaction
Transaction execution for EVM chains
wallet
Wallet management for EVM chains

Structs§

ProviderType
Provider type that supports HTTP connections Uses dynamic dispatch to support multiple transport types

Enums§

Error
EVM adapter error

Type Aliases§

AlloyHttpProvider
Type alias for the complex Alloy provider type with all fillers