Catching events from promises
How does the frontend listen for contract events?
When reloading, or after a custom interaction from the user, the application performs queries to The Graph, and retrieves data from active node operators listening and indexing our selected contract events (Learn more).
The subgraph, deployed on The Graph Network, is available for queries on the Hosted Service. It contains:
subgraph.yaml: a manifest that describes the data it's interested in ;schema.graphql: a schema that defines the data entities, and how the queries should be performed ;promise-factory.ts: a mapping that handles the custom actions, by translating the data it receives into understandable entities we defined in theschema.
Manifest
Schema
Mapping
Handling PromiseContractCreated
PromiseContractCreatedHandling ParticipantAdded
ParticipantAddedHandling TwitterAddVerifiedSuccessful
TwitterAddVerifiedSuccessfulResources
Last updated