Counted Service Failed
Last updated
#[cfg(test)]
use cess_rust_sdk::chain::audit::query::StorageQuery;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let account = "cXgaee2N8E77JJv9gdsGAckv1Qsf3hqWYf7NL4q6ZuQzuAUtB";
let result = StorageQuery::counted_service_failed(account, None).await?;
match result {
Some(count) => println!("Account {} has {} service failures.", account, count),
None => println!("No service failure record found for account {}.", account),
}
Ok(())
}