This repository contains the smart contracts for AZERO.ID domain giveaways.
Find our full documentation here: https://docs.azero.id/.
# Prerequisites (Rust, Cargo, ink! CLI, Substrate Contracts Node)
# See: https://github.com/scio-labs/inkathon#contracts
# Build all contracts
./build-all.sh
# Run all tests
./test-all.sh
All TypeScript files in the ./scripts
can be run with the commands below. Most of the scripts assume, that all contracts are built via ./build-all.sh
.
# Prerequisites (Node, pnpm)
# Install dependencies (once)
pnpm i
# Start local development chain
pnpm node
# Run any script (from `./scripts`)
pnpm run script testReserveDomain
# Run script on other chain
# IMPORTANT: Create a `.{chain}.env` environment file (gitignored) with the `ACCOUNT_URI` you want to use.
# Chains must be a network-id from here: https://github.com/scio-labs/use-inkathon/blob/main/src/chains.ts.
CHAIN=alephzero-testnet pnpm run script testReserveDomain
The deployment of all contracts is handled by ./scripts/deploy.ts
and can be run via pnpm run deploy
.
This is an example of how to build & deploy all contracts into an external directory (e.g. frontend repository):
DIR=../frontend/src/deployments pnpm run build # same as `./build-all.sh`
DIR=../frontend/src/deployments pnpm run deploy # same as `pnpm run script deploy`
# DIR=../frontend/src/deployments CHAIN=alephzero-testnet pnpm run deploy
This repository also contains certain Supabase Edge Functions, necessary for generating Merkle Tree inclusion proofs. They are located in ./supabase
.
# Prerequisites (Deno CLI, Supabase CLI login)
# Generate types
pnpm run supabase:gen-types
# Deploy function
pnpm run supabase:deploy