Releases: enviodev/hyperindex
v2.27.0
What's Changed
Introducing Preload Optimization
Important! Preload optimization makes your handlers run twice.
Starting from[email protected]
all new indexers are created with preload optimization pre-configured by default.
This optimization enables HyperIndex to efficiently preload entities used by handlers through batched database queries, while ensuring events are processed synchronously in their original order. When combined with the Effect API for external calls, this feature delivers performance improvements of multiple orders of magnitude compared to other indexing solutions.
Set a single line in your config and make your handlers multiple times faster without changing a single line of code:
preload_handlers: true
For power users - This is like Loaders, but for all handlers by default.
Read more about Preload Optimization in the dedicated guide.
Contract-specific start block
A highly requested feature contributed by one of our users @rori4 🎉
Specify a later start block for a contract to optimize indexing performance:
name: nft-indexer
description: NFT Factory
networks:
- id: 1337
start_block: 0
contracts:
- name: NftFactory
address: 0x4675a6B115329294e0518A2B7cC12B70987895C4
handler: src/EventHandlers.ts
events:
- event: SimpleNftCreated(string name, string symbol, uint256 maxSupply, address contractAddress)
- name: Nft
# No address field - we'll discover these addresses from SimpleNftCreated events
start_block:
handler: src/EventHandlers.ts
start_block: 30000000 # Overwrite the network start block
events:
- event: Transfer(address from, address to, uint256 tokenId)
In the Factory Contract example above, it'll register all NFT addresses, but it'll start processing Transfers only from the block 30000000
.
Contributing Improvements
To support new contributors, we have updated our CONTRIBUTING.md
file with a detailed guide on navigating the HyperIndex codebase, as well as examples of what a change would look like. To make it even easier, we added .cursor
rules to help develop new HyperIndex features.
Embrace Vibe-Coding
All new projects are now created with an initial .cursor
rules included to help you build indexers with the agent support.
Also, feel free to create PRs with the rules suggestions to improve the experience for everyone 😉
By @DenhamPreen in #663, #671
Fixes & Improvements
- Started including an address in a handler error log by @DZakh in #658
- Support nullable effect cache output by @DZakh in #665
- Fix e2e tests by @DZakh in #666
- Error when contract start block is earlier than the network's by @DZakh in #670
New Contributors
Full Changelog: v2.26.0...v2.27.0
v2.26.0
🆕 Built-in Cache for Effect Calls
import { experimental_createEffect, S } from "envio";
export const getMetadata = experimental_createEffect(
{
name: "getMetadata",
input: S.string,
output: {
description: S.string,
value: S.bigint,
},
cache: true, // Simply set cache to true
},
async ({ input, context }) => {}
})
Read more in the docs, learn how to persist the cache on reruns, and share it with Hosted Service (alpha).
🧹 Other changes
- Now it's possible to disable Hasura integration via
ENVIO_HASURA=false
environment variable. - Started using Postgres 17 for local development
- Added
ENVIO_INDEXER_PORT
env var (Instead of deprecatedMETRICS_PORT
) - Added
ENVIO_PG_PASSWORD
env var (Instead of deprecatedENVIO_POSTGRES_PASSWORD
) - Removed uninformative text from TUI and included the GraphQL endpoint instead.
- Fixed indexers with non-public schema
Full Changelog: v2.25.3...v2.26.0
v2.26.0-rc.2
Full Changelog: v2.26.0-rc.1...v2.26.0-rc.2
v2.26.0-rc.1
What's Changed
Full Changelog: v2.26.0-alpha.8...v2.26.0-rc.1
v2.26.0-alpha.9
What's Changed
Full Changelog: v2.25.2...v2.26.0-alpha.9
v2.26.0-alpha.8
Full Changelog: v2.26.0-alpha.7...v2.26.0-alpha.8
v2.26.0-alpha.7
Full Changelog: v2.26.0-alpha.6...v2.26.0-alpha.7
v2.26.0-alpha.6
Full Changelog: v2.26.0-alpha.5...v2.26.0-alpha.6
v2.26.0-alpha.5
Full Changelog: v2.26.0-alpha.4...v2.26.0-alpha.5
v2.26.0-alpha.4
Full Changelog: v2.26.0-alpha.3...v2.26.0-alpha.4