Skip to content

Latest commit

 

History

History
 
 

app

Axiom Next.js Quickstart

This Axiom Next.js 14 Quickstart provides a barebones framework through which you build full stack dApps on top of Axiom. The Axiom circuit and build files are inside the axiom/ folder and src/ contains a Next.js template.

Setup

  1. Copy .env.local.example as a new file named .env.local
  2. Fill in the values in .env.local with your own values a. NEXT_PUBLIC_ALCHEMY_KEY is your Alchemy API key; you'll need to sign up for an Alchemy account
  3. Run npm install (or yarn/pnpm) to install dependencies
  4. Run npm run dev to start the local development server

Updating Circuit

If you make any changes to your circuit (./axiom/average.circuit.ts), run npm run build:circuit to re-compile your circuit.

Updating Callback Contract

To use your own callback contract, change the CALLBACK_CONTRACT address in ./src/shared/constants.ts, add your ABI to ./src/lib/abi/, and update the ABI import in ./src/app/prove/page.tsx.