Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‘ Aerograph – Subgraph for The Graph Protocol

Aerograph is a subgraph built for indexing and querying data from a specific smart contract or protocol using The Graph. It provides a GraphQL API to fetch structured, real-time data efficiently.


🧠 What is The Graph?

The Graph is a decentralized protocol for indexing and querying blockchain data using GraphQL. Subgraphs define how data is ingested, stored, and served from Ethereum and other networks.


πŸ› οΈ Project Structure

aerograph/
β”œβ”€β”€ abis/              # Contract ABIs
β”œβ”€β”€ build/             # Build output (generated by Graph CLI)
β”œβ”€β”€ generated/         # Auto-generated Graph code
β”œβ”€β”€ node_modules/      # Node.js dependencies
β”œβ”€β”€ src/               # Mapping logic in TypeScript
β”œβ”€β”€ tests/             # Unit tests for mappings
β”œβ”€β”€ networks.json      # Network and contract config
β”œβ”€β”€ package.json       # NPM dependencies and scripts
β”œβ”€β”€ schema.graphql     # GraphQL schema definition
β”œβ”€β”€ subgraph.yaml      # Subgraph manifest
β”œβ”€β”€ tsconfig.json      # TypeScript configuration
└── yarn.lock          # Yarn lock file

πŸš€ Getting Started

1. Install Dependencies

yarn install

2. Code Generation

Generates types from the GraphQL schema and ABIs:

yarn codegen

3. Build the Subgraph

yarn build

4. Deploy to The Graph Hosted Service

Update subgraph.yaml with your contract address and start block, then:

graph auth --product hosted-service <YOUR_DEPLOY_KEY>
graph deploy --product hosted-service <GITHUB_USERNAME>/<SUBGRAPH_NAME>

πŸ” You can get a deploy key from https://thegraph.com/hosted-service/dashboard


πŸ“„ Files Explained

File Description
subgraph.yaml Manifest file defining data sources, schema, and mappings
schema.graphql GraphQL schema for your subgraph
src/ Contains mapping handlers (e.g., handleTransfer, handleMint, etc.)
abis/ Contract ABIs used by the subgraph

πŸ§ͺ Testing

To run mapping logic tests:

yarn test

Maintained: 0xgordian

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages