v2.9.0
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 ofVAR
Default value
${VAR:-default}
-> value ofVAR
if set and non-empty, otherwisedefault
${VAR-default}
-> value ofVAR
if set, otherwisedefault
Other Improvements
- Fix to allow naming entities in schema.graphql as
Schema
,Belt
,EntityHistory
,InternalEntity
,Entity
,Utils
by @DZakh in #353 - Display HyperSync tiers for networks on init by @JonoPrest in #362
- Don't wait for the new block when there are partitions we still can query by @DZakh in #364
- Remove current height from the endBlock for HyperSync/HyperFuel queries to improve latency by @DZakh in #364
- Added deduplication for new block polling by @DZakh in #364
- Internal: Start working on the custom RPC client by @DZakh in #356
Full Changelog: v2.8.2...v2.9.0