Querying transaction commands use the following format:
Use the transaction search command to query for transactions matching a specific set of events
, which are added on every transaction.
Each event contains a key-value pair in the form of {eventType}.{eventAttribute}={value}
.
Events can be combined to query for more specific results using the &
symbol.
You can query transactions by events
as follows:
And for using multiple events
:
The pagination is supported as well via page
and limit
:
Note: The action tag always equals the message type returned by the Type()
function of the relevant message.
You can find a list of available events
on each of the SDK modules:
You can query a single transaction by its hash using the following command:
There are four flags associated with querying Secret Network transactions using the secretcli.
The --height [int]
flag uses a specific height to query the state of the Secret Network (there will be an error if the node is pruning state).
The --node [string]
flag uses <host>:<port> to connect with the Tendermint RPC for a specific chain (default is "tcp://localhost:26657").
The --type [string]
flag is for querying a tx, and can be the 'hash' (default), 'acc_seq', or 'signature'.
The --help
flag will generate an output giving further details on flags to use with the tx
class of secretcli
commands, and information about global flags
to use with the secretcli
.