Query Count

Create the query_count function to query the current count from the Essential node using the provided node client, contract address, and counter key.

#![allow(unused)] fn main() { async fn query_count( node: EssentialNodeClient, address: ContentAddress, key: CounterKey, ) -> anyhow::Result<Option<Value>> { Ok(node.query_state(address, key).await?) } }