ETH Price: $3,100.95 (+0.10%)

Contract

0xaBC607F40Ca9225117C83E3F03bbe15dF8bB93A4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Exit161953092022-12-16 5:56:47703 days ago1671170207IN
0xaBC607F4...dF8bB93A4
0 ETH0.0012318615.33447691
Exit161945942022-12-16 3:32:47703 days ago1671161567IN
0xaBC607F4...dF8bB93A4
0 ETH0.0012798418.42989218
Exit161945522022-12-16 3:24:23703 days ago1671161063IN
0xaBC607F4...dF8bB93A4
0 ETH0.001447820.84852938
Exit161945132022-12-16 3:16:35703 days ago1671160595IN
0xaBC607F4...dF8bB93A4
0 ETH0.0015522.32021221
Exit161944852022-12-16 3:10:59703 days ago1671160259IN
0xaBC607F4...dF8bB93A4
0 ETH0.0013696519.72317387
Exit161944262022-12-16 2:59:11703 days ago1671159551IN
0xaBC607F4...dF8bB93A4
0 ETH0.0010052314.47552044
Exit161944092022-12-16 2:55:47703 days ago1671159347IN
0xaBC607F4...dF8bB93A4
0 ETH0.0004983414.23845444
Exit153620982022-08-18 1:22:46823 days ago1660785766IN
0xaBC607F4...dF8bB93A4
0 ETH0.0012230715.22511017
Withdraw153620832022-08-18 1:18:56823 days ago1660785536IN
0xaBC607F4...dF8bB93A4
0 ETH0.0010079913.65924294
Withdraw153619892022-08-18 0:58:29823 days ago1660784309IN
0xaBC607F4...dF8bB93A4
0 ETH0.000671119.09416057
Stake153606242022-08-17 19:42:35823 days ago1660765355IN
0xaBC607F4...dF8bB93A4
0 ETH0.000714629.07632342
Stake153605622022-08-17 19:29:34824 days ago1660764574IN
0xaBC607F4...dF8bB93A4
0 ETH0.0016918714.6241848
Withdraw146264952022-04-21 5:37:41942 days ago1650519461IN
0xaBC607F4...dF8bB93A4
0 ETH0.0027712240.14406785
Withdraw146264712022-04-21 5:33:39942 days ago1650519219IN
0xaBC607F4...dF8bB93A4
0 ETH0.0043078558.33718832
Withdraw145625542022-04-11 5:37:21952 days ago1649655441IN
0xaBC607F4...dF8bB93A4
0 ETH0.002044727.70302295
Withdraw145625472022-04-11 5:35:35952 days ago1649655335IN
0xaBC607F4...dF8bB93A4
0 ETH0.002378224.64257386
Withdraw144006722022-03-17 0:05:18977 days ago1647475518IN
0xaBC607F4...dF8bB93A4
0 ETH0.0049615671.86090403
Withdraw143995762022-03-16 19:48:21977 days ago1647460101IN
0xaBC607F4...dF8bB93A4
0 ETH0.0043243344.80803958
Get Reward143993552022-03-16 18:55:40978 days ago1647456940IN
0xaBC607F4...dF8bB93A4
0 ETH0.0040577353.19110519
Exit143916032022-03-15 14:10:36979 days ago1647353436IN
0xaBC607F4...dF8bB93A4
0 ETH0.0049660745.8874156
Exit143915602022-03-15 14:01:04979 days ago1647352864IN
0xaBC607F4...dF8bB93A4
0 ETH0.0034420842.84767709
Withdraw142161482022-02-16 8:47:221006 days ago1645001242IN
0xaBC607F4...dF8bB93A4
0 ETH0.003651449.47166046
Withdraw142138222022-02-15 23:54:081006 days ago1644969248IN
0xaBC607F4...dF8bB93A4
0 ETH0.01750471253.57391531
Withdraw142136642022-02-15 23:22:561006 days ago1644967376IN
0xaBC607F4...dF8bB93A4
0 ETH0.02024479209.72103859
Withdraw All141921082022-02-12 15:39:161010 days ago1644680356IN
0xaBC607F4...dF8bB93A4
0 ETH0.0059340385.95939789
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PopulousTokenRewardPool

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 150 runs

Other Settings:
default evmVersion
File 1 of 7 : PopulousTokenRewardPool.sol
pragma solidity ^0.5.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}


/*
*   [Hardwork]
*   This pool doesn't mint.
*   the rewards should be first transferred to this pool, then get "notified"
*   by calling `notifyRewardAmount`
*/

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";

contract PopulousTokenRewardPool is Ownable {
    using SafeMath for uint256;

    using Address for address;

    ERC20 public pToken;
    ERC20 public rewardToken;
    uint256 public duration;

    uint256 public periodFinish = 0;

    uint256 public totalDeposit = 0;
    uint256 public totalRewardPaid = 0;

    uint256 public rewardRate = 0;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    mapping(address => uint256) internal userInfo;

    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);
    //event RewardDenied(address indexed user, uint256 reward);

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    constructor(address _pToken,
        address _rewardToken,
        uint256 _duration) public
    {   
        pToken = ERC20(_pToken);
        rewardToken = ERC20(_rewardToken);
        duration = _duration;
    }

    function lastTimeRewardApplicable() public view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() public view returns (uint256) {
        uint256 PTokenSupply = pToken.balanceOf(address(this));
        if (PTokenSupply == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored.add(
                lastTimeRewardApplicable()
                    .sub(lastUpdateTime)
                    .mul(rewardRate)
                    .mul(1e18)
                    .div(PTokenSupply)
            );
    }

    function getuserinfo(address _user) public view returns(uint256 ){
        return userInfo[_user];
    }

    function earned(address account) public view returns (uint256) {
        return
            userInfo[account]
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    // stake visibility is public as overriding LPTokenWrapper's stake() function
    function stake(uint256 amount) public updateReward(msg.sender) {
        //require(msg.sender == exclusiveAddress, "Must be the exclusiveAddress to stake");
        require(amount > 0, "Cannot stake 0");
        //UserInfo storage user = userInfo[msg.sender];
        pToken.transferFrom(address(msg.sender), address(this), amount);
        //user.amount = user.amount.add(amount);
        userInfo[msg.sender] = userInfo[msg.sender].add(amount);
        totalDeposit = totalDeposit.add(amount);
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        userInfo[msg.sender] = userInfo[msg.sender].sub(amount);
        totalDeposit = totalDeposit.sub(amount);
        pToken.transfer(address(msg.sender), amount);
        emit Withdrawn(msg.sender, amount);
    }

    function exit() external {
        withdraw(userInfo[msg.sender]);
        getReward();
    }

    function withdrawAll() external {
        withdraw(userInfo[msg.sender]);
    }

    function getTotalDeposit() public view returns(uint256) {
        return totalDeposit;
    }

    function getTotalRewardPaid() public view returns(uint256) {
        return totalRewardPaid;
    }

    /**
     * A push mechanism for accounts that have not claimed their rewards for a long time.
     * The implementation is semantically analogous to getReward(), but uses a push pattern
     * instead of pull pattern.
     */
    function pushReward(address recipient) public updateReward(recipient) onlyOwner {
        uint256 reward = earned(recipient);
        if (reward > 0) {
            rewards[recipient] = 0;
            totalRewardPaid = totalRewardPaid.add(reward);
            rewardToken.transfer(recipient, reward);
            emit RewardPaid(recipient, reward);
        }
    }

    function getReward() public updateReward(msg.sender) {
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            rewards[msg.sender] = 0;
            totalRewardPaid = totalRewardPaid.add(reward);
            rewardToken.transfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function notifyRewardAmount(uint256 reward)
        external
        onlyOwner
        updateReward(address(0))
    {
        // overflow fix according to https://sips.synthetix.io/sips/sip-77
        require(reward < uint(-1) / 1e18, "the notified reward cannot invoke multiplication overflow");

        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);
    }
}

File 2 of 7 : Context.sol
pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 3 of 7 : SafeMath.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 4 of 7 : Ownable.sol
pragma solidity ^0.5.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 5 of 7 : ERC20.sol
pragma solidity ^0.5.0;

import "../../GSN/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20Mintable}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    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, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    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);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: burn from the zero address");

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }
}

File 6 of 7 : IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 7 of 7 : Address.sol
pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 150
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pToken","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"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":"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":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTotalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalRewardPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getuserinfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"pToken","outputs":[{"internalType":"contract ERC20","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":[{"internalType":"address","name":"recipient","type":"address"}],"name":"pushReward","outputs":[],"payable":false,"stateMutability":"nonpayable","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":[],"name":"rewardToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"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":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRewardPaid","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":false,"inputs":[],"name":"withdrawAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

6080604052600060045560006005556000600655600060075534801561002457600080fd5b506040516113d33803806113d38339818101604052606081101561004757600080fd5b5080516020820151604090920151909190600061006b6001600160e01b036100ed16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039485166001600160a01b03199182161790915560028054939094169216919091179091556003556100f1565b3390565b6112d3806101006000396000f3fe608060405234801561001057600080fd5b50600436106101835760003560e01c80638b876347116100d9578063df136d6511610087578063df136d651461032b578063e9fad8ee14610333578063ebe2b12b1461033b578063f2fde38b14610343578063f6153ccd14610369578063f7c618c114610371578063fa9389a21461037957610183565b80638b876347146102ac5780638da5cb5b146102d25780638f32d59b146102da578063a694fc3a146102f6578063c022215c14610313578063c8f33c911461031b578063cd3daf9d1461032357610183565b80635a632c28116101365780635a632c2814610256578063715018a61461025e5780637b0a47ee1461026657806380faa57d1461026e578063853828b61461027657806386f2f61c1461027e578063877ae75a1461028657610183565b80628cc262146101885780630700037d146101c05780630fb5a6b4146101e65780632e1a7d4d146101ee5780633c6b16ab1461020d5780633d18b9121461022a57806358a06f0714610232575b600080fd5b6101ae6004803603602081101561019e57600080fd5b50356001600160a01b031661039f565b60408051918252519081900360200190f35b6101ae600480360360208110156101d657600080fd5b50356001600160a01b0316610435565b6101ae610447565b61020b6004803603602081101561020457600080fd5b503561044d565b005b61020b6004803603602081101561022357600080fd5b50356105f1565b61020b6107b2565b61023a610901565b604080516001600160a01b039092168252519081900360200190f35b6101ae610910565b61020b610916565b6101ae6109a7565b6101ae6109ad565b61020b6109c1565b6101ae6109dc565b6101ae6004803603602081101561029c57600080fd5b50356001600160a01b03166109e2565b6101ae600480360360208110156102c257600080fd5b50356001600160a01b03166109fd565b61023a610a0f565b6102e2610a1e565b604080519115158252519081900360200190f35b61020b6004803603602081101561030c57600080fd5b5035610a42565b6101ae610be9565b6101ae610bef565b6101ae610bf5565b6101ae610cca565b61020b610cd0565b6101ae610cf1565b61020b6004803603602081101561035957600080fd5b50356001600160a01b0316610cf7565b6101ae610d4a565b61023a610d50565b61020b6004803603602081101561038f57600080fd5b50356001600160a01b0316610d5f565b6001600160a01b0381166000908152600b6020908152604080832054600a90925282205461042f919061042390670de0b6b3a764000090610417906103f2906103e6610bf5565b9063ffffffff610f0a16565b6001600160a01b0388166000908152600c60205260409020549063ffffffff610f5316565b9063ffffffff610fac16565b9063ffffffff610fee16565b92915050565b600b6020526000908152604090205481565b60035481565b33610456610bf5565b6009556104616109ad565b6008556001600160a01b038116156104a85761047c8161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b600082116104f1576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b336000908152600c6020526040902054610511908363ffffffff610f0a16565b336000908152600c6020526040902055600554610534908363ffffffff610f0a16565b6005556001546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561058b57600080fd5b505af115801561059f573d6000803e3d6000fd5b505050506040513d60208110156105b557600080fd5b505060408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b6105f9610a1e565b610638576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b6000610642610bf5565b60095561064d6109ad565b6008556001600160a01b03811615610694576106688161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b7812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2182106106eb5760405162461bcd60e51b81526004018080602001828103825260398152602001806112256039913960400191505060405180910390fd5b60045442106107105760035461070890839063ffffffff610fac16565b60075561075f565b600454600090610726904263ffffffff610f0a16565b9050600061073f60075483610f5390919063ffffffff16565b60035490915061075990610417868463ffffffff610fee16565b60075550505b426008819055600354610778919063ffffffff610fee16565b6004556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b336107bb610bf5565b6009556107c66109ad565b6008556001600160a01b0381161561080d576107e18161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60006108183361039f565b905080156108fd57336000908152600b6020526040812055600654610843908263ffffffff610fee16565b6006556002546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561089a57600080fd5b505af11580156108ae573d6000803e3d6000fd5b505050506040513d60208110156108c457600080fd5b505060408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6001546001600160a01b031681565b60065481565b61091e610a1e565b61095d576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60075481565b60006109bb42600454611048565b90505b90565b336000908152600c60205260409020546109da9061044d565b565b60065490565b6001600160a01b03166000908152600c602052604090205490565b600a6020526000908152604090205481565b6000546001600160a01b031690565b600080546001600160a01b0316610a3361105e565b6001600160a01b031614905090565b33610a4b610bf5565b600955610a566109ad565b6008556001600160a01b03811615610a9d57610a718161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60008211610ae3576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610b3d57600080fd5b505af1158015610b51573d6000803e3d6000fd5b505050506040513d6020811015610b6757600080fd5b5050336000908152600c6020526040902054610b89908363ffffffff610fee16565b336000908152600c6020526040902055600554610bac908363ffffffff610fee16565b60055560408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60055490565b60085481565b600154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610c4557600080fd5b505afa158015610c59573d6000803e3d6000fd5b505050506040513d6020811015610c6f57600080fd5b5051905080610c825750506009546109be565b610cc4610cb582610417670de0b6b3a7640000610ca9600754610ca96008546103e66109ad565b9063ffffffff610f5316565b6009549063ffffffff610fee16565b91505090565b60095481565b336000908152600c6020526040902054610ce99061044d565b6109da6107b2565b60045481565b610cff610a1e565b610d3e576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b610d4781611062565b50565b60055481565b6002546001600160a01b031681565b80610d68610bf5565b600955610d736109ad565b6008556001600160a01b03811615610dba57610d8e8161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b610dc2610a1e565b610e01576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b6000610e0c8361039f565b90508015610f05576001600160a01b0383166000908152600b6020526040812055600654610e40908263ffffffff610fee16565b6006556002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610e9957600080fd5b505af1158015610ead573d6000803e3d6000fd5b505050506040513d6020811015610ec357600080fd5b50506040805182815290516001600160a01b038516917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505050565b6000610f4c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611102565b9392505050565b600082610f625750600061042f565b82820282848281610f6f57fe5b0414610f4c5760405162461bcd60e51b815260040180806020018281038252602181526020018061125e6021913960400191505060405180910390fd5b6000610f4c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611199565b600082820183811015610f4c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008183106110575781610f4c565b5090919050565b3390565b6001600160a01b0381166110a75760405162461bcd60e51b81526004018080602001828103825260268152602001806111ff6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156111915760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561115657818101518382015260200161113e565b50505050905090810190601f1680156111835780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836111e85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561115657818101518382015260200161113e565b5060008385816111f457fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373746865206e6f746966696564207265776172642063616e6e6f7420696e766f6b65206d756c7469706c69636174696f6e206f766572666c6f77536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a7231582026e1e5008b39dac5430ca3304e3cfb04a1630bb50226c63747bf3392875fc6be64736f6c63430005100032000000000000000000000000d4fa1460f537bb9085d22c7bccb5dd450ef28e3a000000000000000000000000c14830e53aa344e8c14603a91229a0b925b0b2620000000000000000000000000000000000000000000000000000000000093a80

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101835760003560e01c80638b876347116100d9578063df136d6511610087578063df136d651461032b578063e9fad8ee14610333578063ebe2b12b1461033b578063f2fde38b14610343578063f6153ccd14610369578063f7c618c114610371578063fa9389a21461037957610183565b80638b876347146102ac5780638da5cb5b146102d25780638f32d59b146102da578063a694fc3a146102f6578063c022215c14610313578063c8f33c911461031b578063cd3daf9d1461032357610183565b80635a632c28116101365780635a632c2814610256578063715018a61461025e5780637b0a47ee1461026657806380faa57d1461026e578063853828b61461027657806386f2f61c1461027e578063877ae75a1461028657610183565b80628cc262146101885780630700037d146101c05780630fb5a6b4146101e65780632e1a7d4d146101ee5780633c6b16ab1461020d5780633d18b9121461022a57806358a06f0714610232575b600080fd5b6101ae6004803603602081101561019e57600080fd5b50356001600160a01b031661039f565b60408051918252519081900360200190f35b6101ae600480360360208110156101d657600080fd5b50356001600160a01b0316610435565b6101ae610447565b61020b6004803603602081101561020457600080fd5b503561044d565b005b61020b6004803603602081101561022357600080fd5b50356105f1565b61020b6107b2565b61023a610901565b604080516001600160a01b039092168252519081900360200190f35b6101ae610910565b61020b610916565b6101ae6109a7565b6101ae6109ad565b61020b6109c1565b6101ae6109dc565b6101ae6004803603602081101561029c57600080fd5b50356001600160a01b03166109e2565b6101ae600480360360208110156102c257600080fd5b50356001600160a01b03166109fd565b61023a610a0f565b6102e2610a1e565b604080519115158252519081900360200190f35b61020b6004803603602081101561030c57600080fd5b5035610a42565b6101ae610be9565b6101ae610bef565b6101ae610bf5565b6101ae610cca565b61020b610cd0565b6101ae610cf1565b61020b6004803603602081101561035957600080fd5b50356001600160a01b0316610cf7565b6101ae610d4a565b61023a610d50565b61020b6004803603602081101561038f57600080fd5b50356001600160a01b0316610d5f565b6001600160a01b0381166000908152600b6020908152604080832054600a90925282205461042f919061042390670de0b6b3a764000090610417906103f2906103e6610bf5565b9063ffffffff610f0a16565b6001600160a01b0388166000908152600c60205260409020549063ffffffff610f5316565b9063ffffffff610fac16565b9063ffffffff610fee16565b92915050565b600b6020526000908152604090205481565b60035481565b33610456610bf5565b6009556104616109ad565b6008556001600160a01b038116156104a85761047c8161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b600082116104f1576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b336000908152600c6020526040902054610511908363ffffffff610f0a16565b336000908152600c6020526040902055600554610534908363ffffffff610f0a16565b6005556001546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561058b57600080fd5b505af115801561059f573d6000803e3d6000fd5b505050506040513d60208110156105b557600080fd5b505060408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b6105f9610a1e565b610638576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b6000610642610bf5565b60095561064d6109ad565b6008556001600160a01b03811615610694576106688161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b7812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f2182106106eb5760405162461bcd60e51b81526004018080602001828103825260398152602001806112256039913960400191505060405180910390fd5b60045442106107105760035461070890839063ffffffff610fac16565b60075561075f565b600454600090610726904263ffffffff610f0a16565b9050600061073f60075483610f5390919063ffffffff16565b60035490915061075990610417868463ffffffff610fee16565b60075550505b426008819055600354610778919063ffffffff610fee16565b6004556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b336107bb610bf5565b6009556107c66109ad565b6008556001600160a01b0381161561080d576107e18161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60006108183361039f565b905080156108fd57336000908152600b6020526040812055600654610843908263ffffffff610fee16565b6006556002546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561089a57600080fd5b505af11580156108ae573d6000803e3d6000fd5b505050506040513d60208110156108c457600080fd5b505060408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6001546001600160a01b031681565b60065481565b61091e610a1e565b61095d576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60075481565b60006109bb42600454611048565b90505b90565b336000908152600c60205260409020546109da9061044d565b565b60065490565b6001600160a01b03166000908152600c602052604090205490565b600a6020526000908152604090205481565b6000546001600160a01b031690565b600080546001600160a01b0316610a3361105e565b6001600160a01b031614905090565b33610a4b610bf5565b600955610a566109ad565b6008556001600160a01b03811615610a9d57610a718161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60008211610ae3576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610b3d57600080fd5b505af1158015610b51573d6000803e3d6000fd5b505050506040513d6020811015610b6757600080fd5b5050336000908152600c6020526040902054610b89908363ffffffff610fee16565b336000908152600c6020526040902055600554610bac908363ffffffff610fee16565b60055560408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b60055490565b60085481565b600154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610c4557600080fd5b505afa158015610c59573d6000803e3d6000fd5b505050506040513d6020811015610c6f57600080fd5b5051905080610c825750506009546109be565b610cc4610cb582610417670de0b6b3a7640000610ca9600754610ca96008546103e66109ad565b9063ffffffff610f5316565b6009549063ffffffff610fee16565b91505090565b60095481565b336000908152600c6020526040902054610ce99061044d565b6109da6107b2565b60045481565b610cff610a1e565b610d3e576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b610d4781611062565b50565b60055481565b6002546001600160a01b031681565b80610d68610bf5565b600955610d736109ad565b6008556001600160a01b03811615610dba57610d8e8161039f565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b610dc2610a1e565b610e01576040805162461bcd60e51b8152602060048201819052602482015260008051602061127f833981519152604482015290519081900360640190fd5b6000610e0c8361039f565b90508015610f05576001600160a01b0383166000908152600b6020526040812055600654610e40908263ffffffff610fee16565b6006556002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610e9957600080fd5b505af1158015610ead573d6000803e3d6000fd5b505050506040513d6020811015610ec357600080fd5b50506040805182815290516001600160a01b038516917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505050565b6000610f4c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611102565b9392505050565b600082610f625750600061042f565b82820282848281610f6f57fe5b0414610f4c5760405162461bcd60e51b815260040180806020018281038252602181526020018061125e6021913960400191505060405180910390fd5b6000610f4c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611199565b600082820183811015610f4c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008183106110575781610f4c565b5090919050565b3390565b6001600160a01b0381166110a75760405162461bcd60e51b81526004018080602001828103825260268152602001806111ff6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081848411156111915760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561115657818101518382015260200161113e565b50505050905090810190601f1680156111835780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836111e85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561115657818101518382015260200161113e565b5060008385816111f457fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373746865206e6f746966696564207265776172642063616e6e6f7420696e766f6b65206d756c7469706c69636174696f6e206f766572666c6f77536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a7231582026e1e5008b39dac5430ca3304e3cfb04a1630bb50226c63747bf3392875fc6be64736f6c63430005100032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000d4fa1460f537bb9085d22c7bccb5dd450ef28e3a000000000000000000000000c14830e53aa344e8c14603a91229a0b925b0b2620000000000000000000000000000000000000000000000000000000000093a80

-----Decoded View---------------
Arg [0] : _pToken (address): 0xd4fa1460F537bb9085d22C7bcCB5DD450Ef28e3a
Arg [1] : _rewardToken (address): 0xc14830E53aA344E8c14603A91229A0b925b0B262
Arg [2] : _duration (uint256): 604800

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d4fa1460f537bb9085d22c7bccb5dd450ef28e3a
Arg [1] : 000000000000000000000000c14830e53aa344e8c14603a91229a0b925b0b262
Arg [2] : 0000000000000000000000000000000000000000000000000000000000093a80


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.