get_esdt_tokens/
get_esdt_tokens.rs

1use multiversx_sdk::chain_core::std::Bech32Address;
2use multiversx_sdk_http::{GatewayHttpProxy, DEVNET_GATEWAY};
3
4#[tokio::main]
5async fn main() {
6    let addr = Bech32Address::from_bech32_string(
7        "erd1pdv0h3ddqyzlraek02y5rhmjnwwapjyhqm983kfcdfzmr6axqhdsfg4akx".to_owned(),
8    );
9
10    let blockchain = GatewayHttpProxy::new(DEVNET_GATEWAY.to_string());
11    let balances = blockchain.get_account_esdt_tokens(&addr).await.unwrap();
12
13    assert!(!balances.is_empty());
14    println!("{balances:#?}");
15}