Skip to content

Commit

Permalink
docs: recommend 'path' style of vstorage query
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Dec 15, 2023
1 parent ac656d2 commit 5bf7d83
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions golang/cosmos/x/vstorage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,20 @@ This is used by the SwingSet "bridge".

## CLI

A blockchain node may be interrogated by RPC using `agd [--node $url] query vstorage $command` via [client/cli](./client/cli/query.go).
* `children [--height $blockHeight] [-o {text,json}] [$path]`
* `data [--height $blockHeight] [-o {text,json}] $path`
A blockchain node may be interrogated by RPC using `agd [--node $url] query vstorage path` via [client/cli](./client/cli/query.go). (See command help for options and variants `data` and `children`.)

Examples:
```sh
$ agd --node https://main.rpc.agoric.net:443/ query vstorage children published.reserve
$ agd --node https://main.rpc.agoric.net:443/ query vstorage path published.reserve.
children:
- governance
- metrics
pagination: null

$ agd --node https://main.rpc.agoric.net:443/ query vstorage children -o json published.reserve
$ agd --node https://main.rpc.agoric.net:443/ query vstorage path -o json published.reserve.
{"children":["governance","metrics"],"pagination":null}

$ agd --node https://main.rpc.agoric.net:443/ query vstorage data published.reserve.metrics
$ agd --node https://main.rpc.agoric.net:443/ query vstorage path published.reserve.metrics
value: '{"blockHeight":"11030240","values":["{\"body\":\"#{\\\"allocations\\\":{\\\"Fee\\\":{\\\"brand\\\":\\\"$0.Alleged:
IST brand\\\",\\\"value\\\":\\\"+20053582387\\\"}},\\\"shortfallBalance\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+0\\\"},\\\"totalFeeBurned\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+0\\\"},\\\"totalFeeMinted\\\":{\\\"brand\\\":\\\"$0\\\",\\\"value\\\":\\\"+0\\\"}}\",\"slots\":[\"board0257\"]}"]}'
```
Expand Down

0 comments on commit 5bf7d83

Please sign in to comment.