HyperIndex v2.5.0

Released on 15 October 2024.

New Feature

Dynamic Contract Pre-registration

You can now add "preRegisterDynamicContracts" flag to your event config. For all the events that have this config, there will be an end to end indexer run just for these events to run all the relevant contractRegister functions and collect all the dynamic contract addresses. The indexer then restarts with all these addresses from the start block configured for the network (rather than from the block that the contract gets registered). For a standard factory contract setup this drastically reduces indexing time since it doesn't result in many small block range queries but rather larger grouped queries.

PoolFactory.CreatePool.contractRegister(
  ({ event, context }) => {
    context.addPool(event.params.pool);
  },
  { preRegisterDynamicContracts: true },
);

What's Changed

  • Dynamic Contract Pre Registration #252
  • Dynamic Contract Preregistration improvements #259
Contributor
JonoPrest
View on GitHub