fetchai / ledger-subquery

This is the Fetch Ledger SubQuery project, an indexer for the Fetch network.
MIT License
2 stars 10 forks source link

LegacyBridgeSwap filter: contract address #60

Closed bryanchriswhite closed 2 years ago

bryanchriswhite commented 2 years ago

Background

  1. The LegacyBridgeSwap handler element in the project.yaml dataSources currently filters by a contract address. My understanding is that this address has historically been useful as it is deterministic with respect to some parameters which I can't recall at the moment.
  2. Recent experimentation with the local subquery environment has proven this not to hold for this environment.
  3. We assume it is faster to allow subquery to filter at this level rather than to call our handler for all contract executions and returning early in case of no match.

Acceptance criteria

The legacy bridge contract address can be overridden with an environment variable (e.g. LEGACY_BRIDGE_CONTRACT_ADDRESS).

Proposal

I think this could be integrated into the existing node-entrypoint.sh which already replaces other values in the project.yaml (via yq) based on environment variables.

bryanchriswhite commented 2 years ago

My local legacy bridge contract address: fetch14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9szlkpka

bryanchriswhite commented 2 years ago

Fixed in #63