Local Event Indexer
The Flow local event indexer is available on github and docker and can be used during development before set up your Graffle projects. It is a trimmed down version of the event indexers on the Projects page within the Graffle management dashboard. https://hub.docker.com/r/graffle/flow-event-processor https://github.com/Graffle/flow-event-processor We recommend using the Docker image and running the local indexer using docker, but you can pull the code from GitHub and debug it in your IDE or run it with docker-compose.
Configuration
FlowNode: MainNet, TestNet, or Emulator. Note: Emulator support is currently limited to running from VS Code.
MaximumBlockScanRange: Block size to scan when catching up after falling behind, should normally be set to 200.
WebhookUrl: Your url which will receive POST requests containing your processed events.
EventId: Flow event Id of the event type you want to process. ex: A.c1e4f4f4c4257510.Market.MomentPurchased
Verbose: Log found events to the console when posting to WebhookUrl.
HMACToken: Base-64 encoded string for HMAC authentication headers.
Docker
TestNet
MainNet
Note: When using the HMAC variable to set a token, this application always adds the following headers to the request. x-graffle-company-id: 00000000-0000-0000-0000-000000000000 x-graffle-project-id: 00000000-0000-0000-0000-000000000000 See "Securing Indexer Webhooks" for information about decoding/validating HMAC auth headers.
Docker-Compose
Create a .env.local file in the root of your repository, next to docker-compose.yml:
Open a terminal window in the root of your repository and run one of the following:
for test net or main net event processing.
Last updated