- Migrate individual modules to independent crates - Refactor dependencies for improved modularity - Update build system and testing infrastructure - Update documentation to reflect new structure
60 lines
2.0 KiB
Rust
60 lines
2.0 KiB
Rust
//! Ethereum wallet functionality
|
|
//!
|
|
//! This module provides functionality for creating and managing Ethereum wallets
|
|
//! and interacting with smart contracts on EVM-based blockchains.
|
|
//!
|
|
//! The module is organized into several components:
|
|
//! - `wallet.rs`: Core Ethereum wallet implementation
|
|
//! - `networks.rs`: Network registry and configuration
|
|
//! - `provider.rs`: Provider creation and management
|
|
//! - `transaction.rs`: Transaction-related functionality
|
|
//! - `storage.rs`: Wallet storage functionality
|
|
//! - `contract.rs`: Smart contract interaction functionality
|
|
|
|
mod contract;
|
|
pub mod contract_utils;
|
|
pub mod networks;
|
|
mod provider;
|
|
mod storage;
|
|
mod transaction;
|
|
mod wallet;
|
|
// Re-export public types and functions
|
|
pub use networks::NetworkConfig;
|
|
pub use wallet::EthereumWallet;
|
|
|
|
// Re-export wallet creation functions
|
|
pub use storage::{
|
|
create_agung_wallet, create_ethereum_wallet_for_network, create_ethereum_wallet_from_name,
|
|
create_ethereum_wallet_from_name_for_network, create_ethereum_wallet_from_private_key,
|
|
create_ethereum_wallet_from_private_key_for_network, create_peaq_wallet,
|
|
};
|
|
|
|
// Re-export wallet management functions
|
|
pub use storage::{
|
|
clear_ethereum_wallets, clear_ethereum_wallets_for_network, get_current_agung_wallet,
|
|
get_current_ethereum_wallet_for_network, get_current_peaq_wallet,
|
|
};
|
|
|
|
// Re-export provider functions
|
|
pub use provider::{
|
|
create_agung_provider, create_gnosis_provider, create_peaq_provider, create_provider,
|
|
};
|
|
|
|
// Re-export transaction functions
|
|
pub use transaction::{format_balance, get_balance, send_eth};
|
|
|
|
// Re-export network registry functions
|
|
pub use networks::{
|
|
get_all_networks, get_network_by_name, get_proper_network_name, list_network_names, names,
|
|
};
|
|
|
|
// Re-export contract functions
|
|
pub use contract::{
|
|
call_read_function, call_write_function, estimate_gas, load_abi_from_json, Contract,
|
|
};
|
|
|
|
// Re-export contract utility functions
|
|
pub use contract_utils::{
|
|
convert_rhai_to_token, convert_token_to_rhai, prepare_function_arguments, token_to_dynamic,
|
|
};
|