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

 // ***** EPOCH INDEPENDENT PARAMETERS ******//

    // Address of ERC20 token contract.
    IERC20 public tokenStaked;
    // Address of the ERC20 Token contract.
    IERC20 public erc20;
    // Fee collector address
    address payable public feeCollector;
    // Total fee collected
    uint256 public totalFeeCollectedETH;
    // Total fee collected in tokens
    uint256 public totalFeeCollectedTokens;
    // Address of farm instance
    address public farmImplementation;
    // Number of epochs
    uint256 public epochId;
    // Info of each user that stakes ERC20 tokens
    mapping(address => StakeInfo[]) public stakeInfo;
    // Array of withdraw requests
    mapping(address => UnStakeRequest[]) public withdrawRequest;
    // Array of deposit requests
    mapping(address => DepositRequest[]) public depositRequest;
    // Waiting list
    address[] public waitingList;
    // Id of user in waiting list
    mapping(address => uint256) public idInList;
    // Is farm fully initialised
    bool public init;
    // Number of all pending stakes
    uint256 public noOfPendingStakes;
    // Total tokens currently staked for user per epoch
    mapping(address => uint256) public totalActiveStakeAmount;
    // If params for next epoch are all set
    bool public initNewEpoch;
    // If all stakes from prev epoch are migrated
    bool public allStakesAreMigrated;
    // Index of last user migrated
    uint256 public lastUserMigrated;
    // All time high amount to be staked
    mapping(address => uint256) public ATHStake;
    // Total earned for user
    mapping(address => uint256) public totalEarnedForUser;

    // ***** EPOCH DEPENDING PARAMETERS ******//

    // Last time number that ERC20s distribution occurs for every epoch
    mapping(uint256 => uint256) public lastRewardTime;
    // Accumulated ERC20s per share, times 1e18 for every epoch
    mapping(uint256 => uint256) public accERC20PerShare;
    // Total tokens deposited in the farm for every epoch
    mapping(uint256 => uint256) public totalDeposits;
    // If contractor allows early withdraw on stakes for every epoch
    mapping(uint256 => bool) public isEarlyWithdrawAllowed;
    // Minimal period of time to stake for every epoch
    mapping(uint256 => uint256) public minTimeToStake;
    // ERC20 tokens rewarded per second for every epoch
    mapping(uint256 => uint256) public rewardPerSecond;
    // Total rewards added to farm for every epoch
    mapping(uint256 => uint256) public totalFundedRewards;
    // Total current rewards for every epoch
    mapping(uint256 => uint256) public totalRewards;
    // The time when farming starts for every epoch
    mapping(uint256 => uint256) public startTime;
    // The time when farming ends for every epoch
    mapping(uint256 => uint256) public endTime;
    // Early withdraw penalty for every epoch
    mapping(uint256 => EarlyWithdrawPenalty) public penalty;
    // Stake fee percent for every epoch
    mapping(uint256 => uint256) public stakeFeePercent;
    // Reward fee percent for every epoch
    mapping(uint256 => uint256) public rewardFeePercent;
    // Flat fee amount to deposit for every epoch
    mapping(uint256 => uint256) public flatFeeAmountDeposit;
    // Flat fee amount to withdraw for every epoch
    mapping(uint256 => uint256) public flatFeeAmountWithdraw;
    // Fee option for every epoch
    mapping(uint256 => bool) public isFlatFeeAllowed;
    // Total tokens burned for every epoch
    mapping(uint256 => uint256) public totalTokensBurned;
    // Paid out amounts for every epoch
    mapping(uint256 => uint256) public paidOut;
    // Mapping of every participants array of every epoch
    mapping(uint256 => address[]) public participants;
    // Number of active users per epoch
    mapping(uint256 => uint256) public noOfUsers;
    // Mapping of every users spot in array in every epoch
    mapping(uint256 => mapping(address => uint256)) public id;
    // When first deposit was made for that epoch
    mapping(uint256 => uint256) public firstDepositAt;
    // Total tokens currently staked for user per epoch
    mapping(address => mapping(uint256 => uint256)) public totalActiveStakeAmountPerEpoch;
    // Cool down period in seconds
    mapping(uint256 => uint256) public coolDownPeriod;
    // Warm up period in seconds
    mapping(uint256 => uint256) public warmupPeriod;
    // Total number of users in epoch
    mapping(uint256 => uint256) public totalNoOfUsers;

Last updated