编译器
0.5.17+commit.d19bba13
文件 1 的 13:Address.sol
pragma solidity ^0.5.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
}
文件 2 的 13:ERC20.sol
pragma solidity ^0.5.0;
import "./IERC20.sol";
import "../../math/SafeMath.sol";
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
function _burn(address account, uint256 value) internal {
require(account != address(0), "ERC20: burn from the zero address");
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
}
function _approve(address owner, address spender, uint256 value) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
function _burnFrom(address account, uint256 amount) internal {
_burn(account, amount);
_approve(account, msg.sender, _allowances[account][msg.sender].sub(amount));
}
}
文件 3 的 13:ERC20Burnable.sol
pragma solidity ^0.5.0;
import "./ERC20.sol";
contract ERC20Burnable is ERC20 {
function burn(uint256 amount) public {
_burn(msg.sender, amount);
}
function burnFrom(address account, uint256 amount) public {
_burnFrom(account, amount);
}
}
文件 4 的 13:ERC20Detailed.sol
pragma solidity ^0.5.0;
import "./IERC20.sol";
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint8) {
return _decimals;
}
}
文件 5 的 13:Escrow.sol
pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
contract Escrow is Ownable {
using SafeERC20 for IERC20;
event BeneficiaryUpdated(address beneficiary);
event TokensWithdrawn(address beneficiary, uint256 amount);
IERC20 public token;
address public beneficiary;
constructor(IERC20 _token) public {
token = _token;
}
function setBeneficiary(address _beneficiary) public onlyOwner {
beneficiary = _beneficiary;
emit BeneficiaryUpdated(beneficiary);
}
function withdraw() public {
require(beneficiary != address(0), "Beneficiary not assigned");
require(msg.sender == beneficiary, "Caller is not the beneficiary");
uint256 amount = token.balanceOf(address(this));
require(amount > 0, "No tokens to withdraw");
token.safeTransfer(beneficiary, amount);
emit TokensWithdrawn(beneficiary, amount);
}
}
文件 6 的 13:IERC20.sol
pragma solidity ^0.5.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 7 的 13:KeepToken.sol
pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; }
contract KeepToken is ERC20Burnable, ERC20Detailed {
string public constant NAME = "KEEP Token";
string public constant SYMBOL = "KEEP";
uint8 public constant DECIMALS = 18;
uint256 public constant INITIAL_SUPPLY = 10**27;
constructor() public ERC20Detailed(NAME, SYMBOL, DECIMALS) {
_mint(msg.sender, INITIAL_SUPPLY);
}
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraData);
return true;
}
}
}
文件 8 的 13:LPRewards.sol
pragma solidity 0.5.17;
import "@keep-network/keep-core/contracts/KeepToken.sol";
import "@keep-network/keep-core/contracts/PhasedEscrow.sol";
import "openzeppelin-solidity/contracts/math/Math.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
contract IRewardDistributionRecipient is Ownable {
address rewardDistribution;
function notifyRewardAmount(uint256 reward) external;
modifier onlyRewardDistribution() {
require(
msg.sender == rewardDistribution,
"Caller is not reward distribution"
);
_;
}
function setRewardDistribution(address _rewardDistribution)
external
onlyOwner
{
rewardDistribution = _rewardDistribution;
}
}
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
IERC20 public wrappedToken;
constructor(IERC20 _wrappedToken) public {
wrappedToken = _wrappedToken;
}
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function stake(uint256 amount) public {
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
wrappedToken.safeTransferFrom(msg.sender, address(this), amount);
}
function withdraw(uint256 amount) public {
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
wrappedToken.safeTransfer(msg.sender, amount);
}
}
contract LPRewards is
LPTokenWrapper,
IRewardDistributionRecipient,
IStakingPoolRewards
{
IERC20 public keepToken;
uint256 public constant DURATION = 7 days;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
constructor(IERC20 _keepToken, IERC20 _wrappedToken)
public
LPTokenWrapper(_wrappedToken)
{
keepToken = _keepToken;
}
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
lastUpdateTime = lastTimeRewardApplicable();
if (account != address(0)) {
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
function exit() external {
withdraw(balanceOf(msg.sender));
getReward();
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(address(0))
{
keepToken.safeTransferFrom(msg.sender, address(this), reward);
if (block.timestamp >= periodFinish) {
rewardRate = reward.div(DURATION);
} else {
uint256 remaining = periodFinish.sub(block.timestamp);
uint256 leftover = remaining.mul(rewardRate);
rewardRate = reward.add(leftover).div(DURATION);
}
lastUpdateTime = block.timestamp;
periodFinish = block.timestamp.add(DURATION);
emit RewardAdded(reward);
}
function lastTimeRewardApplicable() public view returns (uint256) {
return Math.min(block.timestamp, periodFinish);
}
function rewardPerToken() public view returns (uint256) {
if (totalSupply() == 0) {
return rewardPerTokenStored;
}
return
rewardPerTokenStored.add(
lastTimeRewardApplicable()
.sub(lastUpdateTime)
.mul(rewardRate)
.mul(1e18)
.div(totalSupply())
);
}
function earned(address account) public view returns (uint256) {
return
balanceOf(account)
.mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
.div(1e18)
.add(rewards[account]);
}
function stake(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot stake 0");
super.stake(amount);
emit Staked(msg.sender, amount);
}
function withdraw(uint256 amount) public updateReward(msg.sender) {
require(amount > 0, "Cannot withdraw 0");
super.withdraw(amount);
emit Withdrawn(msg.sender, amount);
}
function getReward() public updateReward(msg.sender) {
uint256 reward = earned(msg.sender);
if (reward > 0) {
rewards[msg.sender] = 0;
keepToken.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
}
contract LPRewardsTBTCETH is LPRewards {
constructor(KeepToken keepToken, IERC20 tbtcEthUniswapPair)
public
LPRewards(keepToken, tbtcEthUniswapPair)
{}
}
contract LPRewardsKEEPETH is LPRewards {
constructor(KeepToken keepToken, IERC20 keepEthUniswapPair)
public
LPRewards(keepToken, keepEthUniswapPair)
{}
}
contract LPRewardsKEEPTBTC is LPRewards {
constructor(KeepToken keepToken, IERC20 keepTbtcUniswapPair)
public
LPRewards(keepToken, keepTbtcUniswapPair)
{}
}
contract LPRewardsTBTCSaddle is LPRewards {
bool public gated = true;
constructor(KeepToken keepToken, IERC20 tbtcSaddleLPToken)
public
LPRewards(keepToken, tbtcSaddleLPToken)
{}
function stake(uint256 amount) public {
require(
!gated || msg.sender == tx.origin,
"Only Externally Owned Account can stake"
);
super.stake(amount);
}
function setGated(bool _gated) public onlyOwner {
gated = _gated;
}
}
文件 9 的 13:Math.sol
pragma solidity ^0.5.0;
library Math {
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
function average(uint256 a, uint256 b) internal pure returns (uint256) {
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}
文件 10 的 13:Ownable.sol
pragma solidity ^0.5.0;
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(isOwner(), "Ownable: caller is not the owner");
_;
}
function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
文件 11 的 13:PhasedEscrow.sol
pragma solidity 0.5.17;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
import "./Escrow.sol";
interface IBeneficiaryContract {
function __escrowSentTokens(uint256 amount) external;
}
contract PhasedEscrow is Ownable {
using SafeERC20 for IERC20;
event BeneficiaryUpdated(address beneficiary);
event TokensWithdrawn(address beneficiary, uint256 amount);
IERC20 public token;
IBeneficiaryContract public beneficiary;
constructor(IERC20 _token) public {
token = _token;
}
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes memory
) public {
require(IERC20(_token) == token, "Unsupported token");
token.safeTransferFrom(_from, address(this), _value);
}
function setBeneficiary(IBeneficiaryContract _beneficiary) external onlyOwner {
beneficiary = _beneficiary;
emit BeneficiaryUpdated(address(beneficiary));
}
function withdraw(uint256 amount) external onlyOwner {
require(address(beneficiary) != address(0), "Beneficiary not assigned");
uint256 balance = token.balanceOf(address(this));
require(amount <= balance, "Not enough tokens for withdrawal");
token.safeTransfer(address(beneficiary), amount);
emit TokensWithdrawn(address(beneficiary), amount);
beneficiary.__escrowSentTokens(amount);
}
function withdrawFromEscrow(Escrow _escrow) public {
_escrow.withdraw();
}
}
contract BatchedPhasedEscrow is Ownable {
using SafeERC20 for IERC20;
event BeneficiaryApproved(address beneficiary);
event TokensWithdrawn(address beneficiary, uint256 amount);
event DraweeRoleTransferred(address oldDrawee, address newDrawee);
IERC20 public token;
address public drawee;
mapping(address => bool) private approvedBeneficiaries;
modifier onlyDrawee() {
require(drawee == msg.sender, "Caller is not the drawee");
_;
}
constructor(IERC20 _token) public {
token = _token;
drawee = msg.sender;
}
function approveBeneficiary(
IBeneficiaryContract _beneficiary
) external onlyOwner {
address beneficiaryAddress = address(_beneficiary);
require(
beneficiaryAddress != address(0),
"Beneficiary can not be zero address"
);
approvedBeneficiaries[beneficiaryAddress] = true;
emit BeneficiaryApproved(beneficiaryAddress);
}
function isBeneficiaryApproved(
IBeneficiaryContract _beneficiary
) public view returns (bool) {
return approvedBeneficiaries[address(_beneficiary)];
}
function setDrawee(address newDrawee) public onlyOwner {
require(newDrawee != address(0), "New drawee can not be zero address");
emit DraweeRoleTransferred(drawee, newDrawee);
drawee = newDrawee;
}
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes memory
) public {
require(IERC20(_token) == token, "Unsupported token");
token.safeTransferFrom(_from, address(this), _value);
}
function batchedWithdraw(
IBeneficiaryContract[] memory beneficiaries,
uint256[] memory amounts
) public onlyDrawee {
require(
beneficiaries.length == amounts.length,
"Mismatched arrays length"
);
for (uint256 i = 0; i < beneficiaries.length; i++) {
IBeneficiaryContract beneficiary = beneficiaries[i];
require(
isBeneficiaryApproved(beneficiary),
"Beneficiary was not approved"
);
withdraw(beneficiary, amounts[i]);
}
}
function withdraw(IBeneficiaryContract beneficiary, uint256 amount) private {
token.safeTransfer(address(beneficiary), amount);
emit TokensWithdrawn(address(beneficiary), amount);
beneficiary.__escrowSentTokens(amount);
}
}
interface IStakingPoolRewards {
function notifyRewardAmount(uint256 amount) external;
}
contract StakingPoolRewardsEscrowBeneficiary is Ownable, IBeneficiaryContract {
IERC20 public token;
IStakingPoolRewards public rewards;
constructor(IERC20 _token, IStakingPoolRewards _rewards) public {
token = _token;
rewards = _rewards;
}
function __escrowSentTokens(uint256 amount) external onlyOwner {
token.approve(address(rewards), amount);
rewards.notifyRewardAmount(amount);
}
}
interface IStakerRewards {
function receiveApproval(
address _from,
uint256 _value,
address _token,
bytes calldata _extraData
) external;
}
contract StakerRewardsBeneficiary is Ownable {
IERC20 public token;
IStakerRewards public stakerRewards;
constructor(IERC20 _token, IStakerRewards _stakerRewards) public {
token = _token;
stakerRewards = _stakerRewards;
}
function __escrowSentTokens(uint256 amount) external onlyOwner {
bool success = token.approve(address(stakerRewards), amount);
require(success, "Token transfer approval failed");
stakerRewards.receiveApproval(
address(this),
amount,
address(token),
""
);
}
}
contract BeaconBackportRewardsEscrowBeneficiary is StakerRewardsBeneficiary {
constructor(IERC20 _token, IStakerRewards _stakerRewards)
public
StakerRewardsBeneficiary(_token, _stakerRewards)
{}
}
contract BeaconRewardsEscrowBeneficiary is StakerRewardsBeneficiary {
constructor(IERC20 _token, IStakerRewards _stakerRewards)
public
StakerRewardsBeneficiary(_token, _stakerRewards)
{}
}
文件 12 的 13:SafeERC20.sol
pragma solidity ^0.5.0;
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function callOptionalReturn(IERC20 token, bytes memory data) private {
require(address(token).isContract(), "SafeERC20: call to non-contract");
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 13 的 13:SafeMath.sol
pragma solidity ^0.5.0;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}
{
"compilationTarget": {
"solidity/contracts/LPRewards.sol": "LPRewardsTBTCSaddle"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"contract KeepToken","name":"keepToken","type":"address"},{"internalType":"contract IERC20","name":"tbtcSaddleLPToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"constant":true,"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"keepToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_gated","type":"bool"}],"name":"setGated","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_rewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"wrappedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]