// SPDX-License-Identifier: MIT pragma solidity 0.8.17; struct PoolType { uint claimable; uint valueLeft; } abstract contract ValhallaPool { // pool key definition bytes32 public constant GLOBAL_POOL_KEY = keccak256("GLOBAL_POOL"); bytes32 public constant RESERVED_POOL_KEY = keccak256("RESERVED_POOL"); bytes32 public constant IPO_POOL_KEY = keccak256("IPO_POOL"); bytes32 public constant GENESIS_POOL_KEY = keccak256("GENESIS_POOL"); mapping(bytes32 => PoolType) public poolMap; function _storeGlobalPool(uint value) internal { PoolType storage global_pool = poolMap[GLOBAL_POOL_KEY]; global_pool.claimable += value; } function getGlobalPool() public view returns (PoolType memory) { return poolMap[GLOBAL_POOL_KEY]; } function _storeIpoPool(uint value) internal { PoolType storage ipo_pool = poolMap[IPO_POOL_KEY]; ipo_pool.claimable += value; } function getIpoPool() public view returns (PoolType memory) { return poolMap[IPO_POOL_KEY]; } function _storeGenesisPool(uint value) internal { PoolType storage genesisPool = poolMap[GENESIS_POOL_KEY]; genesisPool.claimable += value; } function getGenesisPool() public view returns (PoolType memory) { return poolMap[GENESIS_POOL_KEY]; } }