Skip to main content
Version: Old ArrowSquid docs

Gear support


Use lookupArchive('gear-testnet') to connect to an Archive for Gear testnet. An Archive for the Gear mainnet will be added in due course when the network is launched.

Indexing Gear Network programs is supported with the following specialized processor configuration setters:



Structure of options is identical for both methods:

// data requests
programId?: string[]
range?: {from: number, to?: number}

// related data retrieval
call?: boolean
stack?: boolean
extrinsic?: boolean

The methods above subscribe to the events Gear.MessageEnqueued and Gear.UserMessageSent emitted by the specified Gear program.

The meaning of the related data retrieval flags is identical to those of addEvent(). Field selection for the retrieved events is done with setFields().

The processor can also subscribe to any other event with addEvent() and filter by program ID in the batch handler, if so necessary.

An example of a squid indexing a Gear program (an NFT contract) can be found here.