Skip to content

Commit

Permalink
[api] add state node getter for rpc-client
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkaihong authored and strawWoo committed Aug 12, 2022
1 parent 95e146e commit b648bb1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rpc/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,14 @@ impl RpcClient {
.map_err(map_err)
}

pub fn get_state_node_by_node_hash(
&self,
key_hash: HashValue,
) -> anyhow::Result<Option<Vec<u8>>> {
self.call_rpc_blocking(|inner| inner.state_client.get_state_node_by_node_hash(key_hash))
.map_err(map_err)
}

pub fn contract_call(&self, call: ContractCall) -> anyhow::Result<Vec<DecodedMoveValue>> {
self.call_rpc_blocking(|inner| inner.contract_client.call_v2(call))
.map_err(map_err)
Expand Down

0 comments on commit b648bb1

Please sign in to comment.