Skip to main content
Version: FireSquid

Gear support

Available since @subsquid/substrate-processor@1.6.0


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:

SubstrateBatchProcessor.addGearMessageEnqueued(programId: string, options?: {data?, range?})


SubstrateBatchProcessor.addGearUserMessageSent(programId: string, options?: {data?, range?})

The methods above subscribe to the events Gear.MessageEnqueued and Gear.UserMessageSent emitted by the specified Gear program. The data selections options are the same as for the addEvent() processor method.

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 in this repo.