LogoLogo
Join Built By DAO
  • Built By DAO
  • Tech Dev
  • 🏗️Build. Real. Start. Here.
  • 👋Welcome & Getting Started
    • Overview of Built By DAO
    • How Built By DAO Works
    • F.A.Q.
  • 🚀Mission & Governance
  • & Vision
  • Governance Structure
  • Voting & Decision-Making
  • Compliance & Legal Overview
  • Ethics & Transparency
  • 💪Membership & Community
    • Member Onboarding Process
  • Member Roles & Responsibilities
    • Member Levels System
    • List of Roles
      • Construction & Property Division
        • Land Acquisition Specialist
        • Architect/Urban Planner
        • Permit & Regulatory Specialist
        • Pre-Construction Project Manager
        • Surveyor
        • Construction Project Manager
        • Site Supervisor
        • Quality Control Inspector
        • Construction Scheduler
        • Cost Estimator
        • General Contractor
        • Skilled Tradespeople
        • Site Safety Officer
        • Environmental Specialist
        • Inspection & Compliance Officer
        • Property Manager
        • Sustainability Officer
        • Chief Construction Officer (CCO)
        • Director of Pre-Construction & Planning
        • Director of Construction Operations
        • Director of Post-Construction & Property Management
        • Regional Construction Manager
      • Membership & Community Engagement Division
        • Membership Outreach Specialist
        • Community Events Coordinator
        • Onboarding Specialist
        • Membership Support Representative
        • Member Retention Specialist
        • Engagement & Communications Manager
        • Chief Membership & Community Officer (CMCO)
        • Director of Membership Recruitment
        • Director of Community Engagement & Retention
        • Head of Member Support & Communications
      • Governance Division
        • Governance Manager
        • Community Voting Coordinator
        • Legal & Compliance Officer
        • Ethics & Transparency Officer
        • Governance Analyst
        • Data Collection Specialist
        • Chief Governance Officer (CGO)
        • Director of Governance Operations
        • Director of Legal & Compliance
        • Head of Governance Analytics & Insights
        • Regional Governance Manager
      • Analytics & Research Division
      • Priority Roles Q2 2025 Phase I
  • Guilds
  • Community Engagement & Events
  • Contribution Opportunities
  • ⚙️DAO Operations & Contributions
    • Equity Programs & Earning Credits
    • Funding & Treasury Management
  • Working Groups & Task Assignments
  • ⛓️Smart Contracts & Tokenomics
    • Basic Tokenomics
      • Disincentivize Institutional Investment
      • List of All Tokens in the DAO
      • Token Economic Model Outline
      • List of Contracts in Built By DAO System
        • BLTBY Token Contract
        • Treasury Reserve Contract
        • Migration Upgrade Contract
        • Leadership Council Nft Contract
        • Framer NFT Contract
        • Angel NFT Contract
        • Venture One NFT Contract
        • Trust NFT Contract
        • General Membership NFT Contract
        • Governace Contract
        • Access Token Umbrella Contract
        • Contract Interconnectivity Plan and Deployment Order
      • Contracts & Addresses
  • 🧱Real Estate & Property Development
    • Property Development Process
    • Strategic Land Acquisition
  • Equity-Building Leases
  • Sustainable Construction Principles
  • Adaptive Reuse & Innovation
  • 🌳Sustainability & Environmental Stewardship
    • Commitment to Sustainability
    • Innovating Sustainable Building & Energy Systems
    • Circular Economy & Waste Reduction
  • 📚Training & Resource Centers
    • Workshops & Skill-Building Programs
    • Learning Hub: Skills Development & Certifications
  • DAO Governance & Leadership Training
  • Construction & Technical Training Programs
  • Built By DAO: Empowering Real Estate Investment through Real World Assets (RWAs)
Powered by GitBook
LogoLogo

© Built By DAO Holdings LLC

On this page
  1. Smart Contracts & Tokenomics
  2. Basic Tokenomics
  3. List of Contracts in Built By DAO System

Angel NFT Contract

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract AngelNFTContract is ERC721URIStorage, AccessControl, Ownable, ReentrancyGuard {
    uint256 private _tokenIdCounter;
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

    // Metadata attributes for angel investors
    struct AngelAttributes {
        bool hasEarlyInvestorPrivileges;
        uint8 governanceWeight;  // Governance weight for DAO decision making
        uint256 discountRate;    // Discount rate for future BLTBY token purchases
    }

    // Mapping from token ID to angel attributes
    mapping(uint256 => AngelAttributes) public angelDetails;

    // Events for minting, burning, and assigning angel attributes
    event AngelNFTMinted(address indexed to, uint256 tokenId, bool hasEarlyInvestorPrivileges);
    event AngelNFTBurned(uint256 tokenId);

    // Custom errors for efficient error handling
    error UnauthorizedAccess();
    error TokenNonExistent(uint256 tokenId);

    constructor() ERC721("Angel Membership", "ANGL") {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(MINTER_ROLE, msg.sender);
        _tokenIdCounter = 1; // Start token IDs at 1
    }

    /**
     * @dev Mint a new Angel NFT.
     * Only an address with the MINTER_ROLE can mint new tokens.
     * @param to The address that will receive the minted NFT.
     * @param hasEarlyInvestorPrivileges True if the recipient is an early investor, otherwise false.
     */
    function mintAngelNFT(address to, bool hasEarlyInvestorPrivileges) external onlyRole(MINTER_ROLE) nonReentrant {
        uint256 tokenId = _tokenIdCounter;
        _safeMint(to, tokenId);
        
        // Set URI for metadata (to be replaced with actual URI)
        _setTokenURI(tokenId, "https://metadata.uri/for/AngelNFT");
        
        // Set specific attributes for early investors
        AngelAttributes memory attributes;
        attributes.hasEarlyInvestorPrivileges = hasEarlyInvestorPrivileges;
        attributes.governanceWeight = hasEarlyInvestorPrivileges ? 3 : 1;  // Early investors get higher governance weight
        attributes.discountRate = hasEarlyInvestorPrivileges ? 15 : 10; // Discount rate for BLTBY token purchases
        angelDetails[tokenId] = attributes;
        
        _tokenIdCounter += 1;
        emit AngelNFTMinted(to, tokenId, hasEarlyInvestorPrivileges);
    }

    /**
     * @dev Burn an Angel NFT.
     * Only the owner or admin can burn the NFT in cases of revocation, termination, or upgrades.
     * @param tokenId The ID of the token to be burned.
     */
    function burnAngelNFT(uint256 tokenId) external nonReentrant {
        if (ownerOf(tokenId) != msg.sender && !hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {
            revert UnauthorizedAccess();
        }
        _burn(tokenId);
        delete angelDetails[tokenId];
        emit AngelNFTBurned(tokenId);
    }

    /**
     * @dev Override transfer function to prevent transfers (soul-bound nature).
     * @param from Address from which token is being transferred.
     * @param to Address to which token is being transferred.
     * @param tokenId ID of the token being transferred.
     */
    function _transfer(address from, address to, uint256 tokenId) internal pure override {
        revert("Angel NFTs are non-transferable");
    }

    /**
     * @dev Check if a specific token ID has early investor privileges.
     * @param tokenId The ID of the token to check.
     * @return True if the token has early investor privileges, otherwise false.
     */
    function hasEarlyInvestorPrivileges(uint256 tokenId) external view returns (bool) {
        if (!_exists(tokenId)) {
            revert TokenNonExistent(tokenId);
        }
        return angelDetails[tokenId].hasEarlyInvestorPrivileges;
    }

    /**
     * @dev Get the governance weight assigned to a specific token ID.
     * @param tokenId The ID of the token to check.
     * @return Governance weight for the token.
     */
    function getGovernanceWeight(uint256 tokenId) external view returns (uint8) {
        if (!_exists(tokenId)) {
            revert TokenNonExistent(tokenId);
        }
        return angelDetails[tokenId].governanceWeight;
    }

    /**
     * @dev Get the discount rate assigned to a specific token ID for future BLTBY token purchases.
     * @param tokenId The ID of the token to check.
     * @return Discount rate for the token.
     */
    function getDiscountRate(uint256 tokenId) external view returns (uint256) {
        if (!_exists(tokenId)) {
            revert TokenNonExistent(tokenId);
        }
        return angelDetails[tokenId].discountRate;
    }
}

/*
 Key Features:
 - Separate contract for Angel NFTs, tailored for angel investors with specific investment benefits.
 - Minting restricted to addresses with the MINTER_ROLE, typically DAO administrators.
 - Soul-bound: NFTs are non-transferable, but can be burned by the owner or admin under specific conditions.
 - Early investors receive special privileges: higher governance weight and a greater discount rate for future BLTBY token purchases.
 - Interoperability: Designed for integration with the Governance Contract to determine voting rights and influence within the DAO ecosystem.
 - Improved error handling with custom errors for more efficient gas usage.
 - Reentrancy guard applied for security in minting and burning operations.
*/
PreviousFramer NFT ContractNextVenture One NFT Contract

Last updated 6 months ago

⛓️