Skip to main content
Version: Firesquid



The following setters configure the global settings. The setters return the modified instance and can be chained. Consult inline docs and the IDE assist for more details.

  • setBlockRange(Range). Limits the range of blocks to be processed

  • setDataSource(DataSource). Set the data source to fetch the data from.

    • archive: an archive endpoint. See the supported networks below.
    • chain: (Optional) A JSON-RPC endpoint (e.g. if the processor intents do make storage queries). The JSON-RPC endpoint is required for making contract state queries. If the squid indexes only event and/or transaction data, it can be omitted.

The following EVM networks are supported

NetworkArchive endpoint
Ethereum mainnet
Ethereum Goerli
Binance Smart ChainComing Soon
ArbitrumComing Soon
OptimismComing Soon

EVM logs

Use addLog(contract: string | string[], options) to subscribe to the EVM log data (event) emitted by a specific EVM contract.

The option argument supports filtering by topic and data selectors to specify which data is provided by the corresponding context item:

range?: DataRange,
filter?: EvmTopicSet[],
data?: {
evmLog: {
// fields to be requested for this item
transaction: {
// fields to be requested from the tx emitted the log

Note, that the topic filter follows the Ether.js filter specification. For example, for a filter that accepts the ERC721 topic Transfer(address,address,uint256) AND ApprovalForAll(address,address,bool) use a double array as in the example below.

EVM transactions

Since @subsquid/evm-processor@0.0.1

To subscribe to transaction data, use addTransaction(address: string | string[], options?). The first argument specifies a single address or an array of addresses to which the transaction to which the transaction has been submitted. An empty array means that all transactions will be selected (matching the optional options filter if provided).

The options argument specifies the additional filtering options and a data selector which tells which transaction data should be fetched from the archive.

Currently, options accepts the following filters:


Request all EVM calls to the contract 0x6a2d262D56735DbA19Dd70682B39F6bE9a931D98:


Request all transfer(address,uint256) transactions (matching the corresponding sighash):

processor.addTransaction([], {sighash: '0xa9059cbb'})

Request all transfer(address,uint256) to the specified addresses, from block 6_000_000 onwards:

], {
range: {
from: 6_000_000
sighash: '0xa9059cbb'

Data Selectors

The data selectors can define any subset of the fields below:

export interface EvmTransaction {
id: string
from: string
gas: bigint
gasPrice: bigint
hash: string
input: string
nonce: bigint
to?: string
index: number
value: bigint
type: number
chainId: number
v: bigint
r: string
s: string

export interface EvmLog {
id: string
address: string
data: string
index: number
removed: boolean
topics: string[]
transactionIndex: number

For example, the following configuration will tell the processor to enrich the transaction data of the evm log items with the r, s, v fields:

data: {
evmLog: {
id: true,
topics: true,
data: true,
transaction: {
r: true,
s: true,
v: true


Below is an example of EvmBatchProcessor subscribing

const processor = new EvmBatchProcessor()
archive: '',
.setBlockRange({ from: 10_000_000 })
// Gravatar contract
.addLog('0x2E645469f354BB4F5c8a05B3b30A929361cf77eC', {
filter: [[
// topic: 'NewGravatar(uint256,address,string,string)'
// topic: 'UpdatedGravatar(uint256,address,string,string)'
data: {
evmLog: {
topics: true,
data: true,
.addTransaction(['0xac5c7493036de60e63eb81c5e9a440b42f47ebf5'], {
range: {
from: 15_800_000
// setApprovalForAll(address,bool)
sighash: '0xa22cb465',
data: {
transaction: {
from: true,
input: true,
to: true
}); TypeormDatabase(), async (ctx) => {
// simply output all the items in the batch, "Got blocks")