# Receipt Subquery

## Description

Receipt Subqueries provide information about a completed transaction and any logs/events emitted. [Etherscan (Goerli)](https://goerli.etherscan.io/) provides a lot of useful information when looking at this data.

## Limits

Maximum of 32 Receipt subqueries per Query. Each receipt can have a data field of at most 512 bytes and can have at most 20 logs.

## Builder

`buildReceiptSubquery(txHash)`

## Examples

[Etherscan link for below transaction log](https://goerli.etherscan.io/tx/0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29#eventlog)

<figure><img src="/files/6jpr9y9HQB5tY9H63TU2" alt=""><figcaption><p>(corresponds to code block below) Log at index 0 (out of length 5), where topic 1 is <code>address dst</code></p></figcaption></figure>

```typescript
const txHash = "0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29";
const schema = getEventSchema("Deposit (index_topic_1 address dst, uint256 wad)");
const receiptSubquery: ReceiptSubquery = buildReceiptSubquery(txHash)
      .log(0) // log at index 0
      .topic(1) // topic 1: address dst
      .eventSchema(schema);
```

```typescript
const txHash = "0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29";
const receiptSubquery: ReceiptSubquery = buildReceiptSubquery(txHash)
      .txType();
```

```typescript
const txHash = "0x9890aaedc5df95de7d535faf10c8d1a96a262b79e0fcb2ed52939c8ebd049d29";
const receiptSubquery: ReceiptSubquery = buildReceiptSubquery(txHash)
      .log(0)
      .address(); // address of contract that emitted the event at log index 0
```


---

# 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://intrinsic-1.gitbook.io/axiomv2-sdk/sdk-and-repl-reference/axiom-sdk-reference/data-subqueries/receipt-subquery.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.
