Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Adjustments to RPC-query docstrings. (#13698)
Browse files Browse the repository at this point in the history
* Changes in RPC docs.

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
  • Loading branch information
DamianStraszak authored Apr 3, 2023
1 parent d6f278b commit db40c48
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/rpc-api/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub use self::helpers::ReadProof;
/// Substrate state API
#[rpc(client, server)]
pub trait StateApi<Hash> {
/// Call a contract at a block's state.
/// Call a method from the runtime API at a block's state.
#[method(name = "state_call", aliases = ["state_callAt"], blocking)]
fn call(&self, name: String, bytes: Bytes, hash: Option<Hash>) -> RpcResult<Bytes>;

Expand Down Expand Up @@ -85,8 +85,10 @@ pub trait StateApi<Hash> {
/// Query historical storage entries (by key) starting from a block given as the second
/// parameter.
///
/// NOTE This first returned result contains the initial state of storage for all keys.
/// NOTE: The first returned result contains the initial state of storage for all keys.
/// Subsequent values in the vector represent changes to the previous state (diffs).
/// WARNING: The time complexity of this query is O(|keys|*dist(block, hash)), and the
/// memory complexity is O(dist(block, hash)) -- use with caution.
#[method(name = "state_queryStorage", blocking)]
fn query_storage(
&self,
Expand All @@ -95,7 +97,9 @@ pub trait StateApi<Hash> {
hash: Option<Hash>,
) -> RpcResult<Vec<StorageChangeSet<Hash>>>;

/// Query storage entries (by key) starting at block hash given as the second parameter.
/// Query storage entries (by key) at a block hash given as the second parameter.
/// NOTE: Each StorageChangeSet in the result corresponds to exactly one element --
/// the storage value under an input key at the input block hash.
#[method(name = "state_queryStorageAt", blocking)]
fn query_storage_at(
&self,
Expand Down

0 comments on commit db40c48

Please sign in to comment.