HyperIndex v2.9.0

Released on 28 November 2024.

Environment Variables in the config file

The Envio config file can now use Environment Variables to offer more flexibility. If you want to switch between different configurations quickly, you don't need to edit the config file each time; you can just set Environment Variables at run time.

For the Hosted Service users, it's now possible to set custom Environment Variables

Below is a simple example:

networks:
  - id: ${ENVIO_CHAIN_ID:-137}
    start_block: ${ENVIO_START_BLOCK:-45336336}
    contracts:
      - name: Greeter
        address: ${ENVIO_GREETER_ADDRESSES}

Then you can run ENVIO_GREETER_ADDRESSES=0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c pnpm dev, or set the values via the .env or the indexer settings page on the Hosted Service.

Interpolation syntax

For the interpolation to be applied, the Environment Variable name should be placed in braces after a dollar sign (${VAR}).

For braced expressions, the following formats are supported:

Direct substitution

  • ${VAR} -> value of VAR

Default value

  • ${VAR:-default} -> value of VAR if set and non-empty, otherwise default
  • ${VAR-default} -> value of VAR if set, otherwise default

Other Improvements

  • Fix to allow naming entities in schema.graphql as Schema, Belt, EntityHistory, InternalEntity, Entity, Utils #353
  • Display HyperSync tiers for networks on init #362
  • Don't wait for the new block when there are partitions we still can query #364
  • Remove current height from the endBlock for HyperSync/HyperFuel queries to improve latency #364
  • Added deduplication for new block polling #364
  • Internal: Start working on the custom RPC client #356
Contributors
DZakhJonoPrest
View on GitHub