Skip to Content
IndexingOverviewEnable Indexing

Enable Indexing on your rollup

Conduit Indexing simplifies the process of indexing your chain and querying events, simplifying the development experience for your projects and users. This guide will walk you through enabling Indexing and sending your first query.

Sign in

Log into the Conduit app  and head to the Indexing tab. There you will find your rollups and all the chains that are currently available to be queried on Conduit Indexing.

Select a Rollup

Click Enable Indexing on the rollup you’d like to enable Conduit Indexing for and click Enable.

Set up billing

Enter your billing details and subscribe to the Testnet or Mainnet Indexing plan. For pricing details, check out Pricing & Costs.

How To Query Events

Once you’ve finished setting up billing your rollup will immediately begin indexing from genesis. It will then show up on the Query builder on the Query tab and you can begin querying events with your newly created API key (found on the API keys tab).

There are two ways to query; with the Query builder on the Query tab, or directly via the API.

Query Builder

Using the Indexing API directly

The base API url to use is https://indexing.conduit.xyz/v2/query.

To use your API key you can either;

  • Append the API key directly in a query parameter ?api-key=KEY
  • Add a field to the request body { "api-key": "KEY", ... } using a POST request
  • Submit an api-key input value as part of a multipart form request to the above base url.

You can copy the API url with your key appended in the API keys section at the bottom of the Indexing page in the Conduit app.

An example query is:

curl 'https://indexing.conduit.xyz/v2/query?api-key=SECRET_KEY' \ -G \ --data-urlencode 'query=select "from", "to", tokens from transfer where chain = 8453 limit 1' \ --data-urlencode 'signatures=Transfer(address indexed from, address indexed to, uint tokens)' | jq .

The response would look like:

[ { "cursor": "8453-30138481", "columns": [ { "name": "from", "pgtype": "bytea" }, { "name": "to", "pgtype": "bytea" }, { "name": "tokens", "pgtype": "numeric" } ], "rows": [ [ "0x0000000000000000000000000000000000000000", "0x0cf966857325db9a9b4dada66e80ce581c18aca1", "0" ] ] } ]

There is also an official Typescript SDK for Index Supply, which you can find here .

EVM Tables and Columns

When requests include a signature and a query, it is assumed that the query is operating on a virtual table of event logs or transaction inputs (depending on the event or function prefix). However, it is also possible to query the base tables directly.

EVM Tables

Table
blocks
txs
logs

Blocks

Table name: blocks

ColumnType
chainint8
numint8
timestamptimestamptz
gas_limitnumeric
gas_usednumeric
noncebytea
hashbytea
receipts_rootbytea
state_rootbytea
extra_databytea
minerbytea

Transactions

Table name: txs

ColumnType
chainint8
block_numint8
block_timestamptimestamptz
idxint4
typeint2
gasnumeric
gas_pricenumeric
noncebytea
hashbytea
frombytea
tobytea
inputbytea
valuenumeric

Logs

Table name: logs

ColumnType
chainint8
block_numint8
block_timestamptimestamptz
log_idxint4
tx_hashbytea
addressbytea
topicsbytea[]
databytea
Last updated on