Subgraphs

Subgraphs

subgraphs

contracts-subgraphs

Schema

Our subgraph schema is composed of the following entities:

  • DAOs
  • Proposals
  • Votes
  • Members
  • Rage Quits
  • Shamans
  • Records
  • Vaults
  • Event Transactions

Explorers and API Endpoints*

* Production URLs require an api-key in the path. Get your Graph API key at their website (opens in a new tab)

* Dev Urls are rate limited and not appropriate for production apps

Mainnet

Sepolia

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3k93SNY5Y1r4YYWEuPY9mpCm2wnGoYDKRtk82QZJ3Kvw
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-v3-sepolia-2/version/latest

Gnosis Chain

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/6x9FK3iuhVFaH9sZ39m8bKB5eckax8sjxooBPNKWWK8r
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-v3-gnosis/version/latest

Polygon

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/A4su27JYXR5TkPZmiFHzzqMJnmYttfU3FyrdNBDnnu8T
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-v3-polygon/version/latest

Arbitrum

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/GPACxuMWrrPSEJpFqupnePJNMfuArpFabrXLnWvXU2bp
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-v3-arbitrum/version/latest

Optimism

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/CgH5vtz9CJPdcSmD3XEh8fCVDjQjnRwrSawg71T1ySXW
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-v3-optimism/version/latest

Base

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/7yh4eHJ4qpHEiLPAk9BXhL5YgYrTrRE6gWy8x4oHyAqW
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-v3-base/version/latest

Example Queries

DAO

Get a specific DAO with it's profile record

{
  dao(id: "0x0daoaddress") {
    id
    createdAt
    profile: records(
      first: 1
      orderBy: createdAt
      orderDirection: desc
      where: { table: "daoProfile" }
    ) {
      createdAt
      createdBy
      contentType
      content
    }
  }
}

Get a list of DAOs

{
  daos(first: 5, orderBy: createdAt, orderDirection: desc) {
    id
    createdAt
  }
}

Members

Get a list of members for a DAO

{
  members(where: { dao: "0x0daoaddress" }) {
    id
    createdAt
  }
}

Proposals

Get a list of proposals with it's votes for a DAO

{
  proposals(where: { dao: "0x0daoaddress" }) {
    id
    yesVotes
    noVotes
    yesBalance
    noBalance
    createdAt
    votes {
      id
      balance
    }
  }
}

Looking for DAOhaus v2 subgraph endpoints?

Mainnet

Gnosis Chain

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/2GJY9uxsLQUCvgqSfy6QCLAJgM9P9kdxBUpwNcGs7nPR
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-xdai/version/latest

Polygon

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/AkzZk4BsvfNRkRDtzz7Bc8TgktTJN4uv9tgfCehhE6fB
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-matic/version/latest

Arbitrum

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/2c41cggebRCMzFiDqoqDwShZtz4xYucsFKbQnEiXUTzY
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-arbitrum/version/latest

Optimism

  • Explorer (opens in a new tab)
  • API: https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/E3sX66aoo1nCweKBENUPWWv3G3aBcoveMVCoDPGh3zCg
  • Dev API: https://api.studio.thegraph.com/query/73494/daohaus-optimism/version/latest