Function casper_client::query_global_state
source · pub async fn query_global_state(
rpc_id: JsonRpcId,
node_address: &str,
verbosity: Verbosity,
global_state_identifier: GlobalStateIdentifier,
key: Key,
path: Vec<String>
) -> Result<SuccessResponse<QueryGlobalStateResult>, Error>
Expand description
Retrieves a StoredValue
from global state at a given Block
or state root hash.
Sends a JSON-RPC query_global_state
request to the specified node.
key
specifies the key under which the value is stored in global state.
path
defines the further path (if any) from key
to navigate to during the query. This is
only applicable in the case where the value under key
is an account or contract. In this
case, the first path
element represents a name in the account/contract’s named keys. If that
second Key
also points to an account or contract, then a second path element can be added to
continue the query into that account/contract’s named keys. This can continue up to the
server’s configured maximum query depth (5 by default).
For details of the other parameters, see the module docs.