Documentation Index
Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
Use this file to discover all available pages before exploring further.
Events
addEvent(options): Subscribe to Substrate runtime events. options has the following structure:
names must follow the convention ${Pallet}.${NameWithinPallet} with both parts usually capitalized, e.g. Balances.Transfer.
You may also request the data related to the events:
- with
call = truethe processor will retrieve the parent call and add it to thecallsiterable within the block data; - with
stack = trueit will do that with all calls in the entire call stack; - with
extrinsic = trueit will add the parent extrinsic to theextrinsicsblock data iterable.
addCall() method as related data.
Selection of the exact data to be retrieved for each log and its optional parent transaction is done with the setFields() method documented on the Fields selection page.
Calls
addCall(options): Subscribe to runtime calls (even if wrapped into a system.sudo or util.batch extrinsic). options has the following structure:
${Pallet}.${call_name}. The pallet name is normally capitalized, and the call name is in the snake_case format, as in Balances.transfer_keep_alive.
By default, both successful and failed calls are fetched. Select the call.success field and later check it within the batch handler if you need to disambiguate.
You may also request the data related to the calls:
- with
events = truethe processor will retrieve all the events that the call emitted and add them to theeventsiterable within the block data; - with
stack = trueit will add all calls in the stack of each matching call, including itself, to thecallsiterable; - with
extrinsic = trueit will add the parent extrinsic to theextrinsicsblock data iterable.
addEvent() method as related data.
Selection of the exact data to be retrieved for each log and its optional parent transaction is done with the setFields() method documented on the Fields selection page.
Specialized setters
addEvmLog(options)
A SubstrateBatchProcessor configuration setter that subscribes it to EVM.Log events by contract address(es) and/or EVM log topics. options have the following structure:
addEvent().
addEthereumTransaction(options)
A SubstrateBatchProcessor configuration setter that subscribes it to Ethereum.transact calls by contract address(es) and/or function sighashes. options have the following structure:
addCall().
The processor with fetch both successful and failed transactions. Further, there’s a difference between the success of a Substrate call and the internal EVM transaction. The transaction may fail even if the enclosing Substrate call has succeeded. Use events = true to retrieve Ethereum.Executed events that can be used to figure out the EVM transaction status (see getTransactionResult()).
addContractsContractEmitted(options)
Subscribe to the ink! events (Contracts.ContractEmitted) of the WASM runtime. options has the following structure:
addEvent().
addGearMessageQueued(options)
addGearUserMessageSent(options)
Structure of options is identical for both methods:
Gear.MessageQueued and Gear.UserMessageSent emitted by the specified Gear program.
Related data retrieval and field selection are identical to addEvent().