hydra
v3
v3
  • Hydra
  • Hydra CLI
  • Hydra Indexer
  • Hydra Indexer Gateway
  • Hydra Processor
  • Hydra Typegen
  • Overview
    • Query Node Manifest
    • Graphql Queries
    • Pagination
    • Sorting
    • Mappings
      • Context interfaces
      • Mapping Filters
      • Mapping Types
    • Schema
      • The Goodies
      • Entities
      • Enums
      • Interfaces
      • Algebraic types
      • Full-text queries
      • Entity Relationships
      • Cross filtering
      • Variant relations
    • Architecture
  • Install Hydra
  • Migration to Hydra v2
  • What's new in Hydra v3
  • FAQ
  • Quickstart
Powered by GitBook
On this page
  • I try to run Hydra Indexer for my node but see Registry: ERROR: createType errors
  • How do I access extrinsic data in an event handler?
  • I want to bootstrap some external data not available via events or extrinsics
  • How do I deal with runtime upgrades?

Was this helpful?

FAQ

Common gotchas and how-tos

PreviousWhat's new in Hydra v3NextQuickstart

Last updated 3 years ago

Was this helpful?

I try to run Hydra Indexer for my node but see Registry: ERROR: createType errors

This error indicates that the indexer type definitions are not properly set. Hydra Indexer v3 takes the default types from @polkadot/api@4.2.1 which is compatible with runtimes built on Substrate 3.x but may cause errors when run against older versions of Substrate

Make sure that

  • All the custom types are properly defined in the type definition json and the indexer has picked them up

  • Adress and Signature are decoded properly. may be helpful for troubleshooting

How do I access extrinsic data in an event handler?

EventContext has an extrinsic field containing all the relevant extrinsic data if the event was emitted by an extrinsic. Further, one can create a type-safe extrinsic class using the constructor method generated by typegen.

I want to bootstrap some external data not available via events or extrinsics

Export the data into a json file and load into the database via a one-off preBlockHook at the desired height. See for more details.

How do I deal with runtime upgrades?

To inject some new data, define a one-off block hook triggered at the block height with the upgrade. In order to have different versions of event/extrinsic handlers for pre- and post- upgrade, use specVersion .

This page
mapping filters
filter