Start from Scaffold-ETH 2
Create a Scaffold-ETH 2 dApp with quests, points and a leaderboard, and a sample quest that checks your contract onchain.
Scaffold-ETH 2 is a starter kit for Ethereum dApps. Domino's extension for it adds wallet sign-in, a Quests tab, a Leaderboard tab and a sample quest, Set a greeting, which pays points once a member calls setGreeting on the example contract.
The app runs on your machine at http://localhost:3000 against real Domino, in your project's Test environment.
Before you start
- Node.js 24, which Domino's SDK and CLI need, and Git.
- A Domino project. Create one in Console with the existing-app path.
- Sepolia ETH for deploying the example contract and calling it.
Create the app
npx create-eth@latest -e GetDomino/scaffold-dominoChoose Hardhat or Foundry. Besides Scaffold-ETH 2's own files, the app has:
| Part | Where |
|---|---|
| Wallet sign-in (Sign-In with Ethereum) | packages/nextjs/app/api/wallet/ |
| Domino's participant API for the browser | packages/nextjs/app/relay/[...path]/route.ts |
| Quests and Leaderboard tabs | packages/nextjs/app/quests/, packages/nextjs/app/leaderboard/ |
| The sample quest, the points ledger and the leaderboard | packages/nextjs/domino/ |
| Domino project settings | packages/nextjs/relay.json |
| A Domino skill for coding agents | .agents/skills/domino/SKILL.md, listed in AGENTS.md |
Sepolia joins the local chain in scaffold.config.ts: Domino reads public chains, not Hardhat's or Anvil's local chain. Scaffold-ETH 2 shows its burner wallet only when every target network is local, so with Sepolia added, connect a wallet such as MetaMask instead.
Connect your Domino project
cd my-dapp-example
yarn domino login
yarn domino whoamiSet organization and project in packages/nextjs/relay.json to the IDs whoami lists. Until you do, yarn domino:deploy refuses and names the file to change.
Create an app login key
- In Console, open Settings → App login keys in Test and create a key with
http://localhost:3000as its origin. - Under Connected apps, choose Allow vouching on the key, give a reason, and confirm. Domino then attaches the wallet each member signs in with, which the quest reads. This needs an organization admin with Publish permission.
- Copy
packages/nextjs/.env.exampletopackages/nextjs/.env.localand fill in the Domino variables:
| Variable | Value |
|---|---|
DOMINO_APP_LOGIN_KEY | The app login key, starting di_ |
DOMINO_APP_ORIGIN | The app's exact address, the one the key names. Leave it empty for http://localhost:3000 under yarn start |
IRON_SESSION_SECRET | 32 or more random characters, such as the output of openssl rand -base64 32. Required in production |
Deploy the contract and publish the quest
yarn generate
yarn deploy --network sepolia
yarn domino:deployFund the deployer account yarn generate creates with Sepolia ETH before deploying. yarn deploy records YourContract's Sepolia address in packages/nextjs/contracts/deployedContracts.ts, and Set a greeting reads it from there. yarn domino:deploy then publishes the quest, the Points ledger and its leaderboard to Test.
Deploy the contract first: until YourContract is on Sepolia, the quest names an address with no contract, and Domino refuses to publish it.
Complete the quest
- Run
yarn startand openhttp://localhost:3000/quests. - Connect your wallet and choose Sign in with Ethereum.
- Switch the app to Sepolia, open Debug Contracts, and call
setGreetingon YourContract. - Back on Quests, press Check on Set a greeting.
Domino counts a transaction once its block is finalized, about 13 minutes on Sepolia, so the first check may ask you to try again later. Once it passes, 100 points show on Quests and on Leaderboard.
Add your own quests
Add quest files under packages/nextjs/domino/quests/ and publish them with yarn domino:deploy. The app's agent skill, .agents/skills/domino/SKILL.md, tells coding agents where everything is and what Domino reads; yarn domino agents install adds Domino's full guide for them.