pub struct BlockchainClient {
pub network: String,
/* private fields */
}Expand description
Blockchain client for real network interactions
Fields§
§network: StringNetwork name
Implementations§
Source§impl BlockchainClient
impl BlockchainClient
Sourcepub async fn get_transaction_status(
&self,
tx_hash: &str,
) -> Result<TransactionInfo>
pub async fn get_transaction_status( &self, tx_hash: &str, ) -> Result<TransactionInfo>
Get transaction status by hash
Sourcepub async fn get_balance(&self, address: &str) -> Result<BalanceInfo>
pub async fn get_balance(&self, address: &str) -> Result<BalanceInfo>
Get balance for an address
Sourcepub async fn get_usdc_balance(&self, address: &str) -> Result<BalanceInfo>
pub async fn get_usdc_balance(&self, address: &str) -> Result<BalanceInfo>
Get USDC balance for an address
Sourcepub async fn get_network_info(&self) -> Result<NetworkInfo>
pub async fn get_network_info(&self) -> Result<NetworkInfo>
Get network information
Sourcepub async fn estimate_gas(
&self,
transaction: &TransactionRequest,
) -> Result<u64>
pub async fn estimate_gas( &self, transaction: &TransactionRequest, ) -> Result<u64>
Estimate gas for a transaction
Sourcepub fn get_usdc_contract_address(&self) -> Result<String>
pub fn get_usdc_contract_address(&self) -> Result<String>
Get USDC contract address for current network
Auto Trait Implementations§
impl Freeze for BlockchainClient
impl !RefUnwindSafe for BlockchainClient
impl Send for BlockchainClient
impl Sync for BlockchainClient
impl Unpin for BlockchainClient
impl !UnwindSafe for BlockchainClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more