> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.sqd.dev/feedback

```json
{
  "path": "/en/sdk/squid-sdk/fuel-indexing/fuel-datasource/receipts",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Receipts

> Subscribe to Fuel script execution receipts with addReceipt() in Squid SDK — filter by contract, asset, and receipt type for indexing on Fuel Network.

#### `addReceipt(options)`

Get some *or all* transactions on the network. `options` has the following structure:

```typescript theme={"system"}
{
  // data requests
  type?: ReceiptType[]
  contract?: string[]

  // related data retrieval
  transaction?: boolean

  range?: {
    from: number
    to?: number
  }
}
```

Data requests:

* `type` sets the type of the receipt. Receipt type has the following options: `'CALL' | 'RETURN' | 'RETURN_DATA' | 'PANIC' | 'REVERT' | 'LOG' | 'LOG_DATA' | 'TRANSFER' | 'TRANSFER_OUT' | 'SCRIPT_RESULT' | 'MESSAGE_OUT' | 'MINT' | 'BURN'`. Leave it undefined to subscribe to all receipts.
* `contract` sets the contract addresses to track. Leave it undefined to subscribe to all receipts.

Enabling the `transaction` flag will cause the processor to retrieve transactions that gave rise to the matching receipts. The data will be added to the appropriate iterables within the [block data](/en/sdk/squid-sdk/fuel-indexing/fuel-datasource/context-interfaces). You can also call `augmentBlock()` from `@subsquid/fuel-objects` on the block data to populate the convenience reference fields like `receipt.transaction`.

Note that receipts can also be requested by the other `FuelDataSource` methods as related data.

Selection of the exact fields to be retrieved for each transaction and the optional related data items is done with the `setFields()` method documented on the [Field selection](/en/sdk/squid-sdk/fuel-indexing/fuel-datasource/field-selection) page.

## Examples

Request all receipts of the `LOG_DATA` type and include parent transactions:

```ts theme={"system"}
processor
  .addReceipt({
    type: ["LOG_DATA"],
    transaction: true,
  })
  .build();
```
