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

# Index Any Contract

> Enable on-chain data indexing for any linked EVM smart contract, then query decoded transfers, balances, supply history, and RBAC roles through the Tokenization API.

Fireblocks can index on-chain events for any linked EVM smart contract, then expose decoded transfers, balances, supply history, and role-based access control (RBAC) roles through the Tokenization API.

## On-chain data

Every time a smart contract does something, it writes a record of it to the blockchain. By their activities, contracts create events, which are stored on-chain as logs attached to the transaction that triggered them. An ERC-20 contract, for example, creates a `Transfer` event on every mint, burn, and transfer, and an `Approval` event whenever a holder authorizes a spender. Contracts that implement RBAC create events such as `RoleGranted` and `RoleRevoked`. You can receive these events through [Tokenization on-chain data webhooks](/reference/webhooks-structures-eventtypes-tokenization).

Logs are the contract's own record of what happened and when. Reading a contract's current state (calling `balanceOf` for an address, or `totalSupply`) tells you where things stand right now. Logs tell you how they got there: who held the token last month, when supply changed, which address granted a role, and in which block.

The raw logs are not directly usable. Each one is a set of hashed topics and packed hexadecimal data, and getting a full history means requesting logs block by block from a node, then decoding them against the contract's Application Binary Interface (ABI). Answering a question like "what was this address's balance on June 30th" means replaying every transfer that touched it since the contract was deployed.

Indexing does that work for you. Fireblocks reads the contract's logs from the chain, decodes them using the contract ABI, and stores the result so you can query it directly: transfers, balances at a point in time, supply history, and active roles.

## Coverage

Fireblocks supports on-chain data indexing for any [linked](/api-reference/tokenization/link-a-contract) EVM smart contract on a [supported network](#supported-networks), not only Fireblocks reference smart contracts (ERC20F, Access Registry). Once indexing is enabled for a contract, you can query decoded transfer events, balances, balance history, total supply, and active RBAC roles through the Tokenization API.

## How it works

Indexing is enabled per contract from the Fireblocks Console, then read through the [API endpoints](#api-surface) below. Enabling indexing for a contract:

* Backfills historical on-chain events for the contract (a *scan*), so historical queries return complete data instead of only events from the moment you enabled indexing.
* Starts ongoing tracking of new events: transfers, supply changes, freezes, role grants, ownership transfers, and cross-chain bridge events (for example, LayerZero Omnichain Fungible Token (OFT) events).

<Note>
  **Audit trail:** Indexing also captures contract upgrades, authorization (RBAC) changes, and cross-chain bridging as part of the same event feed. This gives you an audit trail for on-chain activity that did not originate from Fireblocks, which is useful when reconciling bring-your-own (BYO) token contracts against your own records.
</Note>

## Enable indexing for a contract

Indexing is a per-contract setting, managed from the Console:

<Steps>
  <Step title="Open the contract">
    Open the token or the contract's details page in the Console.
  </Step>

  <Step title="Open On-chain data">
    Select **On-chain data** from the contract header.
  </Step>

  <Step title="Turn on indexing">
    Turn on **Event indexing**. Optionally, turn on **Webhook notifications** to include the contract in your workspace's Tokenization webhook notifications.
  </Step>

  <Step title="Scan history">
    Select **Scan** under **Scan history** to backfill historical events. This can take from a few minutes to several days, depending on the contract's activity volume.
  </Step>
</Steps>

<Note>
  If a scan stops before it concludes, the same modal shows how far it got and lets you restart it.
</Note>

Poll the endpoints below, or use the workspace's [Tokenization webhook](/reference/webhooks-structures-eventtypes-tokenization), to determine when a contract has concluded its initial scan and has data available.

## API surface

The following endpoints are available once indexing is enabled for a token contract. `{id}` is the Fireblocks token link ID.

### Transfers

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/transfers
```

Returns paginated ERC-20 transfer events for the token contract. Supports filtering by date range, sender address, and receiver address.

See [Get onchain transfers for a token](/api-reference/tokenization/get-onchain-transfers-for-a-token). Response type: `OnchainTransfersPagedResponse`.

### Transactions and events

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/transactions
```

Returns paginated on-chain transactions for the token contract, filterable by date range. This is the decoded event feed shown in the Console's **Events** tab, including transfers, supply changes, freezes, role grants, ownership transfers, and cross-chain bridge events.

See [Get onchain transactions for a token](/api-reference/tokenization/get-onchain-transactions-for-a-token). Response type: `OnchainTransactionsPagedResponse`.

### Balances (all holders)

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/balances
```

Returns the latest balance for each unique address holding the token.

See [Get latest balances for all holders of a token](/api-reference/tokenization/get-latest-balances-for-all-holders-of-a-token). Response type: `AddressBalancePagedResponse`.

### Balance (single account)

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/balances/{accountAddress}
```

Returns the latest balance for a specific account address.

See [Get the latest balance for a specific account](/api-reference/tokenization/get-the-latest-balance-for-a-specific-account). Response type: `AddressBalanceItemDto`.

### Balance history

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/balances/{accountAddress}/history
```

Returns paginated balance history for an account. Supports time-range filtering and interval binning.

See [Get balance history for a specific account](/api-reference/tokenization/get-balance-history-for-a-specific-account). Response type: `BalanceHistoryPagedResponse`.

### Total supply

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/total_supply
```

Returns paginated total supply history. Supports time-range filtering and interval binning.

See [Get historical total supply for a token](/api-reference/tokenization/get-historical-total-supply-for-a-token). Response type: `TotalSupplyPagedResponse`.

### Roles (RBAC)

```http theme={"system"}
GET /v1/tokenization/tokens/{id}/rbac
```

Returns the list of currently active roles for the token contract.

See [Get active RBAC roles for a token](/api-reference/tokenization/get-active-rbac-roles-for-a-token). Response type: `ActiveRolesResponse`.

## Supported networks

| Chain     | Mainnet             | Testnet                              |
| --------- | ------------------- | ------------------------------------ |
| Arbitrum  | `arbitrum-mainnet`  | `arbitrum-sepolia`                   |
| Avalanche | `avalanche-mainnet` | `avalanche-fuji`                     |
| Base      | `base-mainnet`      | `base-sepolia`                       |
| BNB Chain | `bnbchain-mainnet`  | `bnbchain-testnet`                   |
| Ethereum  | `ethereum-mainnet`  | `ethereum-sepolia`, `ethereum-hoodi` |
| Gnosis    | `gnosis-mainnet`    | —                                    |
| Optimism  | `optimism-mainnet`  | `optimism-sepolia`                   |
| Polygon   | `polygon-mainnet`   | `polygon-amoy`                       |
| Monad     | `monad-mainnet`     | `monad-testnet`                      |
| Arc       | —                   | `arc-testnet`                        |

## Scope

On-chain indexing covers any linked EVM smart contract on the networks above, including BYO token contracts, which make up roughly 40% of contracts in the Tokenization Engine. This also unlocks the token management experience for any ERC-20 contract, along with upcoming features such as Yield Payer.
