# Searching for Transactions

You can use the `sagacli tx` command to look for a specific transaction and its associated details.

{% hint style="info" %}
While we encourage the use of `sagacli`, you can get a better experience searching for transactions, and viewing other details, using the [block explorer](/sagacli/working-with-chainlet/chainlet-apis-and-blockexplorer.md).
{% endhint %}

To use this command:

```
sagacli tx search <hash of the transaction>
```

Example:

```
$ sagacli tx search B20F1BDDDCA619869F385B58977F470179C7C92EC784EE30310E1EAC739C4E90
code: 0
codespace: ""
data: 12310A2F2F7361676178797A2E7370632E636861696E6C65742E4D7367557064617465436861696E6C6574526573706F6E7365
events:
- attributes:
  - index: true
    key: ZmVl
    value: null
  - index: true
    key: ZmVlX3BheWVy
    value: c2FnYTFyZHNzbDIyeXN4eWVuZHJraDJleHc5em03aHZqOGQyanUzNDZnMw==
  type: tx
- attributes:
  - index: true
    key: YWNjX3NlcQ==
    value: c2FnYTFyZHNzbDIyeXN4eWVuZHJraDJleHc5em03aHZqOGQyanUzNDZnMy81
  type: tx
- attributes:
  - index: true
    key: c2lnbmF0dXJl
    value: MVVsWmZ5THUrODRWNWdQZkR0TXRNczlKVTZIbDVVY003ZjJoVlpPb256SUErb2NETXZIcW9zMU15RituNlpOdXlRZm1JMzYxeWNWY1pXc2VhangxQ3c9PQ==
  type: tx
- attributes:
  - index: true
    key: YWN0aW9u
    value: L3NhZ2F4eXouc3BjLmNoYWlubGV0Lk1zZ1VwZGF0ZUNoYWlubGV0
  type: message
- attributes:
  - index: true
    key: Y2hhaW5JZA==
    value: ImNhc3Npb3NoYW4i
  - index: true
    key: c3RhY2tWZXJzaW9u
    value: IjIuMCI=
  type: sagaxyz.spc.chainlet.EventUpdateChainlet
gas_used: "62507"
gas_wanted: "200000"
height: "2017"
info: ""
logs:
- events:
  - attributes:
    - key: action
      value: /sagaxyz.spc.chainlet.MsgUpdateChainlet
    type: message
  - attributes:
    - key: chainId
      value: '"cassioshan"'
    - key: stackVersion
      value: '"2.0"'
    type: sagaxyz.spc.chainlet.EventUpdateChainlet
  log: ""
  msg_index: 0
raw_log: '[{"msg_index":0,"events":[{"type":"message","attributes":[{"key":"action","value":"/sagaxyz.spc.chainlet.MsgUpdateChainlet"}]},{"type":"sagaxyz.spc.chainlet.EventUpdateChainlet","attributes":[{"key":"chainId","value":"\"cassioshan\""},{"key":"stackVersion","value":"\"2.0\""}]}]}]'
timestamp: "2023-03-26T00:47:54Z"
tx:
  '@type': /cosmos.tx.v1beta1.Tx
  auth_info:
    fee:
      amount: []
      gas_limit: "200000"
      granter: ""
      payer: ""
    signer_infos:
    - mode_info:
        single:
          mode: SIGN_MODE_DIRECT
      public_key:
        '@type': /cosmos.crypto.secp256k1.PubKey
        key: AwBIByzfDASI/ozaUwg1TM1p50ZfoAIy3gMKrqSey24i
      sequence: "5"
    tip: null
  body:
    extension_options: []
    memo: ""
    messages:
    - '@type': /sagaxyz.spc.chainlet.MsgUpdateChainlet
      chainId: cassioshan_1679785243507504-1
      chainletName: cassioshan
      chainletStackName: sagaos
      chainletStackVersion: "2.0"
      maintainers:
      - saga1rdssl22ysxyendrkh2exw9zm7hvj8d2ju346g3
      params:
        createEmptyBlocks: false
        dacEnable: false
        denom: ""
        gasLimit: "0"
        genAcctBalances: ""
      sender: saga1rdssl22ysxyendrkh2exw9zm7hvj8d2ju346g3
    non_critical_extension_options: []
    timeout_height: "0"
  signatures:
  - 1UlZfyLu+84V5gPfDtMtMs9JU6Hl5UcM7f2hVZOonzIA+ocDMvHqos1MyF+n6ZNuyQfmI361ycVcZWseajx1Cw==
txhash: B20F1BDDDCA619869F385B58977F470179C7C92EC784EE30310E1EAC739C4E90

```

Looking at the output above, you can get all the relevant details for any given transaction. The very first line of the output indicates the return code, with a value of 0 indicating that the transaction was successful.

For further details on using the `tx` command, refer to:

```
sagacli tx --help
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saga.xyz/sagacli/searching-for-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
