hydra
Search…
Mapping Types
A mapping can be triggered not only by a runtime event, but also at the end of an extrinsic execution or at the beginning or at the end of arbitrary block
The manifest file provides flexible control over when and which mappings are executed by the processor. All mappings are identified by the exported function name, as defined by the handler property.
The following types are supported:
  • Event mappings: executed when a matching event was emitted by runtime. Defined in the eventMappings section of the manifest:
1
eventHandlers:
2
- event: balances.Transfer
3
handler: balancesTransfer
Copied!
  • Extrinsic mappings: executed when the corresponding event is triggered by the matching extrinsic. By default, the trigger event is system.ExtrinsicSuccess but may be extended by the optional property triggerEvents in the definition
1
extrinsicHandlers:
2
- extrinsic: timestamp.set
3
handler: timestampCall
4
triggerEvents: # optional list of events triggering the execution
5
- system.ExtrinsicSuccess
6
- system.ExtrinsicFailure
Copied!
  • Pre-block hooks: Executed prior to any events in the block.
1
preBlockHooks:
2
- handler: preHook
Copied!
  • Post-block hooks. Executed after all the event and extrinsic mappings in the block
1
preBlockHooks:
2
- handler: preHook
Copied!

Mapping Filters

Last modified 7mo ago
Copy link