Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use subgraph for queries #28

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

feat: use subgraph for queries #28

wants to merge 5 commits into from

Commits on Aug 10, 2022

  1. init subgraph

    following along with https://thegraph.com/docs/en/developing/creating-a-subgraph/
    
    ran `graph init`
    
    options selected:
    
    ✔ Protocol · near
    ✔ Subgraph name · TENK-DAO/v2.tenk.testnet
    ✔ Directory to create the subgraph in · subgraph
    ✔ NEAR network · near-testnet
    ✔ Contract account · v2.tenk.testnet
    ✔ Contract Name · Contract
    ———
      Generate subgraph
      Write subgraph to directory
    ✔ Create subgraph scaffold
    ✔ Initialize networks config
    ✔ Initialize subgraph repository
    ✔ Install dependencies with yarn
    ✔ Generate ABI and schema types with yarn codegen
    ✔ Add another contract? (y/N) · false
    chadoh committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    b2dd6af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a938492 View commit details
    Browse the repository at this point in the history
  3. make it build

    chadoh committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    c912729 View commit details
    Browse the repository at this point in the history
  4. deploy to hosted-service

    chadoh committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    6b806e5 View commit details
    Browse the repository at this point in the history
  5. remove startBlock

    Even though `v2.tenk.testnet` was deployed in block `86896681`, adding
    this as a `startBlock` in `subgraph.yaml` causes this error when trying
    to deploy:
    
        ✖ Failed to deploy to Graph node https://api.thegraph.com/deploy/:
          subgraph validation error:
          [the specified block must exist on the Ethereum network]
        error Command failed with exit code 1.
    
    This seems to be a bug with TheGraph; I've asked about it in their
    Discord
    chadoh committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    aaf2c60 View commit details
    Browse the repository at this point in the history