use std::env::args;
use avalanche_sdk::c;
use log::info;
use tokio::runtime::Runtime;
fn main() {
env_logger::init_from_env(
env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"),
);
let rt = Runtime::new().unwrap();
let url = args().nth(1).expect("no url given");
let paddr = args().nth(2).expect("no C-chain address given");
let resp = rt
.block_on(c::get_balance(&url, &paddr))
.expect("failed to get balance");
info!("response: {:?}", resp);
}