ETH Price: $3,474.37 (-1.52%)
Gas: 3 Gwei

Contract

0xc88a9584b73bf6c417865ABF7370F727F3C11E3C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Harvest203177382024-07-16 8:00:356 days ago1721116835IN
0xc88a9584...7F3C11E3C
0 ETH0.001099778.13680095
Harvest203177122024-07-16 7:55:236 days ago1721116523IN
0xc88a9584...7F3C11E3C
0 ETH0.001033487.64635677
Deposit202142972024-07-01 21:16:1121 days ago1719868571IN
0xc88a9584...7F3C11E3C
0 ETH0.001044165.24850207
Harvest201171802024-06-18 7:31:5934 days ago1718695919IN
0xc88a9584...7F3C11E3C
0 ETH0.000708435.24141019
Harvest201022542024-06-16 5:27:1136 days ago1718515631IN
0xc88a9584...7F3C11E3C
0 ETH0.000349952.58914472
Harvest201022462024-06-16 5:25:3536 days ago1718515535IN
0xc88a9584...7F3C11E3C
0 ETH0.00039022.88695405
Harvest199823532024-05-30 11:25:4753 days ago1717068347IN
0xc88a9584...7F3C11E3C
0 ETH0.0014049610.39474231
Harvest199822932024-05-30 11:13:2353 days ago1717067603IN
0xc88a9584...7F3C11E3C
0 ETH0.001185988.77464465
Harvest199476582024-05-25 15:02:3558 days ago1716649355IN
0xc88a9584...7F3C11E3C
0 ETH0.000971797.18992898
Deposit199268762024-05-22 17:21:1161 days ago1716398471IN
0xc88a9584...7F3C11E3C
0 ETH0.0033206117.71276379
Harvest197875542024-05-03 5:39:1180 days ago1714714751IN
0xc88a9584...7F3C11E3C
0 ETH0.000780865.77732953
Harvest197874922024-05-03 5:26:4780 days ago1714714007IN
0xc88a9584...7F3C11E3C
0 ETH0.000644334.76719781
Harvest197164462024-04-23 6:56:1190 days ago1713855371IN
0xc88a9584...7F3C11E3C
0 ETH0.0015636911.56915999
Harvest196795122024-04-18 2:59:1195 days ago1713409151IN
0xc88a9584...7F3C11E3C
0 ETH0.001323629.79292281
Harvest196795042024-04-18 2:57:3595 days ago1713409055IN
0xc88a9584...7F3C11E3C
0 ETH0.001100078.13898991
Harvest196533252024-04-14 10:58:2399 days ago1713092303IN
0xc88a9584...7F3C11E3C
0 ETH0.0014086210.42180978
Deposit196043542024-04-07 14:16:35106 days ago1712499395IN
0xc88a9584...7F3C11E3C
0 ETH0.0030171117.79533761
Harvest196043512024-04-07 14:15:59106 days ago1712499359IN
0xc88a9584...7F3C11E3C
0 ETH0.0026919617.87279455
Harvest196043082024-04-07 14:07:23106 days ago1712498843IN
0xc88a9584...7F3C11E3C
0 ETH0.0026320619.47872087
Harvest195961612024-04-06 10:43:23107 days ago1712400203IN
0xc88a9584...7F3C11E3C
0 ETH0.0015038511.12640484
Deposit195610362024-04-01 12:40:11112 days ago1711975211IN
0xc88a9584...7F3C11E3C
0 ETH0.0030577418.03498009
Harvest195610032024-04-01 12:33:35112 days ago1711974815IN
0xc88a9584...7F3C11E3C
0 ETH0.0029052119.28404447
Harvest195609962024-04-01 12:32:11112 days ago1711974731IN
0xc88a9584...7F3C11E3C
0 ETH0.0024201117.90543969
Harvest194895642024-03-22 10:26:59122 days ago1711103219IN
0xc88a9584...7F3C11E3C
0 ETH0.0030261822.38950298
Harvest194538612024-03-17 10:05:35127 days ago1710669935IN
0xc88a9584...7F3C11E3C
0 ETH0.0037007527.38037129
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
159410932022-11-10 17:24:59620 days ago1668101099
0xc88a9584...7F3C11E3C
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ZeroxZeroStaking

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : ZeroxZeroStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
pragma abicoder v2;

import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SignedSafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

import "./BoringMath.sol";
import "./IRewarder.sol";
import "./ZeroxZeroToken.sol";

/// @notice Returns a constant number of ZeroxZero tokens per block to LP providers.
/// It is the only address with minting rights for ZeroxZero.
contract ZeroxZeroStaking is Ownable {
    using BoringMath for uint256;
    using BoringMath128 for uint128;
    using SignedSafeMath for int256;
    using SafeERC20 for ZeroxZeroToken;
    using SafeERC20 for IERC20;

    /// @notice Info of each liquidity provider.
    /// `amount` LP token amount the user has provided.
    /// `rewardDebt` The amount of ZeroxZero entitled to the user.
    struct UserInfo {
        uint256 amount;
        int256 rewardDebt;
    }

    /// @notice Info of each liquidity pool.
    /// `allocPoint` The amount of allocation points assigned to the pool.
    /// Also known as the amount of ZeroxZero to distribute per block.
    struct PoolInfo {
        uint128 accZeroxZeroPerShare;
        uint64 lastRewardBlock;
        uint64 allocPoint;
    }

    /// @notice Address of ZeroxZero contract.
    ZeroxZeroToken public ZeroxZero;

    /// @notice We track balances directly rather than relying on the token contract `balanceOf`
    mapping (uint256 => uint256) public poolBalances;

    /// @notice Info of each liquidity pool.
    PoolInfo[] public poolInfo;
    /// @notice Address of the LP token for each pool.
    IERC20[] public lpToken;
    /// @notice Address of each `IRewarder` contract.
    IRewarder[] public rewarder;

    /// @notice Info of each user that stakes LP tokens.
    mapping (uint256 => mapping (address => UserInfo)) public userInfo;
    /// @dev Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;

    uint256 public stakingZeroxZeroPerBlock = 1e19;
    uint256 private constant ACC_ZeroxZero_PRECISION = 1e12;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount, address indexed to);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to);
    event Harvest(address indexed user, uint256 indexed pid, uint256 amount);
    event LogPoolAddition(uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken, IRewarder indexed rewarder);
    event LogSetPool(uint256 indexed pid, uint256 allocPoint, IRewarder indexed rewarder, bool overwrite);
    event LogUpdatePool(uint256 indexed pid, uint64 lastRewardBlock, uint256 lpSupply, uint256 accZeroxZeroPerShare);

    constructor(address devWallet, address reward) {
        ZeroxZero = new ZeroxZeroToken(devWallet, address(this), msg.sender);
        if (reward != address(0)) {
          uint256 currentBalance = ZeroxZero.balanceOf(address(this));
          ZeroxZero.safeTransfer(reward, currentBalance.mul(50)/100);
        }
    }

    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /// @notice Returns the number of liquidity pools.
    function poolLength() public view returns (uint256 pools) {
        pools = poolInfo.length;
    }

    /// @notice Add a new LP to the pool. Can only be called by the owner.
    /// DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    /// @param allocPoint AP of the new pool.
    /// @param _lpToken Address of the LP ERC-20 token.
    /// @param _rewarder Address of the rewarder delegate.
    function add(uint256 allocPoint, IERC20 _lpToken, IRewarder _rewarder) public onlyOwner {
        uint256 lastRewardBlock = block.number;
        totalAllocPoint = totalAllocPoint.add(allocPoint);
        lpToken.push(_lpToken);
        rewarder.push(_rewarder);

        poolInfo.push(PoolInfo({
            allocPoint: allocPoint.to64(),
            lastRewardBlock: lastRewardBlock.to64(),
            accZeroxZeroPerShare: 0
        }));
        emit LogPoolAddition(lpToken.length.sub(1), allocPoint, _lpToken, _rewarder);
    }

    /// @notice Update the given pool's ZeroxZero allocation point and `IRewarder` contract. Can only be called by the owner.
    /// @param _pid The index of the pool. See `poolInfo`.
    /// @param _allocPoint New AP of the pool.
    /// @param _rewarder Address of the rewarder delegate.
    /// @param overwrite True if _rewarder should be `set`. Otherwise `_rewarder` is ignored.
    function set(uint256 _pid, uint256 _allocPoint, IRewarder _rewarder, bool overwrite) public onlyOwner {
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint.to64();
        if (overwrite) { rewarder[_pid] = _rewarder; }
        emit LogSetPool(_pid, _allocPoint, overwrite ? _rewarder : rewarder[_pid], overwrite);
    }

    /// @notice View function to see pending ZeroxZero on frontend.
    /// @param _pid The index of the pool. See `poolInfo`.
    /// @param _user Address of user.
    /// @return pending ZeroxZero reward for a given user.
    function pendingZeroxZero(uint256 _pid, address _user) external view returns (uint256 pending) {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accZeroxZeroPerShare = pool.accZeroxZeroPerShare;
        uint256 lpSupply = poolBalances[_pid];
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 blocks = block.number.sub(pool.lastRewardBlock);
            uint256 zeroxzeroReward = blocks.mul(zeroxzeroPerBlock()).mul(pool.allocPoint) / totalAllocPoint;
            accZeroxZeroPerShare = accZeroxZeroPerShare.add(zeroxzeroReward.mul(ACC_ZeroxZero_PRECISION) / lpSupply);
        }
        pending = toUint256(int256(user.amount.mul(accZeroxZeroPerShare) / ACC_ZeroxZero_PRECISION).sub(user.rewardDebt));
    }

    /// @notice Update reward variables for all pools. Be careful of gas spending!
    /// @param pids Pool IDs of all to be updated. Make sure to update all active pools.
    function massUpdatePools(uint256[] calldata pids) external {
        uint256 len = pids.length;
        for (uint256 i = 0; i < len; ++i) {
            updatePool(pids[i]);
        }
    }

    /// @notice Calculates and returns the `amount` of ZeroxZero per block.
    function zeroxzeroPerBlock() public view returns (uint256 amount) {
        return stakingZeroxZeroPerBlock;
    }

    /// @notice Sets the `amount` of ZeroxZero per block.
    function setZeroxZeroPerBlock(uint256 amount) public onlyOwner {
        stakingZeroxZeroPerBlock = amount;
    }

    /// @notice Update reward variables of the given pool.
    /// @param pid The index of the pool. See `poolInfo`.
    /// @return pool Returns the pool that was updated.
    function updatePool(uint256 pid) public returns (PoolInfo memory pool) {
        pool = poolInfo[pid];
        if (block.number > pool.lastRewardBlock) {
            uint256 lpSupply = poolBalances[pid];
            if (lpSupply > 0) {
                uint256 blocks = block.number.sub(pool.lastRewardBlock);
                uint256 zeroxzeroReward = blocks.mul(zeroxzeroPerBlock()).mul(pool.allocPoint) / totalAllocPoint;
                pool.accZeroxZeroPerShare = pool.accZeroxZeroPerShare.add((zeroxzeroReward.mul(ACC_ZeroxZero_PRECISION) / lpSupply).to128());
            }
            pool.lastRewardBlock = block.number.to64();
            poolInfo[pid] = pool;
            emit LogUpdatePool(pid, pool.lastRewardBlock, lpSupply, pool.accZeroxZeroPerShare);
        }
    }

    /// @notice Deposit LP tokens to liquidity pool for ZeroxZero allocation.
    /// @param pid The index of the pool. See `poolInfo`.
    /// @param amount LP token amount to deposit.
    /// @param to The receiver of `amount` deposit benefit.
    function deposit(uint256 pid, uint256 amount, address to) public {
        require(to != address(this), "Cannot deposit to staking contract");
        PoolInfo memory pool = updatePool(pid);
        UserInfo storage user = userInfo[pid][to];

        // Effects
        user.amount = user.amount.add(amount);
        user.rewardDebt = user.rewardDebt.add(int256(amount.mul(pool.accZeroxZeroPerShare) / ACC_ZeroxZero_PRECISION));

        // Interactions
        IRewarder _rewarder = rewarder[pid];
        if (address(_rewarder) != address(0)) {
            _rewarder.onZeroxZeroReward(pid, to, to, 0, user.amount);
        }

        lpToken[pid].safeTransferFrom(msg.sender, address(this), amount);
        poolBalances[pid] = poolBalances[pid].add(amount);

        emit Deposit(msg.sender, pid, amount, to);
    }

    /// @notice Withdraw LP tokens from liquidity pool.
    /// @param pid The index of the pool. See `poolInfo`.
    /// @param amount LP token amount to withdraw.
    /// @param to Receiver of the LP tokens.
    function withdraw(uint256 pid, uint256 amount, address to) public {
        require(to != address(this), "Cannot withdraw from staking contract");

        PoolInfo memory pool = updatePool(pid);
        UserInfo storage user = userInfo[pid][msg.sender];

        // Effects
        user.rewardDebt = user.rewardDebt.sub(int256(amount.mul(pool.accZeroxZeroPerShare) / ACC_ZeroxZero_PRECISION));
        user.amount = user.amount.sub(amount);
        poolBalances[pid] = poolBalances[pid].sub(amount);

        // Interactions
        IRewarder _rewarder = rewarder[pid];
        if (address(_rewarder) != address(0)) {
            _rewarder.onZeroxZeroReward(pid, msg.sender, to, 0, user.amount);
        }

        lpToken[pid].safeTransfer(to, amount);

        emit Withdraw(msg.sender, pid, amount, to);
    }

    /// @notice Harvest proceeds for transaction sender to `to`.
    /// @param pid The index of the pool. See `poolInfo`.
    /// @param to Receiver of ZeroxZero rewards.
    function harvest(uint256 pid, address to) public {
        require(to != address(this), "Cannot harvest to staking contract");

        PoolInfo memory pool = updatePool(pid);
        UserInfo storage user = userInfo[pid][msg.sender];
        int256 accumulatedZeroxZero = int256(user.amount.mul(pool.accZeroxZeroPerShare) / ACC_ZeroxZero_PRECISION);
        uint256 rewardZeroxZero = toUint256(accumulatedZeroxZero.sub(user.rewardDebt));

        // Effects
        user.rewardDebt = accumulatedZeroxZero;

        // Interactions
        if (rewardZeroxZero != 0) {
            ZeroxZero.safeTransfer(to, rewardZeroxZero);
        }

        IRewarder _rewarder = rewarder[pid];
        if (address(_rewarder) != address(0)) {
            _rewarder.onZeroxZeroReward( pid, msg.sender, to, rewardZeroxZero, user.amount);
        }

        emit Harvest(msg.sender, pid, rewardZeroxZero);
    }

    /// @notice Withdraw LP tokens from liquidity pool and harvest proceeds for transaction sender to `to`.
    /// @param pid The index of the pool. See `poolInfo`.
    /// @param amount LP token amount to withdraw.
    /// @param to Receiver of the LP tokens and ZeroxZero rewards.
    function withdrawAndHarvest(uint256 pid, uint256 amount, address to) public {
        require(to != address(this), "Cannot withdraw and harvest from staking contract");

        PoolInfo memory pool = updatePool(pid);
        UserInfo storage user = userInfo[pid][msg.sender];
        int256 accumulatedZeroxZero = int256(user.amount.mul(pool.accZeroxZeroPerShare) / ACC_ZeroxZero_PRECISION);
        uint256 rewardZeroxZero = toUint256(accumulatedZeroxZero.sub(user.rewardDebt));

        // Effects
        user.rewardDebt = accumulatedZeroxZero.sub(int256(amount.mul(pool.accZeroxZeroPerShare) / ACC_ZeroxZero_PRECISION));
        user.amount = user.amount.sub(amount);
        poolBalances[pid] = poolBalances[pid].sub(amount);

        // Interactions
        ZeroxZero.safeTransfer(to, rewardZeroxZero);

        IRewarder _rewarder = rewarder[pid];
        if (address(_rewarder) != address(0)) {
            _rewarder.onZeroxZeroReward(pid, msg.sender, to, rewardZeroxZero, user.amount);
        }
        lpToken[pid].safeTransfer(to, amount);

        emit Withdraw(msg.sender, pid, amount, to);
        emit Harvest(msg.sender, pid, rewardZeroxZero);
    }

    /// @notice Withdraw without caring about rewards. EMERGENCY ONLY.
    /// @param pid The index of the pool. See `poolInfo`.
    /// @param to Receiver of the LP tokens.
    function emergencyWithdraw(uint256 pid, address to) public {
        require(to != address(this), "Cannot emergency withdraw from staking contract");

        UserInfo storage user = userInfo[pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        poolBalances[pid] = poolBalances[pid].sub(amount);

        IRewarder _rewarder = rewarder[pid];
        if (address(_rewarder) != address(0)) {
            _rewarder.onZeroxZeroReward(pid, msg.sender, to, 0, 0);
        }

        // Note: transfer can fail or succeed if `amount` is zero.
        lpToken[pid].safeTransfer(to, amount);
        emit EmergencyWithdraw(msg.sender, pid, amount, to);
    }
}

File 2 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 3 of 12 : SignedSafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @title SignedSafeMath
 * @dev Signed math operations with safety checks that revert on error.
 */
library SignedSafeMath {
    int256 constant private _INT256_MIN = -2**255;

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

        require(!(a == -1 && b == _INT256_MIN), "SignedSafeMath: multiplication overflow");

        int256 c = a * b;
        require(c / a == b, "SignedSafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two signed integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(int256 a, int256 b) internal pure returns (int256) {
        require(b != 0, "SignedSafeMath: division by zero");
        require(!(b == -1 && a == _INT256_MIN), "SignedSafeMath: division overflow");

        int256 c = a / b;

        return c;
    }

    /**
     * @dev Returns the subtraction of two signed integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a - b;
        require((b >= 0 && c <= a) || (b < 0 && c > a), "SignedSafeMath: subtraction overflow");

        return c;
    }

    /**
     * @dev Returns the addition of two signed integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a + b;
        require((b >= 0 && c >= a) || (b < 0 && c < a), "SignedSafeMath: addition overflow");

        return c;
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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 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 5 of 12 : BoringMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

/// @notice A library for performing overflow-/underflow-safe math,
/// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math).
library BoringMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require(b == 0 || (c = a * b) / b == a, "BoringMath: Mul Overflow");
    }

    function to128(uint256 a) internal pure returns (uint128 c) {
        require(a <= uint128(-1), "BoringMath: uint128 Overflow");
        c = uint128(a);
    }

    function to64(uint256 a) internal pure returns (uint64 c) {
        require(a <= uint64(-1), "BoringMath: uint64 Overflow");
        c = uint64(a);
    }

    function to32(uint256 a) internal pure returns (uint32 c) {
        require(a <= uint32(-1), "BoringMath: uint32 Overflow");
        c = uint32(a);
    }
}

/// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint128.
library BoringMath128 {
    function add(uint128 a, uint128 b) internal pure returns (uint128 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint128 a, uint128 b) internal pure returns (uint128 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }
}

/// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint64.
library BoringMath64 {
    function add(uint64 a, uint64 b) internal pure returns (uint64 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint64 a, uint64 b) internal pure returns (uint64 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }
}

/// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint32.
library BoringMath32 {
    function add(uint32 a, uint32 b) internal pure returns (uint32 c) {
        require((c = a + b) >= b, "BoringMath: Add Overflow");
    }

    function sub(uint32 a, uint32 b) internal pure returns (uint32 c) {
        require((c = a - b) <= a, "BoringMath: Underflow");
    }
}

File 6 of 12 : IRewarder.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
interface IRewarder {
    function onZeroxZeroReward(uint256 pid, address user, address recipient, uint256 zeroxzeroAmount, uint256 newLpAmount) external;
}

File 7 of 12 : ZeroxZeroToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./BoringMath.sol";

contract ZeroxZeroToken is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    // Used to track reflected balances
    mapping (address => uint256) private _rOwned;
    mapping (address => uint256) private _tOwned;

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

    // Excludes an address from being subject to any fees when sending or receiving ZeroxZero
    mapping (address => bool) private _isExcludedFromFee;

    // Excludes an address from receiving a proportional amount of the transfer tax
    mapping (address => bool) private _isExcluded;
    address[] private _excluded;

    uint256 private constant MAX = ~uint256(0);
    uint256 private _tTotal = 200000000 * 10**18;
    uint256 private _rTotal = (MAX - (MAX % _tTotal));
    uint256 private _tFeeTotal;
    uint256 private zeroBalance = 10**(39 + 18) - _tTotal;

    string private _name = "0x0 Token";
    string private _symbol = "0x0";
    uint8 private _decimals = 18;

    // Fees have a denominator of 10**6
    uint256 public constant DEFAULT_TAX_FEE = 5*10**3; //0.5%

    uint256 public _burnFee = 5*10**3; //0.5%

    uint256 public _stakingFee = 5*10**3; //0.5%
    address public _stakingWallet;

    uint256 public _devFee = 5*10**3; //0.5%
    address public _devWallet;

    constructor (address devWallet, address stakingWallet, address owner) {

        _devWallet = devWallet;
        _stakingWallet = stakingWallet;
        _rOwned[_msgSender()] = _rTotal;

        //exclude staking contract from fee
        _isExcludedFromFee[stakingWallet] = true;
        //exclude this contract from fee
        _isExcludedFromFee[address(this)] = true;
        //exclude dev wallet from fee
        _isExcludedFromFee[devWallet] = true;
        //exclude staking contract from rewards
        excludeFromReward(stakingWallet);

        transferOwnership(owner);
        emit Transfer(address(0), _msgSender(), _tTotal);

        // Add a balance to 0x0 for cosmetic purposes
        emit Transfer(address(0), address(0), zeroBalance);
    }

    function name() public view returns (string memory) {
        return _name;
    }

    function symbol() public view returns (string memory) {
        return _symbol;
    }

    function decimals() public view returns (uint8) {
        return _decimals;
    }

    function totalSupply() public view override returns (uint256) {
        return _tTotal;
    }

    function balanceOf(address account) public view override returns (uint256) {
        if (_isExcluded[account]) return _tOwned[account];
        if (account == address(0)) {
          return tokenFromReflection(_rOwned[account]).add(zeroBalance);
        }
        return tokenFromReflection(_rOwned[account]);
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

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

    function isExcludedFromReward(address account) public view returns (bool) {
        return _isExcluded[account];
    }

    function totalFees() public view returns (uint256) {
        return _tFeeTotal;
    }

    // Returns reflection without accounting for burn, dev & staking fees (upfront fees)
    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
        require(tAmount <= _tTotal, "Amount must be less than supply");
        if (!deductTransferFee) {
            (uint256 rAmount,,,,) = _getValues(tAmount, 0, DEFAULT_TAX_FEE);
            return rAmount;
        } else {
            (,uint256 rTransferAmount,,,) = _getValues(tAmount, 0, DEFAULT_TAX_FEE);
            return rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
        require(rAmount <= _rTotal, "Amount must be less than total reflections");
        uint256 currentRate =  _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromReward(address account) public onlyOwner() {
        require(!_isExcluded[account], "Account is already excluded");
        require(_excluded.length < 5, "Too many excluded accounts");
        if(_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        (, uint256 tSupply) = _getCurrentSupply();
        require(tSupply > 0, "Cannot exclude all holders");
        _excluded.push(account);
    }

    function _reflectFee(uint256 rFee, uint256 tFee) private {
        _rTotal = _rTotal.sub(rFee);
        _tFeeTotal = _tFeeTotal.add(tFee);
    }

    function _getValues(uint256 tAmount, uint256 upfrontFee, uint256 taxFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
        (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount, upfrontFee, taxFee);
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, _getRate());
        return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee);
    }

    function _getTValues(uint256 tAmount, uint256 upfrontFee, uint256 taxFee) private pure returns (uint256, uint256) {
        uint256 tFee = calculateTaxFee(tAmount, upfrontFee, taxFee);
        uint256 tTransferAmount = tAmount.sub(tFee);
        return (tTransferAmount, tFee);
    }

    function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
        uint256 rAmount = tAmount.mul(currentRate);
        uint256 rFee = tFee.mul(currentRate);
        uint256 rTransferAmount = rAmount.sub(rFee);
        return (rAmount, rTransferAmount, rFee);
    }

    function _getRate() private view returns(uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns(uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }

    function calculateTaxFee(uint256 amount, uint256 upfrontFee, uint256 taxFee) private pure returns (uint256) {
        return amount.add(upfrontFee).mul(taxFee).div(
            10**6
        );
    }

    function calculateStakingFee(uint256 amount) private view returns (uint256) {
        return amount.mul(_stakingFee).div(
            10**6
        );
    }

    function calculateDevFee(uint256 amount) private view returns (uint256) {
        return amount.mul(_devFee).div(
            10**6
        );
    }

    function calculateBurnFee(uint256 amount) private view returns (uint256) {
        return amount.mul(_burnFee).div(
            10**6
        );
    }

    function isExcludedFromFee(address account) public view returns(bool) {
        return _isExcludedFromFee[account];
    }

    function _approve(address owner, address spender, uint256 amount) private {
        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);
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) private {
        require(from != address(0), "ERC20: transfer from the zero address");

        uint256 burnAmt = 0;
        uint256 devAmt = 0;
        uint256 stakingAmt = 0;

        uint256 upfrontFee = 0;
        uint256 taxFee = 0;

        if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
            burnAmt = calculateBurnFee(amount);
            devAmt = calculateDevFee(amount);
            stakingAmt = calculateStakingFee(amount);
            upfrontFee = burnAmt.add(devAmt).add(stakingAmt);
            taxFee = DEFAULT_TAX_FEE;
        }

        if (_isExcluded[from] && !_isExcluded[to]) {
            _transferFromExcluded(from, to, amount, upfrontFee, taxFee);
        } else if (!_isExcluded[from] && _isExcluded[to]) {
            _transferToExcluded(from, to, amount, upfrontFee, taxFee);
        } else if (_isExcluded[from] && _isExcluded[to]) {
            _transferBothExcluded(from, to, amount, upfrontFee, taxFee);
        } else {
            _transferStandard(from, to, amount, upfrontFee, taxFee);
        }

        // Distribute fees
        _transferStandard(from, address(0), burnAmt, 0, 0);
        _transferStandard(from, _devWallet, devAmt, 0, 0);
        _transferToExcluded(from, _stakingWallet, stakingAmt, 0, 0);

    }

    function _transferStandard(address sender, address recipient, uint256 tAmount, uint256 upfrontFee, uint256 taxFee) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount.sub(upfrontFee), upfrontFee, taxFee);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferToExcluded(address sender, address recipient, uint256 tAmount, uint256 upfrontFee, uint256 taxFee) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount.sub(upfrontFee), upfrontFee, taxFee);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferFromExcluded(address sender, address recipient, uint256 tAmount, uint256 upfrontFee, uint256 taxFee) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount.sub(upfrontFee), upfrontFee, taxFee);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferBothExcluded(address sender, address recipient, uint256 tAmount, uint256 upfrontFee, uint256 taxFee) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount.sub(upfrontFee), upfrontFee, taxFee);
        _tOwned[sender] = _tOwned[sender].sub(tAmount.sub(upfrontFee));
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function excludeFromFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = true;
    }

    function includeInFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = false;
    }

    function setDevWallet(address newWallet) external onlyOwner() {
        _devWallet = newWallet;
    }

}

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 : 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, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

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

    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 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {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 returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view 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 returns (uint8) {
        return _decimals;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view 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 {
        _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 { }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"devWallet","type":"address"},{"internalType":"address","name":"reward","type":"address"}],"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"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Deposit","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"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"EmergencyWithdraw","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":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"lpToken","type":"address"},{"indexed":true,"internalType":"contract IRewarder","name":"rewarder","type":"address"}],"name":"LogPoolAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IRewarder","name":"rewarder","type":"address"},{"indexed":false,"internalType":"bool","name":"overwrite","type":"bool"}],"name":"LogSetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accZeroxZeroPerShare","type":"uint256"}],"name":"LogUpdatePool","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":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ZeroxZero","outputs":[{"internalType":"contract ZeroxZeroToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"contract IRewarder","name":"_rewarder","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pids","type":"uint256[]"}],"name":"massUpdatePools","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":"pendingZeroxZero","outputs":[{"internalType":"uint256","name":"pending","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint128","name":"accZeroxZeroPerShare","type":"uint128"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint64","name":"allocPoint","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"pools","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewarder","outputs":[{"internalType":"contract IRewarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IRewarder","name":"_rewarder","type":"address"},{"internalType":"bool","name":"overwrite","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setZeroxZeroPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingZeroxZeroPerBlock","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":[{"components":[{"internalType":"uint128","name":"accZeroxZeroPerShare","type":"uint128"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint64","name":"allocPoint","type":"uint64"}],"internalType":"struct ZeroxZeroStaking.PoolInfo","name":"pool","type":"tuple"}],"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":"int256","name":"rewardDebt","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawAndHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zeroxzeroPerBlock","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052678ac7230489e800006008553480156200001d57600080fd5b5060405162004fdd38038062004fdd8339810160408190526200004091620005c4565b60006200004c620001d6565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350813033604051620000a7906200059e565b620000b59392919062000628565b604051809103906000f080158015620000d2573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b03928316179055811615620001ce576001546040516370a0823160e01b81526000916001600160a01b0316906370a08231906200012a90309060040162000614565b60206040518083038186803b1580156200014357600080fd5b505afa15801562000158573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200017e9190620005fb565b9050620001cc826064620001a2603285620001da60201b620016571790919060201c565b81620001aa57fe5b6001546001600160a01b0316929190046200024f602090811b620016c917901c565b505b50506200064b565b3390565b6000811580620001f757505080820282828281620001f457fe5b04145b62000249576040805162461bcd60e51b815260206004820152601860248201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604482015290519081900360640190fd5b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663a9059cbb60e01b17909152620002a7918591620002ac16565b505050565b600062000308826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200036860201b62001720179092919060201c565b805190915015620002a7578080602001905160208110156200032957600080fd5b5051620002a75760405162461bcd60e51b815260040180806020018281038252602a81526020018062004fb3602a913960400191505060405180910390fd5b606062000379848460008562000383565b90505b9392505050565b606082471015620003c65760405162461bcd60e51b815260040180806020018281038252602681526020018062004f8d6026913960400191505060405180910390fd5b620003d185620004ea565b62000423576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310620004635780518252601f19909201916020918201910162000442565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114620004c7576040519150601f19603f3d011682016040523d82523d6000602084013e620004cc565b606091505b509092509050620004df828286620004f4565b979650505050505050565b803b15155b919050565b60608315620005055750816200037c565b825115620005165782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200056257818101518382015260200162000548565b50505050905090810190601f168015620005905780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6126dc80620028b183390190565b80516001600160a01b0381168114620004ef57600080fd5b60008060408385031215620005d7578182fd5b620005e283620005ac565b9150620005f260208401620005ac565b90509250929050565b6000602082840312156200060d578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681529183166020830152909116604082015260600190565b612256806200065b6000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806378ed5d1f116100c3578063be0545431161007c578063be054543146102c0578063c346253d146102d3578063d1abb907146102e6578063e0ada28e146102f9578063e5a2e67b1461030c578063f2fde38b1461031457610158565b806378ed5d1f1461024b57806388bba42f1461025e5780638da5cb5b146102715780638dbdbe6d1461027957806393f1a40b1461028c578063ab7de098146102ad57610158565b80634beddb6f116101155780634beddb6f146101e057806351eb05a6146101f557806357a5b58c14610215578063715018a61461022857806374417fcd14610230578063768237421461023857610158565b8063081e3eda1461015d5780630ad58d2f1461017b5780631526fe271461019057806317caf6f1146101b257806318fccc76146101ba5780632f940c70146101cd575b600080fd5b610165610327565b60405161017291906120ad565b60405180910390f35b61018e610189366004611e1e565b61032d565b005b6101a361019e366004611d96565b610510565b60405161017293929190612083565b610165610555565b61018e6101c8366004611dae565b61055b565b61018e6101db366004611dae565b6106fb565b6101e8610868565b6040516101729190611e98565b610208610203366004611d96565b610877565b604051610172919061204a565b61018e610223366004611d28565b610a73565b61018e610aa9565b610165610b4b565b610165610246366004611dae565b610b51565b6101e8610259366004611d96565b610ca6565b61018e61026c366004611e4b565b610cd0565b6101e8610e6b565b61018e610287366004611e1e565b610e7a565b61029f61029a366004611dae565b61104e565b6040516101729291906120f5565b61018e6102bb366004611ddd565b611072565b6101656102ce366004611d96565b611279565b6101e86102e1366004611d96565b61128b565b61018e6102f4366004611e1e565b61129b565b61018e610307366004611d96565b6114fc565b610165611559565b61018e610322366004611d0c565b61155f565b60035490565b6001600160a01b03811630141561035f5760405162461bcd60e51b815260040161035690612005565b60405180910390fd5b600061036a84610877565b600085815260066020908152604080832033845290915290208151919250906103bc9064e8d4a51000906103a89087906001600160801b0316611657565b816103af57fe5b6001840154919004611739565b600182015580546103cd908561179e565b81556000858152600260205260409020546103e8908561179e565b600086815260026020526040812091909155600580548790811061040857fe5b6000918252602090912001546001600160a01b03169050801561048e578154604051630c3a57d560e01b81526001600160a01b03831691630c3a57d59161045b918a9133918a91600091906004016120b6565b600060405180830381600087803b15801561047557600080fd5b505af1158015610489573d6000803e3d6000fd5b505050505b6104bc8486600489815481106104a057fe5b6000918252602090912001546001600160a01b031691906116c9565b836001600160a01b031686336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328860405161050091906120ad565b60405180910390a4505050505050565b6003818154811061052057600080fd5b6000918252602090912001546001600160801b03811691506001600160401b03600160801b8204811691600160c01b90041683565b60075481565b6001600160a01b0381163014156105845760405162461bcd60e51b815260040161035690611f3d565b600061058f83610877565b6000848152600660209081526040808320338452909152812082518154939450909264e8d4a51000916105cb91906001600160801b0316611657565b816105d257fe5b04905060006105f66105f184600101548461173990919063ffffffff16565b6117ee565b600184018390559050801561061c5760015461061c906001600160a01b031686836116c9565b60006005878154811061062b57fe5b6000918252602090912001546001600160a01b0316905080156106b0578354604051630c3a57d560e01b81526001600160a01b03831691630c3a57d59161067d918b9133918c918991906004016120b6565b600060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505050505b86336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954846040516106ea91906120ad565b60405180910390a350505050505050565b6001600160a01b0381163014156107245760405162461bcd60e51b815260040161035690611eee565b60008281526006602090815260408083203384528252808320805484825560018201859055868552600290935292205461075e908261179e565b600085815260026020526040812091909155600580548690811061077e57fe5b6000918252602090912001546001600160a01b03169050801561080357604051630c3a57d560e01b81526001600160a01b03821690630c3a57d5906107d09088903390899060009081906004016120b6565b600060405180830381600087803b1580156107ea57600080fd5b505af11580156107fe573d6000803e3d6000fd5b505050505b6108158483600488815481106104a057fe5b836001600160a01b031685336001600160a01b03167f2cac5e20e1541d836381527a43f651851e302817b71dc8e810284e69210c1c6b8560405161085991906120ad565b60405180910390a45050505050565b6001546001600160a01b031681565b61087f611cec565b6003828154811061088c57fe5b60009182526020918290206040805160608101825292909101546001600160801b03811683526001600160401b03600160801b82048116948401859052600160c01b90910416908201529150431115610a6e57600082815260026020526040902054801561099257600061091683602001516001600160401b03164361179e90919063ffffffff16565b9050600060075461094685604001516001600160401b0316610940610939611559565b8690611657565b90611657565b8161094d57fe5b049050610984610973846109668464e8d4a51000611657565b8161096d57fe5b04611814565b85516001600160801b031690611872565b6001600160801b0316845250505b61099b436118d1565b6001600160401b0316602083015260038054839190859081106109ba57fe5b6000918252602091829020835191018054848401516040958601516001600160801b03199092166001600160801b039094169390931767ffffffffffffffff60801b1916600160801b6001600160401b0394851602176001600160c01b0316600160c01b93909116929092029190911790558301518351915185927f0fc9545022a542541ad085d091fb09a2ab36fee366a4576ab63714ea907ad35392610a649290918691612103565b60405180910390a2505b919050565b8060005b81811015610aa357610a9a848483818110610a8e57fe5b90506020020135610877565b50600101610a77565b50505050565b610ab161192f565b6000546001600160a01b03908116911614610b01576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60085481565b60008060038481548110610b6157fe5b600091825260208083206040805160608101825291909301546001600160801b0380821683526001600160401b03600160801b83048116848601908152600160c01b9093048116848701528a8752600685528587206001600160a01b038b168852855285872084518c895260029096529590962054915192965093949290931692911643118015610bf157508015155b15610c6d576000610c1885602001516001600160401b03164361179e90919063ffffffff16565b90506000600754610c3b87604001516001600160401b0316610940610939611559565b81610c4257fe5b049050610c6883610c588364e8d4a51000611657565b81610c5f57fe5b86919004611933565b935050505b60018301548354610c9b916105f19164e8d4a5100090610c8d9087611657565b81610c9457fe5b0490611739565b979650505050505050565b60048181548110610cb657600080fd5b6000918252602090912001546001600160a01b0316905081565b610cd861192f565b6000546001600160a01b03908116911614610d28576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b610d6783610d6160038781548110610d3c57fe5b60009182526020909120015460075490600160c01b90046001600160401b031661179e565b90611933565b600755610d73836118d1565b60038581548110610d8057fe5b9060005260206000200160000160186101000a8154816001600160401b0302191690836001600160401b031602179055508015610df4578160058581548110610dc557fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80610e205760058481548110610e0657fe5b6000918252602090912001546001600160a01b0316610e22565b815b6001600160a01b0316847f95895a6ab1df54420d241b55243258a33e61b2194db66c1179ec521aae8e18658584604051610e5d9291906120e5565b60405180910390a350505050565b6000546001600160a01b031690565b6001600160a01b038116301415610ea35760405162461bcd60e51b815260040161035690611eac565b6000610eae84610877565b60008581526006602090815260408083206001600160a01b03871684529091529020805491925090610ee09085611933565b81558151610f179064e8d4a5100090610f039087906001600160801b0316611657565b81610f0a57fe5b6001840154919004611986565b8160010181905550600060058681548110610f2e57fe5b6000918252602090912001546001600160a01b031690508015610fb4578154604051630c3a57d560e01b81526001600160a01b03831691630c3a57d591610f81918a9189918291600091906004016120b6565b600060405180830381600087803b158015610f9b57600080fd5b505af1158015610faf573d6000803e3d6000fd5b505050505b610fe433308760048a81548110610fc757fe5b6000918252602090912001546001600160a01b03169291906119eb565b600086815260026020526040902054610ffd9086611933565b6000878152600260205260409081902091909155516001600160a01b03851690879033907f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b4790610500908a906120ad565b60066020908152600092835260408084209091529082529020805460019091015482565b61107a61192f565b6000546001600160a01b039081169116146110ca576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b60075443906110d99085611933565b6007556004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b038087166001600160a01b03199283161790925560058054938401815560009081527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0909301805492861692909116919091179055604080516060810190915290815260039060208101611186846118d1565b6001600160401b0316815260200161119d876118d1565b6001600160401b039081169091528254600181810185556000948552602094859020845192018054958501516040909501518416600160c01b026001600160c01b0395909416600160801b0267ffffffffffffffff60801b196001600160801b039094166001600160801b0319909716969096179290921694909417929092161790556004546001600160a01b03808516929086169161123c9161179e565b7f81ee0f8c5c46e2cb41984886f77a84181724abb86c32a5f6de539b07509d45e58760405161126b91906120ad565b60405180910390a450505050565b60026020526000908152604090205481565b60058181548110610cb657600080fd5b6001600160a01b0381163014156112c45760405162461bcd60e51b815260040161035690611fb4565b60006112cf84610877565b6000858152600660209081526040808320338452909152812082518154939450909264e8d4a510009161130b91906001600160801b0316611657565b8161131257fe5b04905060006113316105f184600101548461173990919063ffffffff16565b905061136c64e8d4a5100061135c86600001516001600160801b03168961165790919063ffffffff16565b8161136357fe5b84919004611739565b6001840155825461137d908761179e565b8355600087815260026020526040902054611398908761179e565b6000888152600260205260409020556001546113be906001600160a01b031686836116c9565b6000600588815481106113cd57fe5b6000918252602090912001546001600160a01b031690508015611452578354604051630c3a57d560e01b81526001600160a01b03831691630c3a57d59161141f918c9133918c918991906004016120b6565b600060405180830381600087803b15801561143957600080fd5b505af115801561144d573d6000803e3d6000fd5b505050505b611464868860048b815481106104a057fe5b856001600160a01b031688336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328a6040516114a891906120ad565b60405180910390a487336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954846040516114ea91906120ad565b60405180910390a35050505050505050565b61150461192f565b6000546001600160a01b03908116911614611554576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b600855565b60085490565b61156761192f565b6000546001600160a01b039081169116146115b7576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b6001600160a01b0381166115fc5760405162461bcd60e51b81526004018080602001828103825260268152602001806121466026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008115806116725750508082028282828161166f57fe5b04145b6116c3576040805162461bcd60e51b815260206004820152601860248201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604482015290519081900360640190fd5b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261171b908490611a41565b505050565b606061172f8484600085611af2565b90505b9392505050565b600081830381831280159061174e5750838113155b80611763575060008312801561176357508381135b6117325760405162461bcd60e51b81526004018080602001828103825260248152602001806121d36024913960400191505060405180910390fd5b808203828111156116c3576040805162461bcd60e51b8152602060048201526015602482015274426f72696e674d6174683a20556e646572666c6f7760581b604482015290519081900360640190fd5b6000808212156118105760405162461bcd60e51b815260040161035690611f7f565b5090565b60006001600160801b03821115611810576040805162461bcd60e51b815260206004820152601c60248201527f426f72696e674d6174683a2075696e74313238204f766572666c6f7700000000604482015290519081900360640190fd5b8181016001600160801b0380831690821610156116c3576040805162461bcd60e51b8152602060048201526018602482015277426f72696e674d6174683a20416464204f766572666c6f7760401b604482015290519081900360640190fd5b60006001600160401b03821115611810576040805162461bcd60e51b815260206004820152601b60248201527f426f72696e674d6174683a2075696e743634204f766572666c6f770000000000604482015290519081900360640190fd5b3390565b818101818110156116c3576040805162461bcd60e51b8152602060048201526018602482015277426f72696e674d6174683a20416464204f766572666c6f7760401b604482015290519081900360640190fd5b600082820181831280159061199b5750838112155b806119b057506000831280156119b057508381125b6117325760405162461bcd60e51b815260040180806020018281038252602181526020018061216c6021913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610aa39085905b6000611a96826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117209092919063ffffffff16565b80519091501561171b57808060200190516020811015611ab557600080fd5b505161171b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806121f7602a913960400191505060405180910390fd5b606082471015611b335760405162461bcd60e51b815260040180806020018281038252602681526020018061218d6026913960400191505060405180910390fd5b611b3c85611c42565b611b8d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611bcb5780518252601f199092019160209182019101611bac565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611c2d576040519150601f19603f3d011682016040523d82523d6000602084013e611c32565b606091505b5091509150610c9b828286611c48565b3b151590565b60608315611c57575081611732565b825115611c675782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611cb1578181015183820152602001611c99565b50505050905090810190601f168015611cde5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604080516060810182526000808252602082018190529181019190915290565b600060208284031215611d1d578081fd5b81356117328161212d565b60008060208385031215611d3a578081fd5b82356001600160401b0380821115611d50578283fd5b818501915085601f830112611d63578283fd5b813581811115611d71578384fd5b8660208083028501011115611d84578384fd5b60209290920196919550909350505050565b600060208284031215611da7578081fd5b5035919050565b60008060408385031215611dc0578182fd5b823591506020830135611dd28161212d565b809150509250929050565b600080600060608486031215611df1578081fd5b833592506020840135611e038161212d565b91506040840135611e138161212d565b809150509250925092565b600080600060608486031215611e32578283fd5b83359250602084013591506040840135611e138161212d565b60008060008060808587031215611e60578081fd5b84359350602085013592506040850135611e798161212d565b915060608501358015158114611e8d578182fd5b939692955090935050565b6001600160a01b0391909116815260200190565b60208082526022908201527f43616e6e6f74206465706f73697420746f207374616b696e6720636f6e74726160408201526118dd60f21b606082015260800190565b6020808252602f908201527f43616e6e6f7420656d657267656e63792077697468647261772066726f6d207360408201526e1d185ada5b99c818dbdb9d1c9858dd608a1b606082015260800190565b60208082526022908201527f43616e6e6f74206861727665737420746f207374616b696e6720636f6e74726160408201526118dd60f21b606082015260800190565b6020808252818101527f53616665436173743a2076616c7565206d75737420626520706f736974697665604082015260600190565b60208082526031908201527f43616e6e6f7420776974686472617720616e6420686172766573742066726f6d604082015270081cdd185ada5b99c818dbdb9d1c9858dd607a1b606082015260800190565b60208082526025908201527f43616e6e6f742077697468647261772066726f6d207374616b696e6720636f6e6040820152641d1c9858dd60da1b606082015260800190565b81516001600160801b031681526020808301516001600160401b0390811691830191909152604092830151169181019190915260600190565b6001600160801b039390931683526001600160401b03918216602084015216604082015260600190565b90815260200190565b9485526001600160a01b0393841660208601529190921660408401526060830191909152608082015260a00190565b9182521515602082015260400190565b918252602082015260400190565b6001600160401b0393909316835260208301919091526001600160801b0316604082015260600190565b6001600160a01b038116811461214257600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725369676e6564536166654d6174683a207375627472616374696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f0f8b76d509fa8455fedc1f1070c90f10fab2b704a6b6693902693ba741fa71a64736f6c634300070600336aa56fa5b99019a5c80000006007556a87b0b4d075b8302fffffff196008557728c87cb5c89a2571ebfdcb5485a56add906fe65a38000000600a5560c06040526009608081905268183c18102a37b5b2b760b91b60a09081526200006791600b91906200098b565b506040805180820190915260038082526203078360ec1b60209092019182526200009491600c916200098b565b50600d805460ff19166012179055611388600e819055600f819055601155348015620000bf57600080fd5b50604051620026dc380380620026dc83398181016040526060811015620000e557600080fd5b508051602082015160409092015190919060006200010262000269565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350916000805160206200269c833981519152908290a350601280546001600160a01b038086166001600160a01b0319928316179092556010805492851692909116919091179055600854600160006200017c62000269565b6001600160a01b0390811682526020808301939093526040918201600090812094909455858116845260049092528083208054600160ff19918216811790925530855282852080548216831790559287168452922080549091169091179055620001e6826200026d565b620001f181620004c6565b620001fb62000269565b6001600160a01b031660006001600160a01b0316600080516020620026bc8339815191526007546040518082815260200191505060405180910390a3600a5460408051918252516000918291600080516020620026bc8339815191529181900360200190a350505062000a37565b3390565b6200027762000269565b6000546001600160a01b03908116911614620002c9576040805162461bcd60e51b815260206004820181905260248201526000805160206200267c833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526005602052604090205460ff161562000338576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b60065460051162000390576040805162461bcd60e51b815260206004820152601a60248201527f546f6f206d616e79206578636c75646564206163636f756e7473000000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205415620003ed576001600160a01b038116600090815260016020526040902054620003d390620005b3565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b0381166000908152600560205260408120805460ff191660011790556200041a62000627565b9150506000811162000473576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f74206578636c75646520616c6c20686f6c64657273000000000000604482015290519081900360640190fd5b50600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0392909216919091179055565b620004d062000269565b6000546001600160a01b0390811691161462000522576040805162461bcd60e51b815260206004820181905260248201526000805160206200267c833981519152604482015290519081900360640190fd5b6001600160a01b038116620005695760405162461bcd60e51b8152600401808060200182810382526026815260200180620026566026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216916000805160206200269c83398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000600854821115620005f85760405162461bcd60e51b815260040180806020018281038252602a8152602001806200262c602a913960400191505060405180910390fd5b600062000604620007c0565b9050620006208184620007f360201b62000fb11790919060201c565b9392505050565b6008546007546000918291825b6006548110156200077d578260016000600684815481106200065257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180620006b957508160026000600684815481106200069257fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15620006d25760085460075494509450505050620007bc565b620007216001600060068481548110620006e857fe5b60009182526020808320909101546001600160a01b03168352828101939093526040909101902054859162000ffa6200083d821b17901c565b92506200077260026000600684815481106200073957fe5b60009182526020808320909101546001600160a01b03168352828101939093526040909101902054849162000ffa6200083d821b17901c565b915060010162000634565b506200079c600754600854620007f360201b62000fb11790919060201c565b821015620007b657600854600754935093505050620007bc565b90925090505b9091565b60008080620007ce62000627565b91509150620007ec8183620007f360201b62000fb11790919060201c565b9250505090565b60006200062083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506200088760201b60201c565b60006200062083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506200092e60201b60201c565b60008183620009175760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620008db578181015183820152602001620008c1565b50505050905090810190601f168015620009095780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200092457fe5b0495945050505050565b60008184841115620009835760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315620008db578181015183820152602001620008c1565b505050900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620009c3576000855562000a0e565b82601f10620009de57805160ff191683800117855562000a0e565b8280016001018555821562000a0e579182015b8281111562000a0e578251825591602001919060010190620009f1565b5062000a1c92915062000a20565b5090565b5b8082111562000a1c576000815560010162000a21565b611be58062000a476000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80635342acb411610104578063a457c2d7116100a2578063c0b0fda211610071578063c0b0fda21461050f578063dd62ed3e14610517578063ea2f0b3714610545578063f2fde38b1461056b576101cf565b8063a457c2d7146104a7578063a9059cbb146104d3578063aa45026b146104ff578063ae85028114610507576101cf565b806375c3690c116100de57806375c3690c1461046957806388f82020146104715780638da5cb5b1461049757806395d89b411461049f576101cf565b80635342acb41461041557806370a082311461043b578063715018a614610461576101cf565b80632d83811911610171578063395093511161014b5780633950935114610378578063437823ec146103a45780634549b039146103ca57806352390c02146103ef576101cf565b80632d8381191461033557806330f8d95a14610352578063313ce5671461035a576101cf565b806313114a9d116101ad57806313114a9d146102b557806318160ddd146102cf5780631f53ac02146102d757806323b872dd146102ff576101cf565b806306fdde03146101d4578063095ea7b31461025157806311a63e1714610291575b600080fd5b6101dc610591565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102165781810151838201526020016101fe565b50505050905090810190601f1680156102435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61027d6004803603604081101561026757600080fd5b506001600160a01b038135169060200135610627565b604080519115158252519081900360200190f35b610299610645565b604080516001600160a01b039092168252519081900360200190f35b6102bd610654565b60408051918252519081900360200190f35b6102bd61065a565b6102fd600480360360208110156102ed57600080fd5b50356001600160a01b0316610660565b005b61027d6004803603606081101561031557600080fd5b506001600160a01b038135811691602081013590911690604001356106da565b6102bd6004803603602081101561034b57600080fd5b5035610761565b6102996107c3565b6103626107d2565b6040805160ff9092168252519081900360200190f35b61027d6004803603604081101561038e57600080fd5b506001600160a01b0381351690602001356107db565b6102fd600480360360208110156103ba57600080fd5b50356001600160a01b0316610829565b6102bd600480360360408110156103e057600080fd5b508035906020013515156108a5565b6102fd6004803603602081101561040557600080fd5b50356001600160a01b031661093f565b61027d6004803603602081101561042b57600080fd5b50356001600160a01b0316610b8c565b6102bd6004803603602081101561045157600080fd5b50356001600160a01b0316610baa565b6102fd610c51565b6102bd610cf3565b61027d6004803603602081101561048757600080fd5b50356001600160a01b0316610cf9565b610299610d17565b6101dc610d26565b61027d600480360360408110156104bd57600080fd5b506001600160a01b038135169060200135610d87565b61027d600480360360408110156104e957600080fd5b506001600160a01b038135169060200135610def565b6102bd610e03565b6102bd610e09565b6102bd610e0f565b6102bd6004803603604081101561052d57600080fd5b506001600160a01b0381358116916020013516610e15565b6102fd6004803603602081101561055b57600080fd5b50356001600160a01b0316610e40565b6102fd6004803603602081101561058157600080fd5b50356001600160a01b0316610eb9565b600b8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561061d5780601f106105f25761010080835404028352916020019161061d565b820191906000526020600020905b81548152906001019060200180831161060057829003601f168201915b5050505050905090565b600061063b61063461103c565b8484611040565b5060015b92915050565b6012546001600160a01b031681565b60095490565b60075490565b61066861103c565b6000546001600160a01b039081169116146106b8576040805162461bcd60e51b81526020600482018190526024820152600080516020611b22833981519152604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60006106e784848461112c565b610757846106f361103c565b61075285604051806060016040528060288152602001611afa602891396001600160a01b038a1660009081526003602052604081209061073161103c565b6001600160a01b031681526020810191909152604001600020549190611350565b611040565b5060019392505050565b60006008548211156107a45760405162461bcd60e51b815260040180806020018281038252602a815260200180611a67602a913960400191505060405180910390fd5b60006107ae6113e7565b90506107ba8382610fb1565b9150505b919050565b6010546001600160a01b031681565b600d5460ff1690565b600061063b6107e861103c565b8461075285600360006107f961103c565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061140a565b61083161103c565b6000546001600160a01b03908116911614610881576040805162461bcd60e51b81526020600482018190526024820152600080516020611b22833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b60006007548311156108fe576040805162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604482015290519081900360640190fd5b81610921576000610913846000611388611464565b5092945061063f9350505050565b6000610931846000611388611464565b5091945061063f9350505050565b61094761103c565b6000546001600160a01b03908116911614610997576040805162461bcd60e51b81526020600482018190526024820152600080516020611b22833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526005602052604090205460ff1615610a05576040805162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015290519081900360640190fd5b600654600511610a5c576040805162461bcd60e51b815260206004820152601a60248201527f546f6f206d616e79206578636c75646564206163636f756e7473000000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205415610ab6576001600160a01b038116600090815260016020526040902054610a9c90610761565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b0381166000908152600560205260408120805460ff19166001179055610ae16114ae565b91505060008111610b39576040805162461bcd60e51b815260206004820152601a60248201527f43616e6e6f74206578636c75646520616c6c20686f6c64657273000000000000604482015290519081900360640190fd5b50600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526004602052604090205460ff1690565b6001600160a01b03811660009081526005602052604081205460ff1615610bea57506001600160a01b0381166000908152600260205260409020546107be565b6001600160a01b038216610c2f57600a546001600160a01b038316600090815260016020526040902054610c289190610c2290610761565b9061140a565b90506107be565b6001600160a01b03821660009081526001602052604090205461063f90610761565b610c5961103c565b6000546001600160a01b03908116911614610ca9576040805162461bcd60e51b81526020600482018190526024820152600080516020611b22833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61138881565b6001600160a01b031660009081526005602052604090205460ff1690565b6000546001600160a01b031690565b600c8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561061d5780601f106105f25761010080835404028352916020019161061d565b600061063b610d9461103c565b8461075285604051806060016040528060258152602001611b8b6025913960036000610dbe61103c565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611350565b600061063b610dfc61103c565b848461112c565b60115481565b600f5481565b600e5481565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b610e4861103c565b6000546001600160a01b03908116911614610e98576040805162461bcd60e51b81526020600482018190526024820152600080516020611b22833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600460205260409020805460ff19169055565b610ec161103c565b6000546001600160a01b03908116911614610f11576040805162461bcd60e51b81526020600482018190526024820152600080516020611b22833981519152604482015290519081900360640190fd5b6001600160a01b038116610f565760405162461bcd60e51b8152600401808060200182810382526026815260200180611a916026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ff383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611611565b9392505050565b6000610ff383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611350565b3390565b6001600160a01b0383166110855760405162461bcd60e51b8152600401808060200182810382526024815260200180611b676024913960400191505060405180910390fd5b6001600160a01b0382166110ca5760405162461bcd60e51b8152600401808060200182810382526022815260200180611ab76022913960400191505060405180910390fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166111715760405162461bcd60e51b8152600401808060200182810382526025815260200180611b426025913960400191505060405180910390fd5b6001600160a01b038316600090815260046020526040812054819081908190819060ff161580156111bb57506001600160a01b03871660009081526004602052604090205460ff16155b156111f7576111c986611676565b94506111d48661169a565b93506111df866116b8565b92506111ef83610c22878761140a565b915061138890505b6001600160a01b03881660009081526005602052604090205460ff16801561123857506001600160a01b03871660009081526005602052604090205460ff16155b1561124f5761124a88888885856116d6565b611301565b6001600160a01b03881660009081526005602052604090205460ff1615801561129057506001600160a01b03871660009081526005602052604090205460ff165b156112a25761124a88888885856117f8565b6001600160a01b03881660009081526005602052604090205460ff1680156112e257506001600160a01b03871660009081526005602052604090205460ff165b156112f45761124a88888885856118a0565b611301888888858561191a565b6113108860008760008061191a565b60125461132b9089906001600160a01b03168660008061191a565b6010546113469089906001600160a01b0316856000806117f8565b5050505050505050565b600081848411156113df5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113a457818101518382015260200161138c565b50505050905090810190601f1680156113d15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008060006113f46114ae565b90925090506114038282610fb1565b9250505090565b600082820183811015610ff3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080600080600080600061147a8a8a8a61195d565b9150915060008060006114958d856114906113e7565b611988565b919f909e50909c50949a50929850929650505050505050565b6008546007546000918291825b6006548110156115df578260016000600684815481106114d757fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061153c575081600260006006848154811061151557fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611553576008546007549450945050505061160d565b611593600160006006848154811061156757fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490610ffa565b92506115d560026000600684815481106115a957fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390610ffa565b91506001016114bb565b506007546008546115ef91610fb1565b8210156116075760085460075493509350505061160d565b90925090505b9091565b600081836116605760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156113a457818101518382015260200161138c565b50600083858161166c57fe5b0495945050505050565b600061063f620f4240611694600e54856119c490919063ffffffff16565b90610fb1565b600061063f620f4240611694601154856119c490919063ffffffff16565b600061063f620f4240611694600f54856119c490919063ffffffff16565b6000808080806116f06116e98989610ffa565b8888611464565b6001600160a01b038f16600090815260026020526040902054949950929750909550935091506117209089610ffa565b6001600160a01b038b1660009081526002602090815260408083209390935560019052205461174f9086610ffa565b6001600160a01b03808c1660009081526001602052604080822093909355908b168152205461177e908561140a565b6001600160a01b038a166000908152600160205260409020556117a18382611a1d565b886001600160a01b03168a6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050505050505050565b60008080808061180b6116e98989610ffa565b6001600160a01b038f166000908152600160205260409020549499509297509095509350915061183b9086610ffa565b6001600160a01b03808c16600090815260016020908152604080832094909455918c16815260029091522054611871908361140a565b6001600160a01b038a1660009081526002602090815260408083209390935560019052205461177e908561140a565b6000808080806118b36116e98989610ffa565b9398509196509450925090506118eb6118cc8989610ffa565b6001600160a01b038c1660009081526002602052604090205490610ffa565b6001600160a01b038b1660009081526002602090815260408083209390935560019052205461183b9086610ffa565b60008080808061192d6116e98989610ffa565b6001600160a01b038f166000908152600160205260409020549499509297509095509350915061174f9086610ffa565b600080600061196d868686611a41565b9050600061197b8783610ffa565b9791965090945050505050565b600080808061199787866119c4565b905060006119a587876119c4565b905060006119b38383610ffa565b929992985090965090945050505050565b6000826119d35750600061063f565b828202828482816119e057fe5b0414610ff35760405162461bcd60e51b8152600401808060200182810382526021815260200180611ad96021913960400191505060405180910390fd5b600854611a2a9083610ffa565b600855600954611a3a908261140a565b6009555050565b6000611a5e620f424061169484611a58888861140a565b906119c4565b94935050505056fe416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220874805c0d3f681387a42973e4696c2e09a72a7d0786f329c3b0d7f250a75272764736f6c63430007060033416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564000000000000000000000000ba0910e8739be6a5c8455545a4c32880993a9a6a0000000000000000000000002e82d41c89811067c7f6e7b6851db1b4e20103fa

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c806378ed5d1f116100c3578063be0545431161007c578063be054543146102c0578063c346253d146102d3578063d1abb907146102e6578063e0ada28e146102f9578063e5a2e67b1461030c578063f2fde38b1461031457610158565b806378ed5d1f1461024b57806388bba42f1461025e5780638da5cb5b146102715780638dbdbe6d1461027957806393f1a40b1461028c578063ab7de098146102ad57610158565b80634beddb6f116101155780634beddb6f146101e057806351eb05a6146101f557806357a5b58c14610215578063715018a61461022857806374417fcd14610230578063768237421461023857610158565b8063081e3eda1461015d5780630ad58d2f1461017b5780631526fe271461019057806317caf6f1146101b257806318fccc76146101ba5780632f940c70146101cd575b600080fd5b610165610327565b60405161017291906120ad565b60405180910390f35b61018e610189366004611e1e565b61032d565b005b6101a361019e366004611d96565b610510565b60405161017293929190612083565b610165610555565b61018e6101c8366004611dae565b61055b565b61018e6101db366004611dae565b6106fb565b6101e8610868565b6040516101729190611e98565b610208610203366004611d96565b610877565b604051610172919061204a565b61018e610223366004611d28565b610a73565b61018e610aa9565b610165610b4b565b610165610246366004611dae565b610b51565b6101e8610259366004611d96565b610ca6565b61018e61026c366004611e4b565b610cd0565b6101e8610e6b565b61018e610287366004611e1e565b610e7a565b61029f61029a366004611dae565b61104e565b6040516101729291906120f5565b61018e6102bb366004611ddd565b611072565b6101656102ce366004611d96565b611279565b6101e86102e1366004611d96565b61128b565b61018e6102f4366004611e1e565b61129b565b61018e610307366004611d96565b6114fc565b610165611559565b61018e610322366004611d0c565b61155f565b60035490565b6001600160a01b03811630141561035f5760405162461bcd60e51b815260040161035690612005565b60405180910390fd5b600061036a84610877565b600085815260066020908152604080832033845290915290208151919250906103bc9064e8d4a51000906103a89087906001600160801b0316611657565b816103af57fe5b6001840154919004611739565b600182015580546103cd908561179e565b81556000858152600260205260409020546103e8908561179e565b600086815260026020526040812091909155600580548790811061040857fe5b6000918252602090912001546001600160a01b03169050801561048e578154604051630c3a57d560e01b81526001600160a01b03831691630c3a57d59161045b918a9133918a91600091906004016120b6565b600060405180830381600087803b15801561047557600080fd5b505af1158015610489573d6000803e3d6000fd5b505050505b6104bc8486600489815481106104a057fe5b6000918252602090912001546001600160a01b031691906116c9565b836001600160a01b031686336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328860405161050091906120ad565b60405180910390a4505050505050565b6003818154811061052057600080fd5b6000918252602090912001546001600160801b03811691506001600160401b03600160801b8204811691600160c01b90041683565b60075481565b6001600160a01b0381163014156105845760405162461bcd60e51b815260040161035690611f3d565b600061058f83610877565b6000848152600660209081526040808320338452909152812082518154939450909264e8d4a51000916105cb91906001600160801b0316611657565b816105d257fe5b04905060006105f66105f184600101548461173990919063ffffffff16565b6117ee565b600184018390559050801561061c5760015461061c906001600160a01b031686836116c9565b60006005878154811061062b57fe5b6000918252602090912001546001600160a01b0316905080156106b0578354604051630c3a57d560e01b81526001600160a01b03831691630c3a57d59161067d918b9133918c918991906004016120b6565b600060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505050505b86336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954846040516106ea91906120ad565b60405180910390a350505050505050565b6001600160a01b0381163014156107245760405162461bcd60e51b815260040161035690611eee565b60008281526006602090815260408083203384528252808320805484825560018201859055868552600290935292205461075e908261179e565b600085815260026020526040812091909155600580548690811061077e57fe5b6000918252602090912001546001600160a01b03169050801561080357604051630c3a57d560e01b81526001600160a01b03821690630c3a57d5906107d09088903390899060009081906004016120b6565b600060405180830381600087803b1580156107ea57600080fd5b505af11580156107fe573d6000803e3d6000fd5b505050505b6108158483600488815481106104a057fe5b836001600160a01b031685336001600160a01b03167f2cac5e20e1541d836381527a43f651851e302817b71dc8e810284e69210c1c6b8560405161085991906120ad565b60405180910390a45050505050565b6001546001600160a01b031681565b61087f611cec565b6003828154811061088c57fe5b60009182526020918290206040805160608101825292909101546001600160801b03811683526001600160401b03600160801b82048116948401859052600160c01b90910416908201529150431115610a6e57600082815260026020526040902054801561099257600061091683602001516001600160401b03164361179e90919063ffffffff16565b9050600060075461094685604001516001600160401b0316610940610939611559565b8690611657565b90611657565b8161094d57fe5b049050610984610973846109668464e8d4a51000611657565b8161096d57fe5b04611814565b85516001600160801b031690611872565b6001600160801b0316845250505b61099b436118d1565b6001600160401b0316602083015260038054839190859081106109ba57fe5b6000918252602091829020835191018054848401516040958601516001600160801b03199092166001600160801b039094169390931767ffffffffffffffff60801b1916600160801b6001600160401b0394851602176001600160c01b0316600160c01b93909116929092029190911790558301518351915185927f0fc9545022a542541ad085d091fb09a2ab36fee366a4576ab63714ea907ad35392610a649290918691612103565b60405180910390a2505b919050565b8060005b81811015610aa357610a9a848483818110610a8e57fe5b90506020020135610877565b50600101610a77565b50505050565b610ab161192f565b6000546001600160a01b03908116911614610b01576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60085481565b60008060038481548110610b6157fe5b600091825260208083206040805160608101825291909301546001600160801b0380821683526001600160401b03600160801b83048116848601908152600160c01b9093048116848701528a8752600685528587206001600160a01b038b168852855285872084518c895260029096529590962054915192965093949290931692911643118015610bf157508015155b15610c6d576000610c1885602001516001600160401b03164361179e90919063ffffffff16565b90506000600754610c3b87604001516001600160401b0316610940610939611559565b81610c4257fe5b049050610c6883610c588364e8d4a51000611657565b81610c5f57fe5b86919004611933565b935050505b60018301548354610c9b916105f19164e8d4a5100090610c8d9087611657565b81610c9457fe5b0490611739565b979650505050505050565b60048181548110610cb657600080fd5b6000918252602090912001546001600160a01b0316905081565b610cd861192f565b6000546001600160a01b03908116911614610d28576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b610d6783610d6160038781548110610d3c57fe5b60009182526020909120015460075490600160c01b90046001600160401b031661179e565b90611933565b600755610d73836118d1565b60038581548110610d8057fe5b9060005260206000200160000160186101000a8154816001600160401b0302191690836001600160401b031602179055508015610df4578160058581548110610dc557fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80610e205760058481548110610e0657fe5b6000918252602090912001546001600160a01b0316610e22565b815b6001600160a01b0316847f95895a6ab1df54420d241b55243258a33e61b2194db66c1179ec521aae8e18658584604051610e5d9291906120e5565b60405180910390a350505050565b6000546001600160a01b031690565b6001600160a01b038116301415610ea35760405162461bcd60e51b815260040161035690611eac565b6000610eae84610877565b60008581526006602090815260408083206001600160a01b03871684529091529020805491925090610ee09085611933565b81558151610f179064e8d4a5100090610f039087906001600160801b0316611657565b81610f0a57fe5b6001840154919004611986565b8160010181905550600060058681548110610f2e57fe5b6000918252602090912001546001600160a01b031690508015610fb4578154604051630c3a57d560e01b81526001600160a01b03831691630c3a57d591610f81918a9189918291600091906004016120b6565b600060405180830381600087803b158015610f9b57600080fd5b505af1158015610faf573d6000803e3d6000fd5b505050505b610fe433308760048a81548110610fc757fe5b6000918252602090912001546001600160a01b03169291906119eb565b600086815260026020526040902054610ffd9086611933565b6000878152600260205260409081902091909155516001600160a01b03851690879033907f02d7e648dd130fc184d383e55bb126ac4c9c60e8f94bf05acdf557ba2d540b4790610500908a906120ad565b60066020908152600092835260408084209091529082529020805460019091015482565b61107a61192f565b6000546001600160a01b039081169116146110ca576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b60075443906110d99085611933565b6007556004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b038087166001600160a01b03199283161790925560058054938401815560009081527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0909301805492861692909116919091179055604080516060810190915290815260039060208101611186846118d1565b6001600160401b0316815260200161119d876118d1565b6001600160401b039081169091528254600181810185556000948552602094859020845192018054958501516040909501518416600160c01b026001600160c01b0395909416600160801b0267ffffffffffffffff60801b196001600160801b039094166001600160801b0319909716969096179290921694909417929092161790556004546001600160a01b03808516929086169161123c9161179e565b7f81ee0f8c5c46e2cb41984886f77a84181724abb86c32a5f6de539b07509d45e58760405161126b91906120ad565b60405180910390a450505050565b60026020526000908152604090205481565b60058181548110610cb657600080fd5b6001600160a01b0381163014156112c45760405162461bcd60e51b815260040161035690611fb4565b60006112cf84610877565b6000858152600660209081526040808320338452909152812082518154939450909264e8d4a510009161130b91906001600160801b0316611657565b8161131257fe5b04905060006113316105f184600101548461173990919063ffffffff16565b905061136c64e8d4a5100061135c86600001516001600160801b03168961165790919063ffffffff16565b8161136357fe5b84919004611739565b6001840155825461137d908761179e565b8355600087815260026020526040902054611398908761179e565b6000888152600260205260409020556001546113be906001600160a01b031686836116c9565b6000600588815481106113cd57fe5b6000918252602090912001546001600160a01b031690508015611452578354604051630c3a57d560e01b81526001600160a01b03831691630c3a57d59161141f918c9133918c918991906004016120b6565b600060405180830381600087803b15801561143957600080fd5b505af115801561144d573d6000803e3d6000fd5b505050505b611464868860048b815481106104a057fe5b856001600160a01b031688336001600160a01b03167f8166bf25f8a2b7ed3c85049207da4358d16edbed977d23fa2ee6f0dde3ec21328a6040516114a891906120ad565b60405180910390a487336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954846040516114ea91906120ad565b60405180910390a35050505050505050565b61150461192f565b6000546001600160a01b03908116911614611554576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b600855565b60085490565b61156761192f565b6000546001600160a01b039081169116146115b7576040805162461bcd60e51b815260206004820181905260248201526000805160206121b3833981519152604482015290519081900360640190fd5b6001600160a01b0381166115fc5760405162461bcd60e51b81526004018080602001828103825260268152602001806121466026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008115806116725750508082028282828161166f57fe5b04145b6116c3576040805162461bcd60e51b815260206004820152601860248201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604482015290519081900360640190fd5b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261171b908490611a41565b505050565b606061172f8484600085611af2565b90505b9392505050565b600081830381831280159061174e5750838113155b80611763575060008312801561176357508381135b6117325760405162461bcd60e51b81526004018080602001828103825260248152602001806121d36024913960400191505060405180910390fd5b808203828111156116c3576040805162461bcd60e51b8152602060048201526015602482015274426f72696e674d6174683a20556e646572666c6f7760581b604482015290519081900360640190fd5b6000808212156118105760405162461bcd60e51b815260040161035690611f7f565b5090565b60006001600160801b03821115611810576040805162461bcd60e51b815260206004820152601c60248201527f426f72696e674d6174683a2075696e74313238204f766572666c6f7700000000604482015290519081900360640190fd5b8181016001600160801b0380831690821610156116c3576040805162461bcd60e51b8152602060048201526018602482015277426f72696e674d6174683a20416464204f766572666c6f7760401b604482015290519081900360640190fd5b60006001600160401b03821115611810576040805162461bcd60e51b815260206004820152601b60248201527f426f72696e674d6174683a2075696e743634204f766572666c6f770000000000604482015290519081900360640190fd5b3390565b818101818110156116c3576040805162461bcd60e51b8152602060048201526018602482015277426f72696e674d6174683a20416464204f766572666c6f7760401b604482015290519081900360640190fd5b600082820181831280159061199b5750838112155b806119b057506000831280156119b057508381125b6117325760405162461bcd60e51b815260040180806020018281038252602181526020018061216c6021913960400191505060405180910390fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610aa39085905b6000611a96826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117209092919063ffffffff16565b80519091501561171b57808060200190516020811015611ab557600080fd5b505161171b5760405162461bcd60e51b815260040180806020018281038252602a8152602001806121f7602a913960400191505060405180910390fd5b606082471015611b335760405162461bcd60e51b815260040180806020018281038252602681526020018061218d6026913960400191505060405180910390fd5b611b3c85611c42565b611b8d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310611bcb5780518252601f199092019160209182019101611bac565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611c2d576040519150601f19603f3d011682016040523d82523d6000602084013e611c32565b606091505b5091509150610c9b828286611c48565b3b151590565b60608315611c57575081611732565b825115611c675782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611cb1578181015183820152602001611c99565b50505050905090810190601f168015611cde5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b604080516060810182526000808252602082018190529181019190915290565b600060208284031215611d1d578081fd5b81356117328161212d565b60008060208385031215611d3a578081fd5b82356001600160401b0380821115611d50578283fd5b818501915085601f830112611d63578283fd5b813581811115611d71578384fd5b8660208083028501011115611d84578384fd5b60209290920196919550909350505050565b600060208284031215611da7578081fd5b5035919050565b60008060408385031215611dc0578182fd5b823591506020830135611dd28161212d565b809150509250929050565b600080600060608486031215611df1578081fd5b833592506020840135611e038161212d565b91506040840135611e138161212d565b809150509250925092565b600080600060608486031215611e32578283fd5b83359250602084013591506040840135611e138161212d565b60008060008060808587031215611e60578081fd5b84359350602085013592506040850135611e798161212d565b915060608501358015158114611e8d578182fd5b939692955090935050565b6001600160a01b0391909116815260200190565b60208082526022908201527f43616e6e6f74206465706f73697420746f207374616b696e6720636f6e74726160408201526118dd60f21b606082015260800190565b6020808252602f908201527f43616e6e6f7420656d657267656e63792077697468647261772066726f6d207360408201526e1d185ada5b99c818dbdb9d1c9858dd608a1b606082015260800190565b60208082526022908201527f43616e6e6f74206861727665737420746f207374616b696e6720636f6e74726160408201526118dd60f21b606082015260800190565b6020808252818101527f53616665436173743a2076616c7565206d75737420626520706f736974697665604082015260600190565b60208082526031908201527f43616e6e6f7420776974686472617720616e6420686172766573742066726f6d604082015270081cdd185ada5b99c818dbdb9d1c9858dd607a1b606082015260800190565b60208082526025908201527f43616e6e6f742077697468647261772066726f6d207374616b696e6720636f6e6040820152641d1c9858dd60da1b606082015260800190565b81516001600160801b031681526020808301516001600160401b0390811691830191909152604092830151169181019190915260600190565b6001600160801b039390931683526001600160401b03918216602084015216604082015260600190565b90815260200190565b9485526001600160a01b0393841660208601529190921660408401526060830191909152608082015260a00190565b9182521515602082015260400190565b918252602082015260400190565b6001600160401b0393909316835260208301919091526001600160801b0316604082015260600190565b6001600160a01b038116811461214257600080fd5b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725369676e6564536166654d6174683a207375627472616374696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220f0f8b76d509fa8455fedc1f1070c90f10fab2b704a6b6693902693ba741fa71a64736f6c63430007060033

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

000000000000000000000000ba0910e8739be6a5c8455545a4c32880993a9a6a0000000000000000000000002e82d41c89811067c7f6e7b6851db1b4e20103fa

-----Decoded View---------------
Arg [0] : devWallet (address): 0xBa0910e8739be6A5c8455545A4C32880993a9a6A
Arg [1] : reward (address): 0x2E82d41c89811067c7f6E7b6851DB1B4e20103fA

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ba0910e8739be6a5c8455545a4c32880993a9a6a
Arg [1] : 0000000000000000000000002e82d41c89811067c7f6e7b6851db1b4e20103fa


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  ]
[ 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.