A Graph Protocol subgraph for indexing DTF portfolios, governance systems, and vote-locked tokens across multiple blockchain networks.
The DTF Index Subgraph tracks and indexes:
- DTF portfolio deployments and configurations
- Portfolio rebalancing events and auction mechanisms
- Governance proposals, voting, and timelock operations
- Vote-locked token (stDAO) delegation and unlocking
- ERC20 token transfers and holder analytics
- Ethereum Mainnet (
mainnet) - Base (
base) - Binance Smart Chain (
bsc)
This subgraph uses a Mustache-based template system to generate network-specific configurations:
- Template File:
subgraph.yaml.mustachecontains the base configuration with placeholders - Network Configuration:
networks.jsonstores deployment addresses and block numbers for each network - Parser Script:
scripts/parse-template.jsgenerates the finalsubgraph.yaml
The template parsing process:
- Takes a network argument (e.g., "mainnet", "base", "bsc")
- Loads network-specific addresses and block numbers from
networks.json - Handles multiple protocol versions (1.0.0, 2.0.0, 4.0.0) with different deployer contracts
- Generates
subgraph.yamlwith all network-specific values filled in
# Generate configuration for Ethereum Mainnet
npm run parse:mainnet
# Generate configuration for Base
npm run parse:base
# Generate configuration for BSC
npm run parse:bsc
# Then build the subgraph
npm run codegen
npm run buildThis subgraph is deployed using Goldsky infrastructure. Multiple deployment options are available:
Before deploying, you need to install and configure the Goldsky CLI:
For macOS/Linux:
curl https://goldsky.com | shFor Windows:
npm install -g @goldskycom/cliAfter installation, login with your CLI token:
goldsky loginYou'll be prompted to enter your CLI token key. This is required for deployment access.
# Deploy to Ethereum Mainnet
npm run deploy:mainnet
# Deploy to Base
npm run deploy:base
# Deploy to BSC
npm run deploy:bsc
# Deploy with custom version
npm run deploy:mainnet -- --version 1.8.4# Interactive mode - prompts for network and version
npm run deploy# Deploy to all networks with current version
npm run deploy:all
# Deploy to all networks with custom version
npm run deploy:all -- --version 1.8.4The deployment process automatically:
- Generates network-specific configuration using the template system
- Deploys to Goldsky with the format:
dtf-index-<network>/<version>
- DTF: Represents an index DTF with configuration, fees, and governance settings
- Rebalance/Auction: Tracks index rebalancing events and auction bids
- Token: ERC20 tokens with transfer history and holder analytics
- Governance: Proposals, votes, delegates, and timelock operations
- VoteLockedToken: stDAO tokens with delegation and vote-locking mechanisms
The subgraph supports multiple protocol versions:
- Version 1.0.0: Initial protocol deployment
- Version 2.0.0: Enhanced features and updated contracts
- Version 4.0.0: Latest version with advanced functionality
Each version has its own deployer contracts (FolioDeployer and GovernanceDeployer) at different addresses across networks.