A decentralized token swap application built on the Aztec blockchain featuring private token swaps and a proof-of-password token faucet.
- Private Token Swaps: Swap between GregoCoin (GRG) and GregoCoinPremium (GRGP) using an Automated Market Maker (AMM)
- Token Faucet: Claim free GregoCoin tokens using a proof-of-password mechanism
- Wallet Integration: Connect with Aztec wallet extensions or use an embedded wallet
- Multi-Flow Onboarding: Seamless onboarding experience that adapts based on user's token balance
Before you begin, ensure you have the following installed:
- Node.js: Version 22 or higher
- Yarn: Version 4.5.2 (via Corepack)
- Aztec CLI: Required for compiling contracts and running local sandbox
yarn installcurl -s https://install.aztec.network | bashThe project uses Aztec version v3.0.0-devnet.2. Set it using:
aztec-up v3.0.0-devnet.2
docker tag aztecprotocol/aztec:3.0.0-devnet.2 aztecprotocol/aztec:latest # Temporary workaround for aztec-nargo issuesIn a separate terminal, start the local Aztec sandbox:
aztec start --sandboxThis will start a local Aztec node on http://localhost:8080.
Note: Keep this terminal running while developing. The local node must be running for contract deployment and local testing.
In your main terminal, compile the smart contracts:
yarn compile:contractsThis will:
- Compile the Noir contracts in the
contracts/directory - Generate TypeScript bindings for contract interaction
- Output compiled artifacts to
contracts/target/
Set a password for the proof-of-password contract and deploy:
PASSWORD=your-secret-password PROVER_ENABLED=false yarn deploy:localImportant: Remember this password! You'll need it to claim tokens through the faucet.
This will:
- Deploy GregoCoin and GregoCoinPremium token contracts
- Deploy the AMM (Automated Market Maker) contract
- Deploy the ProofOfPassword contract
- Generate a
deployed-addresses.jsonfile with contract addresses
yarn serve