https://github.com/BuiltByMom/ajna-subgraph

Ajna Subgraph

This guide is only for deploying Subgraph on SaaS services, like Goldsky or Alchemy Subgraph

  1. Clone the repo https://github.com/BuiltByMom/ajna-subgraph and setup by README instruction

  2. Add the new chain to https://github.com/BuiltByMom/ajna-subgraph/blob/develop/networks.json file

    1. Chain name should correspond with name on Subgraph server (goldsky, alchemy, etc)
    2. These contracts should have valid deployed addresses and startBlock where they were deployed (or earlier one) on a new chain: ERC20PoolFactory, ERC721PoolFactory, PositionManager, AjnaToken.
    3. GrantFund and BurnWrappedAjna are needed only for mainnet, so zero address and any valid chain startBlock should work
  3. Add PoolInfoUtils, PoolInfoUtilsMulticall and PositionManager addresses to https://github.com/BuiltByMom/ajna-subgraph/blob/develop/src/utils/constants.ts file with a new chain name (same chain name as in networks.json file)

  4. Run yarn build --network $NEW_CHAIN_NAME

  5. Deploy it with command for your service and fetch graphql url

    1. Use following versioning naming for consistency

    ajna-${NEW_CHAIN_NAME}/v0.1.4-rc10

    where rc10 is contracts version (shouldn’t change unless redeployed)

    and v0.1.4 is SemVer

  6. Create a PR with a new chain to the repo