LiquisViewHelpers

View-only contract to combine calls

Get locker info

 function getLocker(address _locker) external view returns (Locker memory locker)

   struct Locker {
        uint256 epoch;
        uint256 totalSupply;
        uint256 lockedSupply;
        RewardsData rewardsData;
    }


    struct RewardsData {
        uint256 periodFinish;
        uint256 lastUpdateTime;
        uint256 rewardRate;
        uint256 rewardPerTokenStored;
        uint256 queuedRewards;
    }

Get user info

 function getLockerAccount(address _locker, address _account)
        external
        view
        returns (LockerAccount memory lockerAccount)
        
   
 struct LockerAccount {
        address addr;
        uint256 total;
        uint256 unlockable;
        uint256 locked;
        uint256 nextUnlockIndex;
        uint128 rewardPerTokenPaid;
        uint128 rewards;
        address delegate;
        uint256 votes;
        LiqLocker.LockedBalance[] lockData;
        LiqLocker.EarnedData[] claimableRewards;
    }

Get all pools info in booster

function getPools(address _booster) external view returns (Pool[] memory)

struct Pool {
        uint256 pid;
        address lptoken;
        address token;
        address gauge;
        address crvRewards;
        address stash;
        bool shutdown;
        address rewardToken;
        address uniV3Pool;
        address[] poolTokens;
        int24[] ticks;
        uint256 totalSupply;
        RewardsData rewardsData;
        ExtraRewards[] extraRewards;
    }

Get liqLIT pool info

 function getCvxCrvRewards(address _cvxCrvRewards) public view returns (Pool memory)

Get extra rewards data for a specific reward pool

 function getExtraRewards(address _baseRewardPool) 
                 internal 
                 view 
                 returns (ExtraRewards[] memory)
 
 
 struct ExtraRewards {
        address addr;
        address rewardsToken;
        RewardsData rewardsData;
    }

 struct RewardsData {
        uint256 periodFinish;
        uint256 lastUpdateTime;
        uint256 rewardRate;
        uint256 rewardPerTokenStored;
        uint256 queuedRewards;
    }

Get pool info

function getPool(IBooster.PoolInfo memory poolInfo, uint256 _pid)     
                                public 
                                view 
                                returns (Pool memory)
struct IBooster.PoolInfo {
        address lptoken;
        address token;
        address gauge;
        address crvRewards;
        address stash;
        bool shutdown;
    }

Get All Pools Balances for an account

function getPoolsBalances(address _booster, address _account) 
                                external 
                                view 
                                returns (PoolBalances[] memory)

    struct PoolBalances {
        uint256 pid;
        uint256 earned;
        uint256[] extraRewardsEarned;
        uint256 staked;
    }

Get Pool Balances for an account about a specific reward pool

 function getPoolBalances(
        address _rewardPool,
        uint256 _pid,
        address _account
    ) public view returns (PoolBalances memory)
    

Get token infos

 function getTokens(address[] memory _addresses) 
                      public 
                      view 
                      returns (Token[] memory)
 
 
   struct Token {
        address addr;
        uint8 decimals;
        string symbol;
        string name;
    }

Get earmark rewards

function getEarmarkingReward(
        uint256 pool,
        address booster,
        address token
    ) public returns (uint256 pending)

Get multiples earmark rewards

 function getMultipleEarmarkingRewards(
        uint256[] memory pools,
        address booster,
        address token
    ) external returns (uint256[] memory pendings)

Estimate LIQ emissions based on LIT amount

 function convertLitToLiq(uint256 _amount) external view returns (uint256 amount)

Last updated