interface IPoolStore {
    /* ================= EVENTS ================= */
    event Deposit(
        address indexed operator,
        address indexed owner,
        uint256 indexed pid,
        uint256 amount
    );
    event Withdraw(
        address indexed operator,
        address indexed owner,
        uint256 indexed pid,
        uint256 amount
    );

    /* ================= CALLS ================= */

    // common
    function totalWeight() external view returns (uint256);

    function poolLength() external view returns (uint256);

    // index
    function poolIdsOf(address _token) external view returns (uint256[] memory);

    // pool info
    function nameOf(uint256 _pid) external view returns (string memory);

    function tokenOf(uint256 _pid) external view returns (address);

    function weightOf(uint256 _pid) external view returns (uint256);

    function totalSupply(uint256 _pid) external view returns (uint256);

    function balanceOf(uint256 _pid, address _owner)
        external
        view
        returns (uint256);

    /* ================= TXNS ================= */

    function deposit(
        uint256 _pid,
        address _owner,
        uint256 _amount
    ) external;

    function withdraw(
        uint256 _pid,
        address _owner,
        uint256 _amount
    ) external;

    function emergencyWithdraw(uint256 _pid) external;
}
function poolIdsOf(address _token) external view returns (uint256[] memory);

// index