This repository contains the smart contracts for Aza Ventures, including:
- AzaMembershipNFT: Exclusive membership NFTs for Aza Ventures community members
- AzaToken: Primary Utility Token ($AZA) for Aza Ventures Web3 VC Investing Lab
- AzaGlobalService: Core service contract for staking, funds management, and OTC trading
The contracts are designed to work together as part of the Aza Ventures ecosystem:
-
AzaMembershipNFT: ERC721 token that represents membership in the Aza Ventures community. Includes voting capabilities and role-based access control.
-
AzaToken: ERC20 token with a total supply of 2.1 billion tokens. Includes burning, permit functionality, and voting capabilities.
-
AzaGlobalService: Central service contract that integrates with both the NFT and token contracts to provide staking, fund management, and OTC trading functionality.
- Install dependencies:
npm install- Create a
.envfile in the root directory with the following variables:
# Network RPC URLs
ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
GOERLI_RPC_URL=https://goerli.infura.io/v3/YOUR_INFURA_KEY
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_KEY
POLYGON_RPC_URL=https://polygon-mainnet.infura.io/v3/YOUR_INFURA_KEY
MUMBAI_RPC_URL=https://polygon-mumbai.infura.io/v3/YOUR_INFURA_KEY
ARBITRUM_RPC_URL=https://arbitrum-mainnet.infura.io/v3/YOUR_INFURA_KEY
OPTIMISM_RPC_URL=https://optimism-mainnet.infura.io/v3/YOUR_INFURA_KEY
BSC_RPC_URL=https://bsc-dataseed.binance.org
BSC_TESTNET_RPC_URL=https://data-seed-prebsc-1-s1.binance.org:8545
AVALANCHE_RPC_URL=https://api.avax.network/ext/bc/C/rpc
FUJI_RPC_URL=https://api.avax-test.network/ext/bc/C/rpc
BASE_RPC_URL=https://mainnet.base.org
BASE_GOERLI_RPC_URL=https://goerli.base.org
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
# Private Keys
DEPLOYER_PRIVATE_KEY=your_private_key_here
# Contract Parameters
DEFAULT_ADMIN_ADDRESS=0xYourDefaultAdminAddress
MINTER_ADDRESS=0xYourMinterAddress
TREASURY_ADDRESS=0xYourTreasuryAddress
# Etherscan API Keys for verification
ETHERSCAN_API_KEY=your_etherscan_api_key
POLYGONSCAN_API_KEY=your_polygonscan_api_key
BSCSCAN_API_KEY=your_bscscan_api_key
ARBISCAN_API_KEY=your_arbiscan_api_key
OPTIMISM_API_KEY=your_optimism_api_key
SNOWTRACE_API_KEY=your_snowtrace_api_key
BASESCAN_API_KEY=your_basescan_api_key
# Gas settings
GAS_PRICE=auto
GAS_MULTIPLIER=1.2
To deploy all contracts to a specific network in the correct order (NFT → Token → GlobalService):
npx hardhat run scripts/deploy.ts --network <network-name>This script will:
- Deploy the AzaMembershipNFT contract
- Deploy the AzaToken contract
- Deploy the AzaGlobalService contract with references to the other contracts
- Save deployment information to a JSON file in the
deployments/<network>directory
For more granular control, you can deploy contracts individually:
# Deploy AzaMembershipNFT
npx hardhat run scripts/deploy-individual.ts --network <network-name> azamembershipnft
# Deploy AzaToken
npx hardhat run scripts/deploy-individual.ts --network <network-name> azatoken
# Deploy AzaGlobalService (requires existing token and NFT addresses)
npx hardhat run scripts/deploy-individual.ts --network <network-name> azaglobalservice <token-address> <nft-address>For convenience, a dedicated script is provided for deploying to Base Sepolia:
# Using npm script
npm run deploy:base-sepolia
# Or directly with hardhat
npx hardhat run scripts/deploy-base-sepolia.ts --network baseSepoliaThe deployment scripts support the following networks:
ethereum- Ethereum Mainnetpolygon- Polygon Mainnetbsc- Binance Smart Chainarbitrum- Arbitrum Oneoptimism- Optimismavalanche- Avalanche C-Chainbase- Base
goerli- Ethereum Goerli Testnetsepolia- Ethereum Sepolia Testnetmumbai- Polygon Mumbai TestnetbscTestnet- BSC Testnetfuji- Avalanche Fuji TestnetbaseGoerli- Base Goerli TestnetbaseSepolia- Base Sepolia Testnet
hardhat- Hardhat Networklocalhost- Local Node
After deployment, you can verify the contracts on the blockchain explorer:
npx hardhat run scripts/verify.ts --network <network-name>The verification script will:
- Find the latest deployment information in the
deployments/<network>directory - Verify each contract with the correct constructor arguments
- Log the verification status for each contract
For convenience, a dedicated script is provided for verifying contracts on Base Sepolia:
# Using npm script
npm run verify:base-sepolia
# Or directly with hardhat
npx hardhat run scripts/verify-base-sepolia.ts --network baseSepoliaThe project includes comprehensive test suites for all contracts. The tests are organized into separate files for each contract, plus integration tests that verify the interactions between contracts.
- AzaMembershipNFT.test.ts: Tests for the NFT contract functionality
- AzaToken.test.ts: Tests for the token contract functionality
- AzaGlobalService.test.ts: Tests for the service contract functionality
- Integration.test.ts: End-to-end tests for the entire ecosystem
Run the complete test suite:
npm testRun tests with gas reporting:
REPORT_GAS=true npm testRun tests with coverage:
npx hardhat coverageThe tests cover all major functionality of the contracts, including:
- Contract deployment and initialization
- Role-based access control
- Token minting, transfers, and burning
- NFT minting and management
- Staking functionality
- Fund creation and contributions
- Deal allocations and OTC trading
- Token distribution
- Governance features (voting and delegation)
-
Setup Environment:
- Configure your
.envfile with the appropriate values - Ensure you have sufficient funds in your deployer account
- Configure your
-
Deploy Contracts:
- Run the deployment script for your target network
- Wait for all transactions to be confirmed
-
Verify Contracts:
- Run the verification script for your target network
- Check that all contracts are verified successfully
-
Post-Deployment:
- The deployment information is saved in the
deployments/<network>directory - Use this information for frontend integration or further contract interactions
- The deployment information is saved in the
MIT