Skip to content

azero-id/domain-giveaway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AZERO.ID – Domain Giveaway Contract

License: GPL v3 Built with ink!

This repository contains the smart contracts for AZERO.ID domain giveaways.

Find our full documentation here: https://docs.azero.id/.

Development

# 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

Scripts

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

Contract Deployment

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

Supabase Functions

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published