This is the subgraph for Poa (Perpetual Organization Architect), a no-code DAO builder for community-owned organizations. The subgraph indexes relevant events and data from the Poa smart contracts to make it easily queryable via The Graph.
Make sure you have the following installed before proceeding:
- Node.js (version 14.x or later)
- Yarn
- The Graph CLI (
npm install -g @graphprotocol/graph-cli) - Matchstick (for unit testing)
- PostgreSQL (for local Graph Node setup)
After cloning the repository, install the required dependencies by running:
yarn install- Ensure that
graph-cliis installed and your environment is set up correctly. - Run the following command to execute the Matchstick tests:
graph testThis will run all tests located in the tests/ folder and output the results. Matchstick allows you to simulate contract events and validate the behavior of the mappings.
Before deploying or testing the subgraph, generate the types from your schema:
graph codegenThis command generates TypeScript types from your GraphQL schema and contract ABIs.
After generating the types, build the subgraph using:
graph buildThis will compile the AssemblyScript mappings and prepare the subgraph for deployment.