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

/**
 * @title AereToken (governance interface)
 * @notice Minimal interface for AereGovernance compatibility.
 *
 * NOTE: AERE Network's native token is AERE itself (no ERC-20 contract). For
 *       DeFi compatibility we provide WAERE.sol (the wrapped ERC-20). This
 *       contract exists ONLY because AereGovernance.sol was written with an
 *       AereToken type assumption. It serves as the governance-voting-power
 *       proxy and reads circulating supply from WAERE.
 *
 * Pass the deployed WAERE address into the constructor; balanceOf(user) and
 * getCirculatingSupply() are then routed through to WAERE.
 */

interface IWAERE {
    function balanceOf(address) external view returns (uint256);
    function totalSupply() external view returns (uint256);
}

contract AereToken {
    IWAERE public immutable waere;

    constructor(address _waere) {
        waere = IWAERE(_waere);
    }

    /// @notice Voting power = WAERE balance (user must wrap their AERE to vote)
    function balanceOf(address account) external view returns (uint256) {
        return waere.balanceOf(account);
    }

    /// @notice Total wrapped AERE in circulation (used for governance quorum calc)
    function getCirculatingSupply() external view returns (uint256) {
        return waere.totalSupply();
    }
}
