Axiom V2 Docs Old
  • Introduction
    • What is Axiom?
    • Quickstart
  • Examples
    • Autonomous Airdrop
      • AxiomREPL Code
      • Contract
      • Web App
      • DataQuery-only Version
  • Developers
    • Axiom for Developers
    • Specifying a Query into Axiom
    • AxiomREPL
      • AxiomREPL Examples
    • Exporting a Client Side Prover
    • Handling Axiom Callbacks
    • Common Issues
      • Callback Debugging
  • SDK and REPL Reference
    • Axiom SDK Reference
      • QueryBuilderV2
      • Data Subqueries
        • Header Subquery
        • Account Subquery
        • Storage Subquery
        • Transaction Subquery
        • Receipt Subquery
        • Solidity Nested Mapping Subquery
    • AxiomREPL Reference
      • Circuit Types
      • Circuit Functions
      • Data Functions
      • Compute Functions
  • Protocol Design
    • Architecture Overview
    • Caching Block Hashes
    • Axiom Query Protocol
      • Axiom Query Format
    • ZK Circuits for Axiom Queries
    • Ethereum On-chain Data
    • Guardrails
  • Transparency and Security
    • KZG Trusted Setup
    • Contract Addresses
    • On-chain ZK Verifiers
    • Security
  • Zero Knowledge Proofs
    • Introduction to ZK
    • ZK Examples
    • Getting Started with halo2
    • halo2-repl
  • Additional Resources
    • Axiom V2 Explorer
    • Github
    • Website
    • Telegram
    • Discord
    • Axiom V1 Docs
Powered by GitBook
On this page
  • Introduction
  • System Diagram
  • Integrating your own circuit
  1. Examples
  2. Autonomous Airdrop

Web App

Next.js 13 dApp using the app router

PreviousContractNextDataQuery-only Version

Last updated 1 year ago

Introduction

If you would like to run this specific example on your own, you'll to use Alchemy, since we use one of their special JSON-RPC calls, . Please also ensure that you copy and rename env.local.example to .env.local and fill in the private data.

Example deployment of the app here:

System Diagram

Here's a review of the overall system in order to re-acquaint yourself with how the app is architected.

Integrating your own circuit

After writing your own circuit in AxiomREPL, you can click Export > Export Typescript circuit. Once you get the circuit.ts file, you'll override /webapp/src/lib/circuit.ts.

You can also import the React context and component by using your favorite package manager (npm/yarn/pnpm):

npm install @axiom-crypto/react

See the page for more details on the integration.

Circuit Export
alchemy_getAssetTransfers
https://autonomous-airdrop-example.vercel.app
Flow diagram for the full Autonomous Airdrop system