Parameters

All public declared parameters act as a getters. Ex : uint256 public lastRewardTime so if you call PerpetualTokensFarmSDK.lastRewardTime( epochId ) you will get timestamp of last time that reward was given in that specific epoch

Epoch independent parameters

  • These ones you can get like this PerpetualTokensFarmSDK.tokenStaked()

    IERC20 public tokenStaked;
    IERC20 public tokenStaked;
    address payable public feeCollector;
    uint256 public totalFeeCollectedETH;
    uint256 public totalFeeCollectedTokens;
    address public farmImplementation;
    uint256 public epochId;
    mapping(address => StakeInfo[]) public stakeInfo;
    address public contractAdmin;
    bool public isActive;
    mapping(address => uint256) public totalEarnedForUser;
    mapping(address => uint256) public totalPendingAmountForUser;
    bool public init;
    mapping(address => uint256) public lastStakeConsumed;
    mapping(address => DepositRequest[]) public depositRequest;
    address[] public waitingList;
    mapping(address => uint256) public idInList;
    uint256 public noOfPendingStakes;
    mapping(address => uint256) public ATHStake;
    mapping(address => uint256) public nextStakeToFinalise;   

Epoch depending parameters

  • These ones you need to fetch epochId first :

epochId = PerpetualTokensFarmSDK.epochId() (current epoch)

Or you can choose your own epochId that you want to investigate

And once you have epochId you can get the parameter :

PerpetualTokensFarmSDK.lastRewardTime( epochId ) You will get lastRewardTime of that epoch

    mapping(uint256 => uint256) public lastRewardTime;
    mapping(uint256 => uint256) public accERC20PerShare;
    mapping(uint256 => uint256) public totalDeposits;
    mapping(uint256 => bool) public isEarlyWithdrawAllowed;
    mapping(uint256 => uint256) public minTimeToStake;
    mapping(uint256 => uint256) public rewardPerSecond;
    mapping(uint256 => uint256) public totalFundedRewards;
    mapping(uint256 => uint256) public totalRewards;
    mapping(uint256 => uint256) public startTime;
    mapping(uint256 => uint256) public endTime;
    mapping(uint256 => EarlyWithdrawPenalty) public penalty;
    mapping(uint256 => uint256) public rewardFeePercent;
    mapping(uint256 => uint256) public flatFeeAmountDeposit;
    mapping(uint256 => uint256) public flatFeeAmountWithdraw;
    mapping(uint256 => bool) public isFlatFeeAllowed;
    mapping(uint256 => uint256) public totalTokensBurned;
    mapping(uint256 => uint256) public paidOut;
    mapping(uint256 => address[]) public participants;
    mapping(uint256 => uint256) public noOfUsers;
    mapping(uint256 => mapping(address => uint256)) public id;
    mapping(uint256 => uint256) public firstDepositAt;
    mapping(address => mapping(uint256 => uint256)) public totalActiveStakeAmountPerEpoch;
    mapping(uint256 => uint256) public warmupPeriod;

Last updated