Skip to content

Releases: enviodev/hyperindex

v2.16.1

07 Apr 15:07
8c5520e
Compare
Choose a tag to compare

What's Changed

  • Use fallback sources for HyperSync logs query errors by @DZakh in #502

Full Changelog: v2.16.0...v2.16.1

v2.16.0

02 Apr 09:05
f3409fb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.15.0...v2.16.0

v2.15.0

27 Mar 08:41
5c79de9
Compare
Choose a tag to compare

What's Changed

Topic Filtering goes Multichain ⛓️

Now the eventFilters option can also accept a callback, allowing for building different filters depending on chainId:

import { ERC20 } from "generated";

const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";

const WHITELISTED_ADDRESSES = {
  1: [
    "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
    "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
  ],
  100: ["0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"],
};

ERC20.Transfer.handler(
  async ({ event, context }) => {
    //... your handler logic
  },
  {
    wildcard: true,
    eventFilters: ({ chainId }) => [
      { from: ZERO_ADDRESS, to: WHITELISTED_ADDRESSES[chainId] },
      { from: WHITELISTED_ADDRESSES[chainId], to: ZERO_ADDRESS },
    ],
  }
);

By @DZakh in #485

Stricter chainId type 🔐

The chainId type on event is now a union of chain ids the event belongs to. This is much safer than a number type used before.

By @DZakh in #485

Polishing 🧹

Full Changelog: v2.14.3...v2.15.0

v2.14.3

20 Mar 16:54
2657811
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.14.2...v2.14.3

v2.14.2

20 Mar 12:35
770833a
Compare
Choose a tag to compare

What's Changed

  • Improved README for generated indexers by @DenhamPreen in #475
  • Log as trace instead of warn on the first HyperSync query retry by @DZakh in #482
  • Fix edge case for processing batch creation in unordered multichain mode by @DZakh in #483
  • Sync chain list by @DZakh in #486

Full Changelog: v2.14.1...v2.14.2

v2.14.1

14 Mar 08:06
90f866e
Compare
Choose a tag to compare

What's Changed

  • Fix casting chain_metadata db types as nullable rather than optional. (Fixes edge-case crash when null is passed to a function expecting undefined | number) by @JonoPrest in #474

Full Changelog: v2.14.0...v2.14.1

v2.14.0

12 Mar 16:19
a387548
Compare
Choose a tag to compare

What's Changed

Enhanced Reliability with RPC Data Sources

You can now specify RPC providers for redundancy and failover, ensuring 100% uptime for your indexer. If HyperSync becomes unavailable, your indexer will automatically switch to an RPC provider.

To enable this, add an rpc field to your network configuration. It can be a URL or a list of RPC configuration objects:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c

🧠 The fallback RPC is triggered if the primary data source does not receive a new block within 20 seconds.

New RPC Configuration Syntax

Adding an RPC provider is now as simple as setting a single URL:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c
  • If HyperSync is available for a chain, it remains the primary data source, with RPC as a fallback.
  • For chains without HyperSync support, RPC becomes the primary data source.

Advanced Configuration

Gain more control over your RPC setup by specifying it explicitly as a primary source:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc:
+     url: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
+     for: sync
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c

Or define multiple RPC endpoints with custom settings:

networks:
  - id: 137 # Polygon
    start_block: 0
+   rpc:
+     - url: https://eth-mainnet.your-rpc-provider.com?API_KEY={ENVIO_MAINNET_API_KEY}
+       for: fallback
+     - url: https://eth-mainnet.your-free-rpc-provider.com
+       for: fallback
+       initial_block_interval: 1000
    contracts:
      - name: PolygonGreeter
        address: 0x9D02A17dE4E68545d3a58D3a20BbBE0399E05c9c

By @DZakh in #437 and #467.

Bug Fixes

  • Improved historical sync performance by fixing a critical issue related to reorg detection mode. #470 (@DZakh)
  • Fixed raw events that had empty parameters. #460 (@DZakh)
  • Fixed Docker Compose file for self-hosting, ensuring Hasura connects correctly to Postgres when using a custom user or database. #459 (@JasoonS)
  • Added support for nested ABIs in contract imports. #472 (@diyahir, @DZakh)

Other Changes

New Contributors

Full Changelog: v2.13.0...v2.14.0

v2.13.0

20 Feb 11:46
32d71fe
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.12.4...v2.13.0

v2.12.4

05 Feb 14:55
41839ab
Compare
Choose a tag to compare

What's Changed

  • Initialize indexer with the Unordered Multichain Mode on by default by @DenhamPreen in #292
  • Improve Reorg detection logic and fix rollback edge case bugs by @DZakh in #447, #450
  • Improve logging on Reorg and Rollback by @DZakh in #449
  • Fix invalid indexer state on restart after pre-registration by @JonoPrest in #451
  • Chore code changes by @DZakh in #448, #453

Full Changelog: v2.12.3...v2.12.4

v2.12.3

31 Jan 09:38
a63cbde
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.12.2...v2.12.3