TL;DR: Scaffold ETH + The Graph’s Token API lets you quickly build dApps with real-time token balances, transfers, and supply data. Clone the starter repo, run a few commands, and you're up and running—no backend needed.
Looking to quickly integrate The Graph’s Token API into your dApp? You’re in luck!
Scaffold ETH makes that faster and easier than ever. But first, if you missed the announcement, The Graph recently launched a new Token API that makes it easier than ever for developers to query token balances, transfers, and metadata across chains. It’s fast, AI ready, and built on The Graph’s innovative infrastructure. So whether you’re a solo hacker, a hackathon participant, or building production-grade apps, this guide walks you through how to do it all using the Scaffold ETH SDK.
What is Scaffold ETH?
Scaffold ETH is a rapid prototyping toolkit for Ethereum developers, originally built by Austin Griffith, founder of BuidlGuidl.
BuidlGuidl is a community of Ethereum developers focused on building real-world, on-chain applications using Scaffold-ETH. It supports early-stage builders with mentorship, funding, and infrastructure to turn prototypes into live, usable dapps.
What does BuidlGuidl give you?:
- Pre-configured local Ethereum development environment
- Smart contract + frontend boilerplate
- Live reload for both Solidity and React
- Easy wallet integration
It’s a one-stop shop to quickly spin up full-stack dApps and ideal for learning, hacking, and launching.
Why Use Scaffold ETH for The Graph’s Token API?
The Graph’s Token API allows you to query real-time token balances, transfers, and supply data across chains using Substreams-powered infrastructure. (New to Substreams? Here’s a quick primer to get you up to speed.)
Scaffold ETH offers the fastest path to integrate with the Token API thanks to:
- Ready-made boilerplates
- Ethers.js and GraphQL support
- Frontend components for token display
- Fullstack demo apps from the community
This means you can skip most of the setup pain and focus on customizing your logic.
Step-by-Step: Integrating The Graph’s Token API
Step 1: Clone the Scaffold ETH + Token API Starter
Use this prebuilt repo created by Kevin Jones of Edge & Node:
git clone https://github.com/graphprotocol/examples.git
cd examples/agent/the-graph-agent-scaffold-eth
yarn install
Step 2: Run the Local Dev Environment
Make sure you have Node.js and Hardhat installed.
Then run:
bash
CopyEdit
yarn chain
In another terminal tab:
bash
CopyEdit
yarn deploy
And finally:
bash
CopyEdit
yarn start
You’ll now have a local app running with a deployed contract and frontend ready.
Step 3: Understand the Token API Integration
Inside this scaffold, you’ll find prewritten GraphQL queries using The Graph’s Token API.
These queries let you:
- Get current token balances for any wallet
- Track token transfers
- Show total supply data
These are pulled into React components using simple hooks. No backend setup required.
Step 4: Customize the Queries
Open the frontend code, navigate to the hooks or components folder and tweak the GraphQL query like so:
query GetBalances($wallet: String!) {
account(id: $wallet) {
balances {
token {
symbol
name
}
value
}
}
}
Then pass your wallet address and get real-time balances!
Want to See It in Action?
Check out these awesome walkthroughs:
🔴 Live Demo w/ Kevin – Lu.ma Token API Thursdays
🎥 Video Recap by Marcus – Twitter
📚 Resources
🔗 Scaffold ETH + Token API Starter Repo
Final Thoughts
Scaffold ETH + Token API is the perfect combo to quickly bootstrap your dApp with real-time token data. You get the reliability of The Graph’s Substreams under the hood with the rapid prototyping of Scaffold ETH.
Want to build token dashboards? Whale watchers? Multi-chain token explorers? This is your launchpad.
5 Questions this article covers:
✅ What is Scaffold ETH and why is it useful for dApp development?
✅ What is The Graph’s Token API and what kind of token data does it provide?
✅ How do you set up a local Scaffold ETH project with Token API integration?
✅ How can you use GraphQL to query token balances, transfers, and supply?
✅ Why is Scaffold ETH a good choice for quickly prototyping token dashboards and explorers?
No Comments