For a complete guide to all Envio indexer features, visit the documentation website.
With HyperIndex, developers can enable wildcard indexing, allowing them to index events from any contract that matches a given event signature. This is especially useful when working with contracts that follow common standards like ERC20, ERC721, or ERC1155.
You can learn more about wildcard indexing in the documentation: https://docs.envio.dev/docs/HyperIndex/wildcard-indexing
To enable wildcard indexing, simply pass wildcard: true
in the handler configuration:
ERC20.Transfer.handler(
async ({ event, context }) => {
// ...your handler logic
},
{ wildcard: true }
);
Before running the indexer locally, make sure you have the following installed:
Add your Envio API key to the .env file, then start the indexer:
pnpm dev
If you make changes to config.yaml
or schema.graphql
, regenerate the type files:
pnpm codegen
While indexer running, visit the Envio Console(https://envio.dev/console) to open the GraphQL Playground and query your indexed data.