Alsania Enhanced Domains (AED) is an upgradeable ERC-721 domain registry built for sovereignty, featuring subdomains, dynamic metadata, SVG image rendering, and paid feature upgrades. Designed for UUPS upgradeability and aligned with Alsania's neon green/navy branding.
- π Upgradeable Architecture β UUPS proxies with storage layout protection
- π¨ Rich Domain Data β On-chain profile URIs, image URIs, and feature flags
- π Dynamic Metadata β Automatic defaults with inline SVG fallbacks
- π° Feature Marketplace β Transparent pricing for subdomains, metadata, reverse, bridging
- π Reverse Resolution β Primary domain assignment with automatic updates
- β‘ Batch Operations β Efficient batch registration with precise fee handling
- π Frontend Dashboard β Lightweight HTML/JS with live pricing integration
π contracts/ Solidity smart contracts (UUPS upgradeable)
π frontend/aed-home/ Public domain registration portal
π frontend/aed-admin/ Administrative dashboard
π metadata-server/ NFT metadata API server
π scripts/ Hardhat deployment & utility scripts
π test/ Comprehensive test suite
- Node.js 18+
- npm 9+
- Polygon Amoy testnet access
- MetaMask wallet
# Clone the repository
git clone https://github.com/alsania-io/aed.git
cd aed
# Install dependencies
make install
# or
npm install# Copy and configure environment variables
cp .env.example .env
# Edit .env with your configuration:
# AMOY_RPC=https://rpc-amoy.polygon.technology
# PRIVATE_KEY=your_private_key_here
# POLYGONSCAN_API_KEY=your_api_keymake compile # Compile contracts
make test # Run test suite
make coverage # Generate coverage report
make clean # Clean build artifactsRun the comprehensive test suite:
npx hardhat testThe test suite covers:
- Domain & subdomain registration flows
- Metadata generation and SVG rendering
- Feature purchasing and fee calculations
- Reverse resolution updates
- Batch operations and payment handling
- Contract upgrade safety
# Compile contracts
npx hardhat compile
# Deploy to Polygon Amoy
npx hardhat run scripts/deploy.js --network amoy
# Verify on Polygonscan
npx hardhat verify --network amoy <contract-address># Serve frontend locally
npx http-server frontend/aed-home
# Or deploy to any static hosting service# Configure environment
export RPC_URL="https://rpc-amoy.polygon.technology"
export CONTRACT_ADDRESS="your_deployed_contract_address"
# Start metadata server
node metadata-server/metadata-server.js- Network: Polygon Amoy Testnet
- Contract: UUPS Upgradeable ERC-721
- Admin Roles:
ADMIN_ROLE,FEE_MANAGER_ROLE,TLD_MANAGER_ROLE
Update frontend/aed-home/js/config.js:
export const config = {
CONTRACT_ADDRESS: "your_contract_address",
RPC_URL: "https://rpc-amoy.polygon.technology",
CHAIN_ID: 80002, // Polygon Amoy
NETWORK_NAME: "Polygon Amoy"
};- Access Control: Role-based permissions using OpenZeppelin's
AccessControlUpgradeable - Reentrancy Protection: All payable functions protected with
ReentrancyGuardUpgradeable - Upgrade Safety: Single
AppStoragestruct with reserved storage gap - Input Validation: Comprehensive parameter checking and bounds validation
The AED system uses UUPS (Universal Upgradeable Proxy Standard) for upgrades:
- Implement: Create new contract version respecting storage layout
- Validate: Run
npx hardhat storage-layoutto confirm compatibility - Deploy: Use the upgrade script:
npx hardhat run scripts/upgrade-implementation.js --network amoy - Execute: Call
upgradeTo()with appropriate admin permissions
registerDomain(string memory name, address owner)- Register new domainpurchaseEnhancement(uint256 tokenId, EnhancementType enhancement)- Buy featuressetPrimaryDomain(uint256 tokenId)- Set primary domainestimateDomainPrice(string memory name)- Get registration cost
GET /domain/:tokenId.json- Domain metadataGET /sub/:tokenId.json- Subdomain metadata
AED follows Alsania's design principles:
- Primary Color:
#39FF14(Neon Green) - Secondary Color:
#0A2472(Navy) - Typography: Clean, modern fonts
- UI: Minimalist, sovereignty-focused design
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Project Wiki
- Community: Alsania Discord
Built with β€οΈ for digital sovereignty by the Alsania team