pragma solidity ^0.5.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface StakingRewardsWithPlatformToken { /** * @dev Stakes a given amount of the StakingToken for the sender * @param _amount Units of StakingToken */ function stake(uint256 _amount) external; /** * @dev Stakes a given amount of the StakingToken for a given beneficiary * @param _beneficiary Staked tokens are credited to this address * @param _amount Units of StakingToken */ function stake(address _beneficiary, uint256 _amount) external; /** * @dev Withdraws stake from pool and claims any rewards */ function exit() external; /** * @dev Withdraws given stake amount from the pool * @param _amount Units of the staked token to withdraw */ function withdraw(uint256 _amount) external; /** * @dev Claims outstanding rewards (both platform and native) for the sender. * First updates outstanding reward allocation and then transfers. */ function claimReward() external; /** * @dev Claims outstanding rewards for the sender. Only the native * rewards token, and not the platform rewards */ function claimRewardOnly() external; /** * @dev Gets the RewardsToken */ function getRewardToken() external view returns (IERC20); /** * @dev Gets the last applicable timestamp for this reward period */ function lastTimeRewardApplicable() external view returns (uint256); /** * @dev Calculates the amount of unclaimed rewards a user has earned * @return 'Reward' per staked token */ function rewardPerToken() external view returns (uint256, uint256); /** * @dev Calculates the amount of unclaimed rewards a user has earned * @param _account User address * @return Total reward amount earned */ function earned(address _account) external view returns (uint256, uint256); }