ETH Price: $3,168.84 (-4.06%)
Gas: 10 Gwei

Contract

0x37f70E7CDe787127bBe5b54120047966ce443aE2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim Rewards125886912021-06-07 17:23:061122 days ago1623086586IN
0x37f70E7C...6ce443aE2
0 ETH0.0069381270
Claim Rewards124439312021-05-16 6:34:201145 days ago1621146860IN
0x37f70E7C...6ce443aE2
0 ETH0.0032168854
Claim Rewards124322862021-05-14 11:41:051146 days ago1620992465IN
0x37f70E7C...6ce443aE2
0 ETH0.0048253381
Claim Rewards124251682021-05-13 9:12:481148 days ago1620897168IN
0x37f70E7C...6ce443aE2
0 ETH0.01189232145
Claim Rewards124018712021-05-09 18:49:511151 days ago1620586191IN
0x37f70E7C...6ce443aE2
0 ETH0.0063152377
Claim Rewards123963232021-05-08 22:18:351152 days ago1620512315IN
0x37f70E7C...6ce443aE2
0 ETH0.01754353177
Claim Rewards123940442021-05-08 13:54:551152 days ago1620482095IN
0x37f70E7C...6ce443aE2
0 ETH0.01526386154
Claim Rewards123905912021-05-08 1:10:331153 days ago1620436233IN
0x37f70E7C...6ce443aE2
0 ETH0.0026807445
Claim Rewards123894142021-05-07 20:45:441153 days ago1620420344IN
0x37f70E7C...6ce443aE2
0 ETH0.005659169
Claim Rewards123867182021-05-07 10:51:511154 days ago1620384711IN
0x37f70E7C...6ce443aE2
0 ETH0.0047575648
Claim Rewards123861212021-05-07 8:36:231154 days ago1620376583IN
0x37f70E7C...6ce443aE2
0 ETH0.0046584547
Claim Rewards123856452021-05-07 6:45:211154 days ago1620369921IN
0x37f70E7C...6ce443aE2
0 ETH0.0036907245
Claim Rewards123845432021-05-07 2:44:181154 days ago1620355458IN
0x37f70E7C...6ce443aE2
0 ETH0.0050549151
Claim Rewards123839692021-05-07 0:28:071154 days ago1620347287IN
0x37f70E7C...6ce443aE2
0 ETH0.0047569258
Claim Rewards123837502021-05-06 23:35:101154 days ago1620344110IN
0x37f70E7C...6ce443aE2
0 ETH0.0032764655
Claim Rewards123831912021-05-06 21:30:041154 days ago1620336604IN
0x37f70E7C...6ce443aE2
0 ETH0.0027998847
Claim Rewards123829442021-05-06 20:34:031154 days ago1620333243IN
0x37f70E7C...6ce443aE2
0 ETH0.0054210591
Claim Rewards123822562021-05-06 18:07:511154 days ago1620324471IN
0x37f70E7C...6ce443aE2
0 ETH0.003812664
Claim Rewards123819822021-05-06 17:08:221154 days ago1620320902IN
0x37f70E7C...6ce443aE2
0 ETH0.00613591103
Claim Rewards123812792021-05-06 14:30:551154 days ago1620311455IN
0x37f70E7C...6ce443aE2
0 ETH0.0042648352
Claim Rewards123812402021-05-06 14:24:141154 days ago1620311054IN
0x37f70E7C...6ce443aE2
0 ETH0.0077310478
Claim Rewards123805372021-05-06 11:43:051154 days ago1620301385IN
0x37f70E7C...6ce443aE2
0 ETH0.0014775244
Claim Rewards123805362021-05-06 11:43:021154 days ago1620301382IN
0x37f70E7C...6ce443aE2
0 ETH0.0025222544
Claim Rewards123805362021-05-06 11:43:021154 days ago1620301382IN
0x37f70E7C...6ce443aE2
0 ETH0.0072994289
Claim Rewards123805322021-05-06 11:41:361154 days ago1620301296IN
0x37f70E7C...6ce443aE2
0 ETH0.0044602245
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:
PopReward

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 600 runs

Other Settings:
default evmVersion
File 1 of 12 : PopReward.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./PopToken.sol";
import "./interfaces/IRewardManager.sol";

// stolen from Sushiswap MasterChef: https://github.com/sushiswap/sushiswap/blob/master/contracts/MasterChef.sol
contract PopReward is Ownable, IRewardManager {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt
    }

    // Info of each pool.
    struct PoolInfo {
        uint256 allocPoint; // How many allocation points assigned to this pool. POPs to distribute per block.
        uint256 lastRewardBlock; // Last block number that POPs distribution occurs.
        uint256 accPopPerShare; // Accumulated POPs per share, times 1e12. See below.
        uint256 lpSupply; // Total amount of lp token staked
    }

    PopToken private immutable pop;
    // Block number when bonus POP period ends.
    uint256 public bonusEndBlock;
    // POP tokens created per block.
    uint256 public popPerBlock;
    // Bonus multiplier for early pop makers.
    uint256 public constant BONUS_MULTIPLIER = 10;
    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when POP mining starts.
    uint256 public startBlock;
    // authorized MLPs
    mapping(address => uint256) public pidByAddress;
    address popMarketplace;
    mapping(address => bool) public authorizedMlp;

    PoolInfo public popVault;
    mapping(address => UserInfo) public popStaker;

    event PopDeposit(address indexed user, uint256 amount);
    event PopWithdraw(address indexed user, uint256 amount);

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event RewardPaid(address indexed user, uint256 indexed pid, uint256 amount);

    constructor(
        PopToken _pop,
        uint256 _popPerBlock,
        uint256 _startBlock,
        uint256 _bonusEndBlock,
        uint256 _popAllocPoint,
        uint256 _popVaultStarts
    ) public {
        pop = _pop;
        popPerBlock = _popPerBlock;
        bonusEndBlock = _bonusEndBlock;
        startBlock = _startBlock;
        popVault = PoolInfo({
            allocPoint: _popAllocPoint,
            lastRewardBlock: _popVaultStarts,
            accPopPerShare: 0,
            lpSupply: 0
        });
        totalAllocPoint = _popAllocPoint;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    function getPoolSupply(address pool)
        public
        view
        override
        returns (uint256)
    {
        return poolInfo[pidByAddress[pool]].lpSupply;
    }

    function getUserAmount(address pool, address user)
        public
        view
        override
        returns (uint256)
    {
        return userInfo[pidByAddress[pool]][user].amount;
    }

    function setPopMarketplace(address _newMarketplace) public onlyOwner {
        require(_newMarketplace != address(0), "Address can not be 0");
        popMarketplace = _newMarketplace;
    }

    // Add a new pool. Can only be called by the PopMarketplace.
    function add(uint256 _allocPoint, address _newMlp) public override {
        require(
            msg.sender == popMarketplace,
            "only the marketplace can add a pool"
        );
        uint256 lastRewardBlock =
            block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                allocPoint: _allocPoint,
                lastRewardBlock: lastRewardBlock,
                accPopPerShare: 0,
                lpSupply: 0
            })
        );
        pidByAddress[_newMlp] = poolInfo.length - 1;
        authorizedMlp[_newMlp] = true;
    }

    // Update the given pool's POP allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        bool _withUpdate
    ) public onlyOwner {
        PoolInfo storage pool = poolInfo[_pid];
        _set(pool, _allocPoint, _withUpdate);
    }

    function _set(
        PoolInfo storage pool,
        uint256 _allocPoint,
        bool _withUpdate
    ) private {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint);
        pool.allocPoint = _allocPoint;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)
        public
        view
        returns (uint256)
    {
        if (_to <= bonusEndBlock) {
            return _to.sub(_from).mul(BONUS_MULTIPLIER);
        } else if (_from >= bonusEndBlock) {
            return _to.sub(_from);
        } else {
            return
                bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER).add(
                    _to.sub(bonusEndBlock)
                );
        }
    }

    // View function to see pending POPs on frontend.
    function pendingPop(uint256 _pid, address _user)
        external
        view
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        return _pendingPop(pool, user);
    }

    function _pendingPop(PoolInfo storage pool, UserInfo storage user)
        private
        view
        returns (uint256)
    {
        uint256 accPopPerShare = pool.accPopPerShare;
        uint256 lpSupply = pool.lpSupply;
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier =
                getMultiplier(pool.lastRewardBlock, block.number);
            uint256 popReward =
                multiplier.mul(popPerBlock).mul(pool.allocPoint).div(
                    totalAllocPoint
                );
            accPopPerShare = accPopPerShare.add(
                popReward.mul(1e12).div(lpSupply)
            );
        }
        return user.amount.mul(accPopPerShare).div(1e12).sub(user.rewardDebt);
    }

    function vaultPendingPop(address _account) external view returns (uint256) {
        UserInfo storage user = popStaker[_account];
        return _pendingPop(popVault, user);
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        return _updatePool(pool);
    }

    function _updatePool(PoolInfo storage pool) private {
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpSupply;
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 popReward =
            multiplier.mul(popPerBlock).mul(pool.allocPoint).div(
                totalAllocPoint
            );
        pop.mintTo(address(this), popReward);
        pool.accPopPerShare = pool.accPopPerShare.add(
            popReward.mul(1e12).div(lpSupply)
        );
        pool.lastRewardBlock = block.number;
    }

    // Notify the amount of LP tokens staked in the PopVault.
    function notifyDeposit(address _account, uint256 _amount) public override {
        require(authorizedMlp[msg.sender], "unauthorized sender");
        uint256 _pid = pidByAddress[msg.sender];
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_account];
        updatePool(_pid);
        _notifyDeposit(_account, pool, user, _amount);
        emit Deposit(_account, _pid, _amount);
    }

    function _notifyDeposit(
        address _account,
        PoolInfo storage pool,
        UserInfo storage user,
        uint256 _amount
    ) private {
        if (user.amount > 0) {
            uint256 pending =
                user.amount.mul(pool.accPopPerShare).div(1e12).sub(
                    user.rewardDebt
                );
            safePopTransfer(_account, pending);
        }
        pool.lpSupply = pool.lpSupply.add(_amount);
        user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accPopPerShare).div(1e12);
    }

    // Notify the amount of LP token withdrawn from the PopVault.
    function notifyWithdraw(address _account, uint256 _amount) public override {
        require(authorizedMlp[msg.sender], "unauthorized sender");
        uint256 _pid = pidByAddress[msg.sender];
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_account];
        updatePool(_pid);
        _notifyWithdraw(_account, pool, user, _amount, _pid);
        emit Withdraw(_account, _pid, _amount);
    }

    function _notifyWithdraw(
        address _account,
        PoolInfo storage pool,
        UserInfo storage user,
        uint256 _amount,
        uint256 _pid
    ) private {
        require(user.amount >= _amount, "withdraw: not good");
        uint256 pending =
            user.amount.mul(pool.accPopPerShare).div(1e12).sub(user.rewardDebt);
        safePopTransfer(_account, pending);
        user.amount = user.amount.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accPopPerShare).div(1e12);
        pool.lpSupply = pool.lpSupply.sub(_amount);
        emit RewardPaid(_account, _pid, pending);
    }

    // Safe pop transfer function, just in case if rounding error causes pool to not have enough POPs.
    function safePopTransfer(address _to, uint256 _amount) internal {
        uint256 popBal = pop.balanceOf(address(this)).sub(popVault.lpSupply);
        if (_amount > popBal) {
            pop.transfer(_to, popBal);
        } else {
            pop.transfer(_to, _amount);
        }
    }

    function stakePop(uint256 _amount) public {
        UserInfo storage user = popStaker[msg.sender];
        updatePopVault();
        _notifyDeposit(msg.sender, popVault, user, _amount);
        require(pop.transferFrom(msg.sender, address(this), _amount),"transfer failed");
        emit PopDeposit(msg.sender, _amount);
    }

    function withdrawPop(uint256 _amount) public {
        UserInfo storage user = popStaker[msg.sender];
        updatePopVault();
        _notifyWithdraw(msg.sender, popVault, user, _amount,0);
        require(pop.transfer(msg.sender, _amount),"transfer failed");
        emit PopWithdraw(msg.sender, _amount);
    }

    function updatePopVault() public {
        _updatePool(popVault);
    }

    function setPopVault(uint256 _allocPoint) public onlyOwner {
        _set(popVault, _allocPoint, false);
    }

    function setPopVaultStartBlock(uint256 _startBlock) external onlyOwner {
        popVault.lastRewardBlock = _startBlock;
    }

    function claimRewards(uint256 _poolId) external {
        updatePool(_poolId);
        _harvest(_poolId);
    }

    function _harvest(uint256 _poolId) internal {
        PoolInfo storage pool = poolInfo[_poolId];
        UserInfo storage user = userInfo[_poolId][msg.sender];
        if (user.amount == 0) return;
        uint256 pending =
            user.amount.mul(pool.accPopPerShare).div(1e12).sub(user.rewardDebt);
        if (pending > 0) {
            user.rewardDebt = user.amount.mul(pool.accPopPerShare).div(1e12);
            // Pay out the pending rewards
            safePopTransfer(msg.sender, pending);
            emit RewardPaid(msg.sender, _poolId, pending);
            return;
        }
        user.rewardDebt = user.amount.mul(pool.accPopPerShare).div(1e12);
    }
}

File 2 of 12 : PopToken.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.6;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IMintableERC20.sol";

contract PopToken is ERC20("POP Token", "POP!"), IMintableERC20, Ownable  {
    mapping(address => bool) public minter;
    uint public maxSupply;

    event MinterUpdate(address indexed account, bool isMinter);

    constructor(uint _maxSupply) public {
        maxSupply = _maxSupply;
    }

    modifier onlyMinter() {
        require(minter[_msgSender()],"User is not a minter.");
        _;
    }

    function mint(uint _amount) public onlyMinter override {
        require(totalSupply().add(_amount) <= maxSupply, "cannot mint more than maxSupply");
        _mint(_msgSender(), _amount);
    }

    function mintTo(address _account, uint _amount) public onlyMinter override {
        require(totalSupply().add(_amount) <= maxSupply, "cannot mint more than maxSupply");
        _mint(_account, _amount);
    }

    function setMinter(address _account, bool _isMinter) public override onlyOwner {
        require(_account != address(0),"address can not be 0");
        minter[_account] = _isMinter;
        emit MinterUpdate(_account, _isMinter);
    }

    function burn(uint _amount) public override {
        _burn(_msgSender(), _amount);
    }
}

File 3 of 12 : IMintableERC20.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

abstract contract IMintableERC20 is IERC20 {
    function mint(uint amount) public virtual;
    function mintTo(address account, uint amount) public virtual;
    function burn(uint amount) public virtual;
    function setMinter(address account, bool isMinter) public virtual;
}

File 4 of 12 : IRewardManager.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.6.6;

abstract contract IRewardManager {
    function add(uint256 _allocPoint, address _newMlp) public virtual;
    function notifyDeposit(address _account, uint256 _amount) public virtual;
    function notifyWithdraw(address _account, uint256 _amount) public virtual;
    function getPoolSupply(address pool) public view virtual returns(uint);
    function getUserAmount(address pool, address user) public view virtual returns(uint);
}

File 5 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * 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.
 */
abstract 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 virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the 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 virtual 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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 6 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 7 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/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 {ERC20PresetMinterPauser}.
 *
 * 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;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override 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 virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override 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 virtual override 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 virtual 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 virtual 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 virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _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 virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _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 virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _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 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 virtual {
        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 Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 8 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 9 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
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));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        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, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 12 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @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].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

File 12 of 12 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract PopToken","name":"_pop","type":"address"},{"internalType":"uint256","name":"_popPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"},{"internalType":"uint256","name":"_popAllocPoint","type":"uint256"},{"internalType":"uint256","name":"_popVaultStarts","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PopDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PopWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"address","name":"_newMlp","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedMlp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"getPoolSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getUserAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"notifyDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"notifyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingPop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pidByAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accPopPerShare","type":"uint256"},{"internalType":"uint256","name":"lpSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"popPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"popStaker","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"popVault","outputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accPopPerShare","type":"uint256"},{"internalType":"uint256","name":"lpSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newMarketplace","type":"address"}],"name":"setPopMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"setPopVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"setPopVaultStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakePop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePopVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"vaultPendingPop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawPop","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052600060055534801561001557600080fd5b50604051611ddb380380611ddb833981810160405260c081101561003857600080fd5b508051602082015160408301516060840151608085015160a090950151939492939192909160006100706001600160e01b0361011d16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160601b0319606096871b16608090815260029590955560019290925560069290925560408051938401815282845260208401829052600090840181905292909301829052600a819055600b92909255600c819055600d55600555610121565b3390565b60805160601c611c84610157600039806109c45280611263528061156752806119f85280611a825280611b345250611c846000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c80638600e40b1161012a578063ab53bddc116100bd578063d756aadc1161008c578063f2cb469011610071578063f2cb4690146105cd578063f2fde38b146105d5578063fdd45eca146105fb5761020b565b8063d756aadc14610584578063e8b21f98146105a15761020b565b8063ab53bddc146104db578063b21d81db14610507578063bc4763a114610541578063ccadfc13146105675761020b565b806393f1a40b116100f957806393f1a40b146104535780639f1916591461047f578063a4700044146104ad578063a9472269146104d35761020b565b80638600e40b146103d85780638aa28550146104045780638da5cb5b1461040c5780638dbb1e3a146104305761020b565b806348cd4cb1116101a257806364482f791161017157806364482f79146103805780636793850e146103ab57806370da05d3146103b3578063715018a6146103d05761020b565b806348cd4cb11461032d57806351eb05a6146103355780635cfe169714610352578063630b5ba1146103785761020b565b80631aed6553116101de5780631aed6553146102945780632b8bbbe81461029c5780632f8d3a66146102c8578063337a5c76146102ee5761020b565b8063081e3eda146102105780630962ef791461022a5780631526fe271461024957806317caf6f11461028c575b600080fd5b610218610618565b60408051918252519081900360200190f35b6102476004803603602081101561024057600080fd5b503561061e565b005b6102666004803603602081101561025f57600080fd5b5035610633565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61021861066a565b610218610670565b610247600480360360408110156102b257600080fd5b50803590602001356001600160a01b0316610676565b610218600480360360208110156102de57600080fd5b50356001600160a01b03166107f4565b6103146004803603602081101561030457600080fd5b50356001600160a01b0316610835565b6040805192835260208301919091528051918290030190f35b61021861084e565b6102476004803603602081101561034b57600080fd5b5035610854565b6102186004803603602081101561036857600080fd5b50356001600160a01b0316610880565b6102476108aa565b6102476004803603606081101561039657600080fd5b508035906020810135906040013515156108c9565b61021861096d565b610247600480360360208110156103c957600080fd5b5035610973565b610247610ab5565b610247600480360360408110156103ee57600080fd5b506001600160a01b038135169060200135610b73565b610218610c7c565b610414610c81565b604080516001600160a01b039092168252519081900360200190f35b6102186004803603604081101561044657600080fd5b5080359060200135610c90565b6103146004803603604081101561046957600080fd5b50803590602001356001600160a01b0316610d20565b6102186004803603604081101561049557600080fd5b506001600160a01b0381358116916020013516610d44565b610247600480360360208110156104c357600080fd5b50356001600160a01b0316610d79565b610266610e6a565b610247600480360360408110156104f157600080fd5b506001600160a01b038135169060200135610e79565b61052d6004803603602081101561051d57600080fd5b50356001600160a01b0316610f81565b604080519115158252519081900360200190f35b6102186004803603602081101561055757600080fd5b50356001600160a01b0316610f96565b6102476004803603602081101561057d57600080fd5b5035610fa8565b6102476004803603602081101561059a57600080fd5b5035611029565b610218600480360360408110156105b757600080fd5b50803590602001356001600160a01b03166110a2565b6102476110f6565b610247600480360360208110156105eb57600080fd5b50356001600160a01b0316611102565b6102476004803603602081101561061157600080fd5b5035611216565b60035490565b61062781610854565b61063081611354565b50565b6003818154811061064057fe5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b60055481565b60015481565b6008546001600160a01b031633146106bf5760405162461bcd60e51b8152600401808060200182810382526023815260200180611c0b6023913960400191505060405180910390fd5b600060065443116106d2576006546106d4565b435b6005549091506106ea908463ffffffff61148616565b600555604080516080810182529384526020808501928352600085830181815260608701828152600380546001808201835582865299517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60049092029182015596517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c88015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d870155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e9095019490945592546001600160a01b039490941683526007815281832060001994909401909355600990925220805460ff19169091179055565b6001600160a01b03811660009081526007602052604081205460038054909190811061081c57fe5b9060005260206000209060040201600301549050919050565b600e602052600090815260409020805460019091015482565b60065481565b60006003828154811061086357fe5b9060005260206000209060040201905061087c816114e0565b5050565b6001600160a01b0381166000908152600e602052604081206108a3600a82611608565b9392505050565b60035460005b8181101561087c576108c181610854565b6001016108b0565b6108d16116bd565b6001600160a01b03166108e2610c81565b6001600160a01b03161461093d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60006003848154811061094c57fe5b906000526020600020906004020190506109678184846116c1565b50505050565b60025481565b336000908152600e6020526040902061098a6110f6565b61099733600a83856116f1565b604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916323b872dd9160648083019260209291908290030181600087803b158015610a0c57600080fd5b505af1158015610a20573d6000803e3d6000fd5b505050506040513d6020811015610a3657600080fd5b5051610a7b576040805162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b60408051838152905133917f7c6ffa74de4e2c29c3eb18ff72c6878b93130806f744da5fb868db919dc8e0a7919081900360200190a25050565b610abd6116bd565b6001600160a01b0316610ace610c81565b6001600160a01b031614610b29576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b3360009081526009602052604090205460ff16610bcd576040805162461bcd60e51b81526020600482015260136024820152723ab730baba3437b934bd32b21039b2b73232b960691b604482015290519081900360640190fd5b336000908152600760205260408120546003805491929183908110610bee57fe5b60009182526020808320858452600480835260408086206001600160a01b038b1687529093529190932091029091019150610c2883610854565b610c358583838787611783565b60408051858152905184916001600160a01b038816917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b600a81565b6000546001600160a01b031690565b60006001548211610cc357610cbc600a610cb0848663ffffffff6118af16565b9063ffffffff61190c16565b9050610d1a565b6001548310610cdc57610cbc828463ffffffff6118af16565b610cbc610cf4600154846118af90919063ffffffff16565b610d0e600a610cb0876001546118af90919063ffffffff16565b9063ffffffff61148616565b92915050565b60046020908152600092835260408084209091529082529020805460019091015482565b6001600160a01b0391821660009081526007602090815260408083205483526004825280832093909416825291909152205490565b610d816116bd565b6001600160a01b0316610d92610c81565b6001600160a01b031614610ded576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610e48576040805162461bcd60e51b815260206004820152601460248201527f416464726573732063616e206e6f742062652030000000000000000000000000604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b600a54600b54600c54600d5484565b3360009081526009602052604090205460ff16610ed3576040805162461bcd60e51b81526020600482015260136024820152723ab730baba3437b934bd32b21039b2b73232b960691b604482015290519081900360640190fd5b336000908152600760205260408120546003805491929183908110610ef457fe5b60009182526020808320858452600480835260408086206001600160a01b038b1687529093529190932091029091019150610f2e83610854565b610f3a858383876116f1565b60408051858152905184916001600160a01b038816917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60096020526000908152604090205460ff1681565b60076020526000908152604090205481565b610fb06116bd565b6001600160a01b0316610fc1610c81565b6001600160a01b03161461101c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610630600a8260006116c1565b6110316116bd565b6001600160a01b0316611042610c81565b6001600160a01b03161461109d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600b55565b600080600384815481106110b257fe5b60009182526020808320878452600480835260408086206001600160a01b038a16875290935291909320910290910191506110ed8282611608565b95945050505050565b611100600a6114e0565b565b61110a6116bd565b6001600160a01b031661111b610c81565b6001600160a01b031614611176576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166111bb5760405162461bcd60e51b8152600401808060200182810382526026815260200180611be56026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e6020526040902061122d6110f6565b61123c33600a83856000611783565b6040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb9160448083019260209291908290030181600087803b1580156112ab57600080fd5b505af11580156112bf573d6000803e3d6000fd5b505050506040513d60208110156112d557600080fd5b505161131a576040805162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b60408051838152905133917fe1c1b3a627e55787c786b5530520592ec76f3262a1f392f8d56542466c5c70bf919081900360200190a25050565b60006003828154811061136357fe5b600091825260208083208584526004808352604080862033875290935291909320805492909102909201925061139a575050610630565b60006113e082600101546113d464e8d4a510006113c88760020154876000015461190c90919063ffffffff16565b9063ffffffff61196516565b9063ffffffff6118af16565b9050801561145757600283015482546114099164e8d4a51000916113c89163ffffffff61190c16565b600183015561141833826119cc565b604080518281529051859133917fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f519181900360200190a3505050610630565b600283015482546114789164e8d4a51000916113c89163ffffffff61190c16565b826001018190555050505050565b6000828201838110156108a3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b806001015443116114f057610630565b6003810154806115065750436001820155610630565b6000611516836001015443610c90565b9050600061153d6005546113c88660000154610cb06002548761190c90919063ffffffff16565b604080516308934a5f60e31b81523060048201526024810183905290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163449a52f89160448082019260009290919082900301818387803b1580156115af57600080fd5b505af11580156115c3573d6000803e3d6000fd5b505050506115f76115e6846113c864e8d4a510008561190c90919063ffffffff16565b60028601549063ffffffff61148616565b600285015550504360018301555050565b60028201546003830154600184015460009291904311801561162957508015155b1561169557600061163e866001015443610c90565b905060006116656005546113c88960000154610cb06002548761190c90919063ffffffff16565b9050611690611683846113c88464e8d4a5100063ffffffff61190c16565b859063ffffffff61148616565b935050505b6110ed84600101546113d464e8d4a510006113c886896000015461190c90919063ffffffff16565b3390565b80156116cf576116cf6108aa565b82546005546116e9918491610d0e9163ffffffff6118af16565b600555509055565b81541561173457600061172683600101546113d464e8d4a510006113c88860020154886000015461190c90919063ffffffff16565b905061173285826119cc565b505b6003830154611749908263ffffffff61148616565b60038401558154611760908263ffffffff61148616565b80835560028401546114789164e8d4a51000916113c8919063ffffffff61190c16565b82548211156117d9576040805162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b600061180784600101546113d464e8d4a510006113c88960020154896000015461190c90919063ffffffff16565b905061181386826119cc565b8354611825908463ffffffff6118af16565b80855560028601546118489164e8d4a51000916113c8919063ffffffff61190c16565b60018501556003850154611862908463ffffffff6118af16565b600386015560408051828152905183916001600160a01b038916917fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f519181900360200190a3505050505050565b600082821115611906576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261191b57506000610d1a565b8282028284828161192857fe5b04146108a35760405162461bcd60e51b8152600401808060200182810382526021815260200180611c2e6021913960400191505060405180910390fd5b60008082116119bb576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816119c457fe5b049392505050565b600d54604080516370a0823160e01b81523060048201529051600092611a769290916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015611a3e57600080fd5b505afa158015611a52573d6000803e3d6000fd5b505050506040513d6020811015611a6857600080fd5b50519063ffffffff6118af16565b905080821115611b32577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb84836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611b0057600080fd5b505af1158015611b14573d6000803e3d6000fd5b505050506040513d6020811015611b2a57600080fd5b50611bdf9050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611bb257600080fd5b505af1158015611bc6573d6000803e3d6000fd5b505050506040513d6020811015611bdc57600080fd5b50505b50505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736f6e6c7920746865206d61726b6574706c6163652063616e20616464206120706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212200d0c711c4472ca4f04e51b97f2f371fe0e9991c9d13d6c4f13fa94b0c3e9c2f564736f6c6343000606003300000000000000000000000098629512ed2239974e169341be5b920ea4dcdb210000000000000000000000000000000000000000000000009d72842aa582b4000000000000000000000000000000000000000000000000000000000000ba3e830000000000000000000000000000000000000000000000000000000000ba3e8300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8c0f1

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061020b5760003560e01c80638600e40b1161012a578063ab53bddc116100bd578063d756aadc1161008c578063f2cb469011610071578063f2cb4690146105cd578063f2fde38b146105d5578063fdd45eca146105fb5761020b565b8063d756aadc14610584578063e8b21f98146105a15761020b565b8063ab53bddc146104db578063b21d81db14610507578063bc4763a114610541578063ccadfc13146105675761020b565b806393f1a40b116100f957806393f1a40b146104535780639f1916591461047f578063a4700044146104ad578063a9472269146104d35761020b565b80638600e40b146103d85780638aa28550146104045780638da5cb5b1461040c5780638dbb1e3a146104305761020b565b806348cd4cb1116101a257806364482f791161017157806364482f79146103805780636793850e146103ab57806370da05d3146103b3578063715018a6146103d05761020b565b806348cd4cb11461032d57806351eb05a6146103355780635cfe169714610352578063630b5ba1146103785761020b565b80631aed6553116101de5780631aed6553146102945780632b8bbbe81461029c5780632f8d3a66146102c8578063337a5c76146102ee5761020b565b8063081e3eda146102105780630962ef791461022a5780631526fe271461024957806317caf6f11461028c575b600080fd5b610218610618565b60408051918252519081900360200190f35b6102476004803603602081101561024057600080fd5b503561061e565b005b6102666004803603602081101561025f57600080fd5b5035610633565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61021861066a565b610218610670565b610247600480360360408110156102b257600080fd5b50803590602001356001600160a01b0316610676565b610218600480360360208110156102de57600080fd5b50356001600160a01b03166107f4565b6103146004803603602081101561030457600080fd5b50356001600160a01b0316610835565b6040805192835260208301919091528051918290030190f35b61021861084e565b6102476004803603602081101561034b57600080fd5b5035610854565b6102186004803603602081101561036857600080fd5b50356001600160a01b0316610880565b6102476108aa565b6102476004803603606081101561039657600080fd5b508035906020810135906040013515156108c9565b61021861096d565b610247600480360360208110156103c957600080fd5b5035610973565b610247610ab5565b610247600480360360408110156103ee57600080fd5b506001600160a01b038135169060200135610b73565b610218610c7c565b610414610c81565b604080516001600160a01b039092168252519081900360200190f35b6102186004803603604081101561044657600080fd5b5080359060200135610c90565b6103146004803603604081101561046957600080fd5b50803590602001356001600160a01b0316610d20565b6102186004803603604081101561049557600080fd5b506001600160a01b0381358116916020013516610d44565b610247600480360360208110156104c357600080fd5b50356001600160a01b0316610d79565b610266610e6a565b610247600480360360408110156104f157600080fd5b506001600160a01b038135169060200135610e79565b61052d6004803603602081101561051d57600080fd5b50356001600160a01b0316610f81565b604080519115158252519081900360200190f35b6102186004803603602081101561055757600080fd5b50356001600160a01b0316610f96565b6102476004803603602081101561057d57600080fd5b5035610fa8565b6102476004803603602081101561059a57600080fd5b5035611029565b610218600480360360408110156105b757600080fd5b50803590602001356001600160a01b03166110a2565b6102476110f6565b610247600480360360208110156105eb57600080fd5b50356001600160a01b0316611102565b6102476004803603602081101561061157600080fd5b5035611216565b60035490565b61062781610854565b61063081611354565b50565b6003818154811061064057fe5b60009182526020909120600490910201805460018201546002830154600390930154919350919084565b60055481565b60015481565b6008546001600160a01b031633146106bf5760405162461bcd60e51b8152600401808060200182810382526023815260200180611c0b6023913960400191505060405180910390fd5b600060065443116106d2576006546106d4565b435b6005549091506106ea908463ffffffff61148616565b600555604080516080810182529384526020808501928352600085830181815260608701828152600380546001808201835582865299517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b60049092029182015596517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c88015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d870155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e9095019490945592546001600160a01b039490941683526007815281832060001994909401909355600990925220805460ff19169091179055565b6001600160a01b03811660009081526007602052604081205460038054909190811061081c57fe5b9060005260206000209060040201600301549050919050565b600e602052600090815260409020805460019091015482565b60065481565b60006003828154811061086357fe5b9060005260206000209060040201905061087c816114e0565b5050565b6001600160a01b0381166000908152600e602052604081206108a3600a82611608565b9392505050565b60035460005b8181101561087c576108c181610854565b6001016108b0565b6108d16116bd565b6001600160a01b03166108e2610c81565b6001600160a01b03161461093d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60006003848154811061094c57fe5b906000526020600020906004020190506109678184846116c1565b50505050565b60025481565b336000908152600e6020526040902061098a6110f6565b61099733600a83856116f1565b604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b037f00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb2116916323b872dd9160648083019260209291908290030181600087803b158015610a0c57600080fd5b505af1158015610a20573d6000803e3d6000fd5b505050506040513d6020811015610a3657600080fd5b5051610a7b576040805162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b60408051838152905133917f7c6ffa74de4e2c29c3eb18ff72c6878b93130806f744da5fb868db919dc8e0a7919081900360200190a25050565b610abd6116bd565b6001600160a01b0316610ace610c81565b6001600160a01b031614610b29576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b3360009081526009602052604090205460ff16610bcd576040805162461bcd60e51b81526020600482015260136024820152723ab730baba3437b934bd32b21039b2b73232b960691b604482015290519081900360640190fd5b336000908152600760205260408120546003805491929183908110610bee57fe5b60009182526020808320858452600480835260408086206001600160a01b038b1687529093529190932091029091019150610c2883610854565b610c358583838787611783565b60408051858152905184916001600160a01b038816917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b600a81565b6000546001600160a01b031690565b60006001548211610cc357610cbc600a610cb0848663ffffffff6118af16565b9063ffffffff61190c16565b9050610d1a565b6001548310610cdc57610cbc828463ffffffff6118af16565b610cbc610cf4600154846118af90919063ffffffff16565b610d0e600a610cb0876001546118af90919063ffffffff16565b9063ffffffff61148616565b92915050565b60046020908152600092835260408084209091529082529020805460019091015482565b6001600160a01b0391821660009081526007602090815260408083205483526004825280832093909416825291909152205490565b610d816116bd565b6001600160a01b0316610d92610c81565b6001600160a01b031614610ded576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610e48576040805162461bcd60e51b815260206004820152601460248201527f416464726573732063616e206e6f742062652030000000000000000000000000604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b600a54600b54600c54600d5484565b3360009081526009602052604090205460ff16610ed3576040805162461bcd60e51b81526020600482015260136024820152723ab730baba3437b934bd32b21039b2b73232b960691b604482015290519081900360640190fd5b336000908152600760205260408120546003805491929183908110610ef457fe5b60009182526020808320858452600480835260408086206001600160a01b038b1687529093529190932091029091019150610f2e83610854565b610f3a858383876116f1565b60408051858152905184916001600160a01b038816917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b60096020526000908152604090205460ff1681565b60076020526000908152604090205481565b610fb06116bd565b6001600160a01b0316610fc1610c81565b6001600160a01b03161461101c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610630600a8260006116c1565b6110316116bd565b6001600160a01b0316611042610c81565b6001600160a01b03161461109d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600b55565b600080600384815481106110b257fe5b60009182526020808320878452600480835260408086206001600160a01b038a16875290935291909320910290910191506110ed8282611608565b95945050505050565b611100600a6114e0565b565b61110a6116bd565b6001600160a01b031661111b610c81565b6001600160a01b031614611176576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166111bb5760405162461bcd60e51b8152600401808060200182810382526026815260200180611be56026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e6020526040902061122d6110f6565b61123c33600a83856000611783565b6040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b037f00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb21169163a9059cbb9160448083019260209291908290030181600087803b1580156112ab57600080fd5b505af11580156112bf573d6000803e3d6000fd5b505050506040513d60208110156112d557600080fd5b505161131a576040805162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b604482015290519081900360640190fd5b60408051838152905133917fe1c1b3a627e55787c786b5530520592ec76f3262a1f392f8d56542466c5c70bf919081900360200190a25050565b60006003828154811061136357fe5b600091825260208083208584526004808352604080862033875290935291909320805492909102909201925061139a575050610630565b60006113e082600101546113d464e8d4a510006113c88760020154876000015461190c90919063ffffffff16565b9063ffffffff61196516565b9063ffffffff6118af16565b9050801561145757600283015482546114099164e8d4a51000916113c89163ffffffff61190c16565b600183015561141833826119cc565b604080518281529051859133917fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f519181900360200190a3505050610630565b600283015482546114789164e8d4a51000916113c89163ffffffff61190c16565b826001018190555050505050565b6000828201838110156108a3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b806001015443116114f057610630565b6003810154806115065750436001820155610630565b6000611516836001015443610c90565b9050600061153d6005546113c88660000154610cb06002548761190c90919063ffffffff16565b604080516308934a5f60e31b81523060048201526024810183905290519192506001600160a01b037f00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb21169163449a52f89160448082019260009290919082900301818387803b1580156115af57600080fd5b505af11580156115c3573d6000803e3d6000fd5b505050506115f76115e6846113c864e8d4a510008561190c90919063ffffffff16565b60028601549063ffffffff61148616565b600285015550504360018301555050565b60028201546003830154600184015460009291904311801561162957508015155b1561169557600061163e866001015443610c90565b905060006116656005546113c88960000154610cb06002548761190c90919063ffffffff16565b9050611690611683846113c88464e8d4a5100063ffffffff61190c16565b859063ffffffff61148616565b935050505b6110ed84600101546113d464e8d4a510006113c886896000015461190c90919063ffffffff16565b3390565b80156116cf576116cf6108aa565b82546005546116e9918491610d0e9163ffffffff6118af16565b600555509055565b81541561173457600061172683600101546113d464e8d4a510006113c88860020154886000015461190c90919063ffffffff16565b905061173285826119cc565b505b6003830154611749908263ffffffff61148616565b60038401558154611760908263ffffffff61148616565b80835560028401546114789164e8d4a51000916113c8919063ffffffff61190c16565b82548211156117d9576040805162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b600061180784600101546113d464e8d4a510006113c88960020154896000015461190c90919063ffffffff16565b905061181386826119cc565b8354611825908463ffffffff6118af16565b80855560028601546118489164e8d4a51000916113c8919063ffffffff61190c16565b60018501556003850154611862908463ffffffff6118af16565b600386015560408051828152905183916001600160a01b038916917fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f519181900360200190a3505050505050565b600082821115611906576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261191b57506000610d1a565b8282028284828161192857fe5b04146108a35760405162461bcd60e51b8152600401808060200182810382526021815260200180611c2e6021913960400191505060405180910390fd5b60008082116119bb576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816119c457fe5b049392505050565b600d54604080516370a0823160e01b81523060048201529051600092611a769290916001600160a01b037f00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb2116916370a08231916024808301926020929190829003018186803b158015611a3e57600080fd5b505afa158015611a52573d6000803e3d6000fd5b505050506040513d6020811015611a6857600080fd5b50519063ffffffff6118af16565b905080821115611b32577f00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb216001600160a01b031663a9059cbb84836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611b0057600080fd5b505af1158015611b14573d6000803e3d6000fd5b505050506040513d6020811015611b2a57600080fd5b50611bdf9050565b7f00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb216001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611bb257600080fd5b505af1158015611bc6573d6000803e3d6000fd5b505050506040513d6020811015611bdc57600080fd5b50505b50505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736f6e6c7920746865206d61726b6574706c6163652063616e20616464206120706f6f6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212200d0c711c4472ca4f04e51b97f2f371fe0e9991c9d13d6c4f13fa94b0c3e9c2f564736f6c63430006060033

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

00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb210000000000000000000000000000000000000000000000009d72842aa582b4000000000000000000000000000000000000000000000000000000000000ba3e830000000000000000000000000000000000000000000000000000000000ba3e8300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8c0f1

-----Decoded View---------------
Arg [0] : _pop (address): 0x98629512Ed2239974e169341be5b920EA4dcdB21
Arg [1] : _popPerBlock (uint256): 11345275730000000000
Arg [2] : _startBlock (uint256): 12205699
Arg [3] : _bonusEndBlock (uint256): 12205699
Arg [4] : _popAllocPoint (uint256): 0
Arg [5] : _popVaultStarts (uint256): 14205169

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000098629512ed2239974e169341be5b920ea4dcdb21
Arg [1] : 0000000000000000000000000000000000000000000000009d72842aa582b400
Arg [2] : 0000000000000000000000000000000000000000000000000000000000ba3e83
Arg [3] : 0000000000000000000000000000000000000000000000000000000000ba3e83
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000d8c0f1


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.