A web application for staking Aztec Token Positions (ATP) on the Aztec network. This repository contains both the frontend dashboard and the backend indexer.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Browser β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Staking Dashboard (React) β
β staking-dashboard/ β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββ β
β β Wallet β β Staking β β Governance β β
β β Connect β β UI β β Voting β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β RPC Calls β REST API
βΌ βΌ
ββββββββββββββββββββ βββββββββββββββββββββββββββββββ
β Ethereum β β ATP Indexer (Ponder) β
β (Mainnet/ βββββββββββββββββββ atp-indexer/ β
β Sepolia) β Event Sync β βββββββββββ ββββββββββββ β
ββββββββββββββββββββ β β GraphQL β β Postgres β β
β β API β β DB β β
β βββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββ
- Node.js v20+
- Yarn package manager
- Docker (for running the indexer locally)
- Git
# Navigate to frontend
cd staking-dashboard
# Copy environment file
cp .env.example .env
# Edit .env and add your WalletConnect project ID
# Get one at https://cloud.walletconnect.com/
# Install dependencies and start
yarn install
yarn devThe app will be available at http://localhost:5173
# Terminal 1: Start the indexer
cd atp-indexer
cp .env.example .env
# Edit .env with your RPC URL and contract addresses
./bootstrap.sh dev
# Terminal 2: Start the frontend
cd staking-dashboard
cp .env.example .env
# Edit .env - set VITE_API_HOST=http://localhost:42068
yarn install
yarn devContract addresses can be provided via:
- Environment variables (recommended for CI/CD)
CONTRACT_ADDRESSES_FILEenvironment variable pointing to a JSON file- Local
contract_addresses.jsonfile in the project directory
Example contract_addresses.json:
{
"atpFactory": "0x...",
"atpFactoryAuction": "0x...",
"atpRegistry": "0x...",
"atpRegistryAuction": "0x...",
"stakingRegistry": "0x...",
"rollupAddress": "0x...",
"atpWithdrawableAndClaimableStaker": "0x...",
"genesisSequencerSale": "0x...",
"governanceAddress": "0x...",
"gseAddress": "0x...",
"atpFactoryDeploymentBlock": "12345678"
}For production contract addresses, see the Aztec documentation or contact the Aztec team.
staking-dashboard/
βββ .github/workflows/ # CI/CD workflows
βββ staking-dashboard/ # Frontend React application
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ pages/ # Page components
β β βββ contracts/ # Contract ABIs and addresses
β β βββ lib/ # Utilities and helpers
β βββ public/ # Static assets
β βββ terraform/ # Infrastructure as code
β βββ bootstrap.sh # Build and deploy script
βββ atp-indexer/ # Backend Ponder indexer
β βββ src/
β β βββ handlers/ # Event handlers
β β βββ api/ # API routes
β βββ scripts/ # Utility scripts
β βββ terraform/ # Infrastructure as code
β βββ ponder.config.ts # Ponder configuration
β βββ ponder.schema.ts # Database schema
β βββ bootstrap.sh # Build and deploy script
βββ scripts/ # Shared scripts
β βββ logging.sh # Logging utilities
βββ LICENSE
βββ CONTRIBUTING.md
βββ README.md
cd staking-dashboard
# Install dependencies
yarn install
# Start development server
yarn dev
# Type check
yarn tsc --noEmit
# Lint
yarn lint
# Build for production
yarn buildcd atp-indexer
# Install dependencies
yarn install
# Generate provider metadata
yarn bootstrap
# Generate Ponder types
yarn codegen
# Start development server
yarn dev# Frontend with Docker
cd staking-dashboard
./bootstrap.sh docker
# Indexer with Docker (includes PostgreSQL)
cd atp-indexer
docker compose up -dThe staking dashboard supports governance voting for ATP holders. Key features:
- Proposal creation: Requires 258.75M tokens (2.5% of total supply)
- Voting: Vote YES or NO on active proposals
- Delegation: Delegate voting power to other addresses
See the frontend README for detailed governance testing instructions.
Deployments are managed via GitHub Actions:
build.yaml: Runs on PRs to validate buildsdeploy-staking-dashboard.yaml: Deploys frontend to staging/proddeploy-indexer.yaml: Deploys indexer to staging/prod
# Deploy frontend
cd staking-dashboard
./bootstrap.sh deploy-staging # or deploy-prod
# Deploy indexer
cd atp-indexer
./bootstrap.sh deploy-staging # or deploy-prodRequired environment variables for deployment:
AWS_ACCOUNT,AWS_REGIONRPC_URL,CHAIN_ID- Contract addresses (see Configuration section)
WALLETCONNECT_PROJECT_ID
See CONTRIBUTING.md for guidelines on how to contribute to this project.
This project is licensed under the MIT License - see the LICENSE file for details.