Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Repository files navigation

Aza Ventures Blockchain Contracts

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

Contract Architecture

The contracts are designed to work together as part of the Aza Ventures ecosystem:

  1. AzaMembershipNFT: ERC721 token that represents membership in the Aza Ventures community. Includes voting capabilities and role-based access control.

  2. AzaToken: ERC20 token with a total supply of 2.1 billion tokens. Includes burning, permit functionality, and voting capabilities.

  3. AzaGlobalService: Central service contract that integrates with both the NFT and token contracts to provide staking, fund management, and OTC trading functionality.

Setup

  1. Install dependencies:
npm install
  1. Create a .env file 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

Deployment

Deploy All Contracts

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:

  1. Deploy the AzaMembershipNFT contract
  2. Deploy the AzaToken contract
  3. Deploy the AzaGlobalService contract with references to the other contracts
  4. Save deployment information to a JSON file in the deployments/<network> directory

Deploy Individual Contracts

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>

Deploy to Base Sepolia

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 baseSepolia

Supported Networks

The deployment scripts support the following networks:

Mainnets

  • ethereum - Ethereum Mainnet
  • polygon - Polygon Mainnet
  • bsc - Binance Smart Chain
  • arbitrum - Arbitrum One
  • optimism - Optimism
  • avalanche - Avalanche C-Chain
  • base - Base

Testnets

  • goerli - Ethereum Goerli Testnet
  • sepolia - Ethereum Sepolia Testnet
  • mumbai - Polygon Mumbai Testnet
  • bscTestnet - BSC Testnet
  • fuji - Avalanche Fuji Testnet
  • baseGoerli - Base Goerli Testnet
  • baseSepolia - Base Sepolia Testnet

Local Development

  • hardhat - Hardhat Network
  • localhost - Local Node

Contract Verification

After deployment, you can verify the contracts on the blockchain explorer:

npx hardhat run scripts/verify.ts --network <network-name>

The verification script will:

  1. Find the latest deployment information in the deployments/<network> directory
  2. Verify each contract with the correct constructor arguments
  3. Log the verification status for each contract

Verify on Base Sepolia

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 baseSepolia

Testing

The 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.

Test Structure

  • 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

Running Tests

Run the complete test suite:

npm test

Run tests with gas reporting:

REPORT_GAS=true npm test

Run tests with coverage:

npx hardhat coverage

Test Coverage

The 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)

Deployment Workflow

  1. Setup Environment:

    • Configure your .env file with the appropriate values
    • Ensure you have sufficient funds in your deployer account
  2. Deploy Contracts:

    • Run the deployment script for your target network
    • Wait for all transactions to be confirmed
  3. Verify Contracts:

    • Run the verification script for your target network
    • Check that all contracts are verified successfully
  4. Post-Deployment:

    • The deployment information is saved in the deployments/<network> directory
    • Use this information for frontend integration or further contract interactions

License

MIT

About

Aza VC Web3 Investing Lab - Ecosystem Smart Contracts

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages