DAO smart contracts — ERC-20 token, governance, and timelock (OpenZeppelin + Hardhat)
- JavaScript 100%
|
All checks were successful
CI / Compile & Test Contracts (push) Successful in 41s
|
||
|---|---|---|
| .gitea/workflows | ||
| contracts | ||
| scripts | ||
| .ci-trigger | ||
| .env.example | ||
| .gitignore | ||
| hardhat.config.cjs | ||
| package.json | ||
| README.md | ||
AeThex Foundation Smart Contracts
Governance contracts for the AeThex ecosystem built on OpenZeppelin.
Contracts
| Contract | Description |
|---|---|
AethexToken.sol |
ERC-20 governance token with voting capabilities |
AethexGovernor.sol |
On-chain governance (proposals, voting) |
AethexTimelock.sol |
Time-locked execution of governance decisions |
Setup
npm install
Development
# Start local node
npm run node
# Compile contracts
npm run compile
# Run tests
npm run test
# Deploy to local network
npm run deploy:local
Deployment
# Deploy to Sepolia testnet
npm run deploy:sepolia
# Deploy to mainnet (use with caution)
npm run deploy:mainnet
# Verify on Etherscan
npx hardhat verify --network sepolia <CONTRACT_ADDRESS>
Environment Variables
Copy .env.example to .env and fill in:
ALCHEMY_API_KEY= # Alchemy API key for RPC
POLYGON_PRIVATE_KEY= # Deployer wallet private key
ETHERSCAN_API_KEY= # For contract verification
POLYGONSCAN_API_KEY= # For Polygon verification
Architecture
┌──────────────────┐
│ AethexToken │
│ (ERC-20 + Vote) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ AethexGovernor │
│ (Proposals) │
└────────┬─────────┘
│
┌────────▼─────────┐
│ AethexTimelock │
│ (Execution) │
└──────────────────┘
License
MIT