var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=1&rec=1&url=https://docs.terra.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

terrad query authz grants

Query grants for a granter-grantee pair and optionally a msg-type-url.

Synopsis

Retrieve all existing authorization grants for a granter-grantee pair. If msg-type-url is set, it will select grants only for that msg type.

Examples

Terrad
Copy

_1
terrad query authz grants terra1skj.. terra1skjwj..

Additionally, the grants command can retrieve the specific grant between a granter and a grantee for a message type by appending the message type URL to the end of the command statement, as shown in the following example:

Terrad
Copy

_2
terrad query authz grants terra1skj.. terra1skjwj..
_2
terrad query authz grants terra1skjw.. terra1skjwj.. /cosmos.bank.v1beta1.MsgSend

Usage

Terrad
Copy

_1
terrad query authz grants [granter-addr] [grantee-addr] [msg-type-url]? [flags]

Options

Terrad
Copy

_10
--count-total count the total number of records in grants to query for
_10
--height int Use a specific height to query state at (this can error if the node is pruning state)
_10
-h, --help help for grants
_10
--limit uint pagination limit of grants to query for (default 100)
_10
--node string <host>:<port> to Tendermint RPC interface for this chain (default "tcp://localhost:26657")
_10
--offset uint pagination offset of grants to query for
_10
-o, --output string Output format (text|json) (default "text")
_10
--page uint pagination page of grants to query for. This sets offset to a multiple of limit (default 1)
_10
--page-key string pagination page-key of grants to query for
_10
--reverse results are sorted in descending order

Options inherited from parent commands

Terrad
Copy

_1
--chain-id string The network chain ID

See also