Please check the documentation website for a complete guide on all Envio indexer features.
This indexer is still a work in progress. Do not use it in production. It is meant only as a reference.
This indexer is built to index events emitted from contracts related to Polymarket. It is created by taking reference from the Polymarket Subgraph repo.
pnpm devOpen http://localhost:8080 to access the GraphQL Playground. The local password is testing.
pnpm codegen- Wallet Subgraph
- Sports Oracle Subgraph
- Order Book Subgraph
- OI Subgraph
- FPMM Subgraph
- Activity Subgraph
- Fee Module Subgraph
- PNL Subgraph
- Migrate all subgraphs
- Validate data against the Polymarket indexer (work in progress)
- Effects for fetching details about Collateral Token
- Remove hardcoded return value from
getCollateralScalein FPMM handler - Debug
TradeTypeimport inupdatedFields.ts -
getPositionIdimplementation (file:ConditionalTokens.ts) - understand the use of GlobalUSDCBalance entity used in polymarket subgraph (
USDC.ts) - Write tests for utility functions like
getPositionIdorcomputeProxyWalletAddress - Make sure all error message are descriptive
- In PNL subgraph,
ConditionalTokens.ConditionPreparationhandler look if you can make a relation betweenCondition&Positionentity. Note: this might be tricky becauseCondition.positionIdsisbigint[]& ids inPositionentity is instring.
This indexer is a work in progress, and some parts of the logic are still being migrated. Data validation has been done for a few subgraphs so far, and we’ll be expanding correctness checks after the main migration is finished.
-
The
polymarket-subgraphrepo tracksConditionalTokensevent multiple times which different event handlers but in our case we have merged all those event handlers into one. -
activity-subgraph/src/FixedProductMarketMakerFactoryMapping.tsfile is not necessary it is copy that is used in the actiivty subgraph so other event handlers can access the FPMM addresses. We are combining all into a single indexer, we already have that handler.
Not all are required but just a list that we can talk about:
- having
bytes32values as0x{string}instead of just string