ETH Price: $2,073.04 (-1.36%)
Gas: 0.12 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Exit180793282023-09-06 18:56:11938 days ago1694026571IN
0x27FC644f...8E5F4e034
0 ETH0.0036728124
Exit161999722022-12-16 21:34:591202 days ago1671226499IN
0x27FC644f...8E5F4e034
0 ETH0.0020428715.42220642
Exit156900862022-10-06 15:55:231273 days ago1665071723IN
0x27FC644f...8E5F4e034
0 ETH0.0026063417.3751882
Stake147417232022-05-09 9:47:581423 days ago1652089678IN
0x27FC644f...8E5F4e034
0 ETH0.0026230518.43053888
Unstake147416572022-05-09 9:31:241423 days ago1652088684IN
0x27FC644f...8E5F4e034
0 ETH0.0020167219.61092117
Unstake144750902022-03-28 14:05:361465 days ago1648476336IN
0x27FC644f...8E5F4e034
0 ETH0.0068425652.31439342
Unstake143846152022-03-14 12:04:071479 days ago1647259447IN
0x27FC644f...8E5F4e034
0 ETH0.0019753318.1394427
Get Reward143846102022-03-14 12:03:341479 days ago1647259414IN
0x27FC644f...8E5F4e034
0 ETH0.0013572319.41230463
Unstake143836142022-03-14 8:22:181479 days ago1647246138IN
0x27FC644f...8E5F4e034
0 ETH0.0032605921.66980588
Get Reward142814222022-02-26 11:24:361495 days ago1645874676IN
0x27FC644f...8E5F4e034
0 ETH0.0020345529.09992946
Get Reward142271102022-02-18 1:21:591504 days ago1645147319IN
0x27FC644f...8E5F4e034
0 ETH0.0038672548.52024363
Unstake141789352022-02-10 14:46:241511 days ago1644504384IN
0x27FC644f...8E5F4e034
0 ETH0.0090482381.17410535
Unstake140631422022-01-23 17:04:001529 days ago1642957440IN
0x27FC644f...8E5F4e034
0 ETH0.01244011117.50702632
Stake140585962022-01-23 0:12:011530 days ago1642896721IN
0x27FC644f...8E5F4e034
0 ETH0.02218258116.95542822
Stake138931392021-12-28 10:17:451555 days ago1640686665IN
0x27FC644f...8E5F4e034
0 ETH0.0073353351.54077858
Unstake138930462021-12-28 9:55:181555 days ago1640685318IN
0x27FC644f...8E5F4e034
0 ETH0.006077848.41443181
Unstake137147752021-11-30 12:30:431583 days ago1638275443IN
0x27FC644f...8E5F4e034
0 ETH0.0123983184.09227755
Unstake136942742021-11-27 5:40:061586 days ago1637991606IN
0x27FC644f...8E5F4e034
0 ETH0.01244843121.3392013
Unstake136930912021-11-27 1:15:501587 days ago1637975750IN
0x27FC644f...8E5F4e034
0 ETH0.0121884393.18591465
Unstake136154282021-11-14 18:00:051599 days ago1636912805IN
0x27FC644f...8E5F4e034
0 ETH0.01931125128.34214546
Get Reward135804932021-11-09 6:06:041604 days ago1636437964IN
0x27FC644f...8E5F4e034
0 ETH0.01189763189.77314649
Unstake135804582021-11-09 5:57:111604 days ago1636437431IN
0x27FC644f...8E5F4e034
0 ETH0.02595566169.09558899
Unstake135674192021-11-07 5:00:021606 days ago1636261202IN
0x27FC644f...8E5F4e034
0 ETH0.01672869113.46331481
Unstake135641052021-11-06 16:36:521607 days ago1636216612IN
0x27FC644f...8E5F4e034
0 ETH0.011064884.59527456
Get Reward135640212021-11-06 16:22:411607 days ago1636215761IN
0x27FC644f...8E5F4e034
0 ETH0.00915927108.27329312
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Farm

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./INFT.sol";

contract Farm is Ownable {
    // this contract lets users stake/unstake ERC20 tokens and mints/burns ERC1155 tokens that represent their stake/membership
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IERC20 public stakeToken;
    IERC20 public rewardToken;
    struct connectedNFT {
        INFT nft;
        uint256 id;
        uint256 cost;
    }
    mapping(uint256 => connectedNFT) public connectedNFTs;
    uint256 public NFTCount;

    uint256 public constant DURATION = 14 days;
    uint256 private _totalSupply;
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;

    address public rewardDistribution;

    mapping(address => uint256) private _balances;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Unstaked(address indexed user, uint256 amount);
    event Transfered(
        address indexed user1,
        address indexed user2,
        uint256 amount
    );
    event RewardPaid(address indexed user, uint256 reward);
    event RecoverToken(address indexed token, uint256 indexed amount);

    modifier onlyRewardDistribution() {
        require(
            msg.sender == rewardDistribution,
            "Caller is not reward distribution"
        );
        _;
    }

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

    constructor(IERC20 _stakeToken, IERC20 _rewardToken) {
        stakeToken = _stakeToken;
        rewardToken = _rewardToken;
    }

    function setNFTDetails(
        INFT[] memory NFTContracts,
        uint256[] memory ids,
        uint256[] memory costs
    ) public onlyOwner {
        require(
            NFTContracts.length == ids.length && ids.length == costs.length,
            "Farm: setNFTDetails input arrays need to have same length"
        );
        for (uint256 i = 0; i < NFTContracts.length; i++) {
            connectedNFTs[i].nft = NFTContracts[i];
            connectedNFTs[i].cost = costs[i];
            connectedNFTs[i].id = ids[i];
        }
        NFTCount = NFTContracts.length;
    }

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

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

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

    function mintNFTs(uint256 oldAmount, uint256 newAmount) internal {
        for (uint256 i = 0; i < NFTCount; i++) {
            INFT nft = connectedNFTs[i].nft;
            uint256 cost = connectedNFTs[i].cost;
            uint256 id = connectedNFTs[i].id;
            if (address(nft) == address(0) || cost <= 0) {
                // NFT or cost not defined, skip id
                continue;
            }
            if (oldAmount < cost && newAmount >= cost) {
                // New amount went below threshold, mint 1
                bytes memory data;
                nft.mint(msg.sender, id, 1, data);
            }
        }
    }

    function burnNFTs(uint256 oldAmount, uint256 newAmount) internal {
        for (uint256 i = 0; i < NFTCount; i++) {
            INFT nft = connectedNFTs[i].nft;
            uint256 cost = connectedNFTs[i].cost;
            uint256 id = connectedNFTs[i].id;
            uint256 currentNFTBalance = nft.balanceOf(msg.sender, id);
            if (
                address(nft) == address(0) ||
                cost <= 0 ||
                currentNFTBalance <= 0
            ) {
                // NFT, cost, or current balance not valid, skip ID
                continue;
            }
            if (oldAmount >= cost && newAmount < cost) {
                // New amount went below threshold, burn 1
                nft.burn(msg.sender, id, 1);
            }
        }
    }

    function stake(uint256 amount) public updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");

        uint256 oldAmount = _balances[msg.sender];
        uint256 newAmount = _balances[msg.sender].add(amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        stakeToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
        mintNFTs(oldAmount, newAmount);
    }

    function unstake(uint256 amount) public updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");

        uint256 oldAmount = _balances[msg.sender];
        uint256 newAmount = _balances[msg.sender].sub(amount);

        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakeToken.safeTransfer(msg.sender, amount);
        emit Unstaked(msg.sender, amount);
        burnNFTs(oldAmount, newAmount);
    }

    function exit() external {
        unstake(balanceOf(msg.sender));
        getReward();
    }

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

    function notifyRewardAmount(uint256 reward)
        external
        onlyRewardDistribution
        updateReward(address(0))
    {
        require(
            reward < uint256(-1) / 10**22,
            "Farm: rewards too large, would lock"
        );
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(DURATION);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(DURATION);
        }
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(DURATION);
        emit RewardAdded(reward);
    }

    function setRewardDistribution(address _rewardDistribution)
        external
        onlyOwner
    {
        rewardDistribution = _rewardDistribution;
    }

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

    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    function recoverExcessToken(address token, uint256 amount)
        external
        onlyOwner
    {
        IERC20(token).safeTransfer(_msgSender(), amount);
        emit RecoverToken(token, amount);
    }
}

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

interface INFT is IERC1155 {
    function mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) external;

    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) external;

    function burn(
        address account,
        uint256 id,
        uint256 amount
    ) external;

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external;
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

import "../../introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20","name":"_stakeToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user1","type":"address"},{"indexed":true,"internalType":"address","name":"user2","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFTCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"connectedNFTs","outputs":[{"internalType":"contract INFT","name":"nft","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"cost","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverExcessToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract INFT[]","name":"NFTContracts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"costs","type":"uint256[]"}],"name":"setNFTDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526000600655600060075534801561001a57600080fd5b50604051611b2b380380611b2b8339818101604052604081101561003d57600080fd5b50805160209091015160006100506100cb565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039384166001600160a01b031991821617909155600280549290931691161790556100cf565b3390565b611a4d806100de6000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c806380faa57d116100f9578063cd3daf9d11610097578063e9fad8ee11610071578063e9fad8ee14610591578063ebe2b12b14610599578063f2fde38b146105a1578063f7c618c1146105c7576101c3565b8063cd3daf9d1461053c578063d9a20b8714610544578063df136d6514610589576101c3565b8063a694fc3a116100d3578063a694fc3a146104e3578063aa9700c514610500578063c8f33c911461052c578063cb7728ea14610534576101c3565b806380faa57d146104ad5780638b876347146104b55780638da5cb5b146104db576101c3565b80633c6b16ab1161016657806370a082311161014057806370a08231146102cc578063715018a6146102f25780637b0a47ee146102fa578063801e181414610302576101c3565b80633c6b16ab1461029f5780633d18b912146102bc57806351ed6a30146102c4576101c3565b8063101114cf116101a2578063101114cf1461024e57806318160ddd146102725780631be052891461027a5780632e17de7814610282576101c3565b80628cc262146101c85780630700037d146102005780630d68b76114610226575b600080fd5b6101ee600480360360208110156101de57600080fd5b50356001600160a01b03166105cf565b60408051918252519081900360200190f35b6101ee6004803603602081101561021657600080fd5b50356001600160a01b031661063d565b61024c6004803603602081101561023c57600080fd5b50356001600160a01b031661064f565b005b6102566106d3565b604080516001600160a01b039092168252519081900360200190f35b6101ee6106e2565b6101ee6106e9565b61024c6004803603602081101561029857600080fd5b50356106f0565b61024c600480360360208110156102b557600080fd5b503561084e565b61024c6109f5565b610256610ac7565b6101ee600480360360208110156102e257600080fd5b50356001600160a01b0316610ad6565b61024c610af1565b6101ee610b9d565b61024c6004803603606081101561031857600080fd5b81019060208101813564010000000081111561033357600080fd5b82018360208201111561034557600080fd5b8035906020019184602083028401116401000000008311171561036757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156103b757600080fd5b8201836020820111156103c957600080fd5b803590602001918460208302840111640100000000831117156103eb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561043b57600080fd5b82018360208201111561044d57600080fd5b8035906020019184602083028401116401000000008311171561046f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610ba3945050505050565b6101ee610d1a565b6101ee600480360360208110156104cb57600080fd5b50356001600160a01b0316610d2d565b610256610d3f565b61024c600480360360208110156104f957600080fd5b5035610d4e565b61024c6004803603604081101561051657600080fd5b506001600160a01b038135169060200135610ea4565b6101ee610f5c565b6101ee610f62565b6101ee610f68565b6105616004803603602081101561055a57600080fd5b5035610fb6565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b6101ee610fe1565b61024c610fe7565b6101ee611002565b61024c600480360360208110156105b757600080fd5b50356001600160a01b0316611008565b61025661110a565b6001600160a01b0381166000908152600d6020908152604080832054600c909252822054610637919061063190670de0b6b3a76400009061062b9061061c90610616610f68565b90611119565b61062588610ad6565b90611176565b906111d6565b9061123d565b92915050565b600d6020526000908152604090205481565b610657611297565b6001600160a01b0316610668610d3f565b6001600160a01b0316146106b1576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031681565b6005545b90565b6212750081565b336106f9610f68565b600955610704610d1a565b6008556001600160a01b0381161561074b5761071f816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b60008211610794576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b336000908152600b6020526040812054906107af8285611119565b6005549091506107bf9085611119565b600555336000908152600b60205260409020546107dc9085611119565b336000818152600b6020526040902091909155600154610808916001600160a01b03909116908661129b565b60408051858152905133917f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75919081900360200190a261084882826112f2565b50505050565b600a546001600160a01b031633146108975760405162461bcd60e51b81526004018080602001828103825260218152602001806119cd6021913960400191505060405180910390fd5b60006108a1610f68565b6009556108ac610d1a565b6008556001600160a01b038116156108f3576108c7816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b7678e480405d7b9658a9926345896eb19c38658a4109e55382106109485760405162461bcd60e51b815260040180806020018281038252602381526020018061190a6023913960400191505060405180910390fd5b60065442106109665761095e82621275006111d6565b6007556109a8565b6006546000906109769042611119565b9050600061098f6007548361117690919063ffffffff16565b90506109a26212750061062b868461123d565b60075550505b4260088190556109bb906212750061123d565b6006556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b336109fe610f68565b600955610a09610d1a565b6008556001600160a01b03811615610a5057610a24816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b6000610a5b336105cf565b90508015610ac357336000818152600d6020526040812055600254610a8c916001600160a01b03909116908361129b565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6001546001600160a01b031681565b6001600160a01b03166000908152600b602052604090205490565b610af9611297565b6001600160a01b0316610b0a610d3f565b6001600160a01b031614610b53576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60075481565b610bab611297565b6001600160a01b0316610bbc610d3f565b6001600160a01b031614610c05576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b81518351148015610c17575080518251145b610c525760405162461bcd60e51b81526004018080602001828103825260398152602001806119536039913960400191505060405180910390fd5b60005b8351811015610d1057838181518110610c6a57fe5b60200260200101516003600083815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818181518110610cb857fe5b60200260200101516003600083815260200190815260200160002060020181905550828181518110610ce657fe5b60209081029190910181015160008381526003909252604090912060019081019190915501610c55565b5050905160045550565b6000610d2842600654611453565b905090565b600c6020526000908152604090205481565b6000546001600160a01b031690565b33610d57610f68565b600955610d62610d1a565b6008556001600160a01b03811615610da957610d7d816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b60008211610def576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b336000908152600b602052604081205490610e0a828561123d565b600554909150610e1a908561123d565b600555336000908152600b6020526040902054610e37908561123d565b336000818152600b6020526040902091909155600154610e64916001600160a01b03909116903087611469565b60408051858152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a261084882826114c3565b610eac611297565b6001600160a01b0316610ebd610d3f565b6001600160a01b031614610f06576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b610f22610f11611297565b6001600160a01b038416908361129b565b60405181906001600160a01b038416907ffba2d3bdfb2d601eb66a89783a2c614856101cadce71556753c2edadd60c831c90600090a35050565b60085481565b60045481565b6000610f726106e2565b610f7f57506009546106e6565b610d28610fad610f8d6106e2565b61062b670de0b6b3a7640000610625600754610625600854610616610d1a565b6009549061123d565b6003602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b60095481565b610ff8610ff333610ad6565b6106f0565b6110006109f5565b565b60065481565b611010611297565b6001600160a01b0316611021610d3f565b6001600160a01b03161461106a576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b6001600160a01b0381166110af5760405162461bcd60e51b81526004018080602001828103825260268152602001806118e46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b600082821115611170576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261118557506000610637565b8282028284828161119257fe5b04146111cf5760405162461bcd60e51b815260040180806020018281038252602181526020018061198c6021913960400191505060405180910390fd5b9392505050565b600080821161122c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161123557fe5b049392505050565b6000828201838110156111cf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526112ed908490611616565b505050565b60005b6004548110156112ed576000818152600360209081526040808320805460028201546001909201548351627eeac760e11b81523360048201526024810182905293516001600160a01b039092169592949093869262fdd58e92604480840193919291829003018186803b15801561136b57600080fd5b505afa15801561137f573d6000803e3d6000fd5b505050506040513d602081101561139557600080fd5b505190506001600160a01b03841615806113ad575082155b806113b6575080155b156113c4575050505061144b565b8287101580156113d357508286105b156114465760408051637a94c56560e11b8152336004820152602481018490526001604482015290516001600160a01b0386169163f5298aca91606480830192600092919082900301818387803b15801561142d57600080fd5b505af1158015611441573d6000803e3d6000fd5b505050505b505050505b6001016112f5565b600081831061146257816111cf565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610848908590611616565b60005b6004548110156112ed576000818152600360205260409020805460028201546001909201546001600160a01b039091169190821580611503575081155b156115105750505061160e565b818610801561151f5750818510155b1561160a576060836001600160a01b031663731133e933846001856040518563ffffffff1660e01b815260040180856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156115a1578181015183820152602001611589565b50505050905090810190601f1680156115ce5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156115f057600080fd5b505af1158015611604573d6000803e3d6000fd5b50505050505b5050505b6001016114c6565b600061166b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116c79092919063ffffffff16565b8051909150156112ed5780806020019051602081101561168a57600080fd5b50516112ed5760405162461bcd60e51b815260040180806020018281038252602a8152602001806119ee602a913960400191505060405180910390fd5b60606116d684846000856116de565b949350505050565b60608247101561171f5760405162461bcd60e51b815260040180806020018281038252602681526020018061192d6026913960400191505060405180910390fd5b61172885611839565b611779576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106117b75780518252601f199092019160209182019101611798565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611819576040519150601f19603f3d011682016040523d82523d6000602084013e61181e565b606091505b509150915061182e82828661183f565b979650505050505050565b3b151590565b6060831561184e5750816111cf565b82511561185e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118a8578181015183820152602001611890565b50505050905090810190601f1680156118d55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734661726d3a207265776172647320746f6f206c617267652c20776f756c64206c6f636b416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4661726d3a207365744e465444657461696c7320696e70757420617272617973206e65656420746f20686176652073616d65206c656e677468536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657243616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ac31f3db23f56695902dabb3c8cb539143008d6ac3fec8172e84cddd37871e1864736f6c63430007060033000000000000000000000000c992a50169f6075d52013118355c633bf92ae85300000000000000000000000034f797e7190c131cf630524655a618b5bd8738e7

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c35760003560e01c806380faa57d116100f9578063cd3daf9d11610097578063e9fad8ee11610071578063e9fad8ee14610591578063ebe2b12b14610599578063f2fde38b146105a1578063f7c618c1146105c7576101c3565b8063cd3daf9d1461053c578063d9a20b8714610544578063df136d6514610589576101c3565b8063a694fc3a116100d3578063a694fc3a146104e3578063aa9700c514610500578063c8f33c911461052c578063cb7728ea14610534576101c3565b806380faa57d146104ad5780638b876347146104b55780638da5cb5b146104db576101c3565b80633c6b16ab1161016657806370a082311161014057806370a08231146102cc578063715018a6146102f25780637b0a47ee146102fa578063801e181414610302576101c3565b80633c6b16ab1461029f5780633d18b912146102bc57806351ed6a30146102c4576101c3565b8063101114cf116101a2578063101114cf1461024e57806318160ddd146102725780631be052891461027a5780632e17de7814610282576101c3565b80628cc262146101c85780630700037d146102005780630d68b76114610226575b600080fd5b6101ee600480360360208110156101de57600080fd5b50356001600160a01b03166105cf565b60408051918252519081900360200190f35b6101ee6004803603602081101561021657600080fd5b50356001600160a01b031661063d565b61024c6004803603602081101561023c57600080fd5b50356001600160a01b031661064f565b005b6102566106d3565b604080516001600160a01b039092168252519081900360200190f35b6101ee6106e2565b6101ee6106e9565b61024c6004803603602081101561029857600080fd5b50356106f0565b61024c600480360360208110156102b557600080fd5b503561084e565b61024c6109f5565b610256610ac7565b6101ee600480360360208110156102e257600080fd5b50356001600160a01b0316610ad6565b61024c610af1565b6101ee610b9d565b61024c6004803603606081101561031857600080fd5b81019060208101813564010000000081111561033357600080fd5b82018360208201111561034557600080fd5b8035906020019184602083028401116401000000008311171561036757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156103b757600080fd5b8201836020820111156103c957600080fd5b803590602001918460208302840111640100000000831117156103eb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561043b57600080fd5b82018360208201111561044d57600080fd5b8035906020019184602083028401116401000000008311171561046f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610ba3945050505050565b6101ee610d1a565b6101ee600480360360208110156104cb57600080fd5b50356001600160a01b0316610d2d565b610256610d3f565b61024c600480360360208110156104f957600080fd5b5035610d4e565b61024c6004803603604081101561051657600080fd5b506001600160a01b038135169060200135610ea4565b6101ee610f5c565b6101ee610f62565b6101ee610f68565b6105616004803603602081101561055a57600080fd5b5035610fb6565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b6101ee610fe1565b61024c610fe7565b6101ee611002565b61024c600480360360208110156105b757600080fd5b50356001600160a01b0316611008565b61025661110a565b6001600160a01b0381166000908152600d6020908152604080832054600c909252822054610637919061063190670de0b6b3a76400009061062b9061061c90610616610f68565b90611119565b61062588610ad6565b90611176565b906111d6565b9061123d565b92915050565b600d6020526000908152604090205481565b610657611297565b6001600160a01b0316610668610d3f565b6001600160a01b0316146106b1576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b031681565b6005545b90565b6212750081565b336106f9610f68565b600955610704610d1a565b6008556001600160a01b0381161561074b5761071f816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b60008211610794576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b336000908152600b6020526040812054906107af8285611119565b6005549091506107bf9085611119565b600555336000908152600b60205260409020546107dc9085611119565b336000818152600b6020526040902091909155600154610808916001600160a01b03909116908661129b565b60408051858152905133917f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75919081900360200190a261084882826112f2565b50505050565b600a546001600160a01b031633146108975760405162461bcd60e51b81526004018080602001828103825260218152602001806119cd6021913960400191505060405180910390fd5b60006108a1610f68565b6009556108ac610d1a565b6008556001600160a01b038116156108f3576108c7816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b7678e480405d7b9658a9926345896eb19c38658a4109e55382106109485760405162461bcd60e51b815260040180806020018281038252602381526020018061190a6023913960400191505060405180910390fd5b60065442106109665761095e82621275006111d6565b6007556109a8565b6006546000906109769042611119565b9050600061098f6007548361117690919063ffffffff16565b90506109a26212750061062b868461123d565b60075550505b4260088190556109bb906212750061123d565b6006556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b336109fe610f68565b600955610a09610d1a565b6008556001600160a01b03811615610a5057610a24816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b6000610a5b336105cf565b90508015610ac357336000818152600d6020526040812055600254610a8c916001600160a01b03909116908361129b565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6001546001600160a01b031681565b6001600160a01b03166000908152600b602052604090205490565b610af9611297565b6001600160a01b0316610b0a610d3f565b6001600160a01b031614610b53576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60075481565b610bab611297565b6001600160a01b0316610bbc610d3f565b6001600160a01b031614610c05576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b81518351148015610c17575080518251145b610c525760405162461bcd60e51b81526004018080602001828103825260398152602001806119536039913960400191505060405180910390fd5b60005b8351811015610d1057838181518110610c6a57fe5b60200260200101516003600083815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550818181518110610cb857fe5b60200260200101516003600083815260200190815260200160002060020181905550828181518110610ce657fe5b60209081029190910181015160008381526003909252604090912060019081019190915501610c55565b5050905160045550565b6000610d2842600654611453565b905090565b600c6020526000908152604090205481565b6000546001600160a01b031690565b33610d57610f68565b600955610d62610d1a565b6008556001600160a01b03811615610da957610d7d816105cf565b6001600160a01b0382166000908152600d6020908152604080832093909355600954600c909152919020555b60008211610def576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b336000908152600b602052604081205490610e0a828561123d565b600554909150610e1a908561123d565b600555336000908152600b6020526040902054610e37908561123d565b336000818152600b6020526040902091909155600154610e64916001600160a01b03909116903087611469565b60408051858152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a261084882826114c3565b610eac611297565b6001600160a01b0316610ebd610d3f565b6001600160a01b031614610f06576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b610f22610f11611297565b6001600160a01b038416908361129b565b60405181906001600160a01b038416907ffba2d3bdfb2d601eb66a89783a2c614856101cadce71556753c2edadd60c831c90600090a35050565b60085481565b60045481565b6000610f726106e2565b610f7f57506009546106e6565b610d28610fad610f8d6106e2565b61062b670de0b6b3a7640000610625600754610625600854610616610d1a565b6009549061123d565b6003602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b60095481565b610ff8610ff333610ad6565b6106f0565b6110006109f5565b565b60065481565b611010611297565b6001600160a01b0316611021610d3f565b6001600160a01b03161461106a576040805162461bcd60e51b815260206004820181905260248201526000805160206119ad833981519152604482015290519081900360640190fd5b6001600160a01b0381166110af5760405162461bcd60e51b81526004018080602001828103825260268152602001806118e46026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b600082821115611170576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261118557506000610637565b8282028284828161119257fe5b04146111cf5760405162461bcd60e51b815260040180806020018281038252602181526020018061198c6021913960400191505060405180910390fd5b9392505050565b600080821161122c576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161123557fe5b049392505050565b6000828201838110156111cf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526112ed908490611616565b505050565b60005b6004548110156112ed576000818152600360209081526040808320805460028201546001909201548351627eeac760e11b81523360048201526024810182905293516001600160a01b039092169592949093869262fdd58e92604480840193919291829003018186803b15801561136b57600080fd5b505afa15801561137f573d6000803e3d6000fd5b505050506040513d602081101561139557600080fd5b505190506001600160a01b03841615806113ad575082155b806113b6575080155b156113c4575050505061144b565b8287101580156113d357508286105b156114465760408051637a94c56560e11b8152336004820152602481018490526001604482015290516001600160a01b0386169163f5298aca91606480830192600092919082900301818387803b15801561142d57600080fd5b505af1158015611441573d6000803e3d6000fd5b505050505b505050505b6001016112f5565b600081831061146257816111cf565b5090919050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610848908590611616565b60005b6004548110156112ed576000818152600360205260409020805460028201546001909201546001600160a01b039091169190821580611503575081155b156115105750505061160e565b818610801561151f5750818510155b1561160a576060836001600160a01b031663731133e933846001856040518563ffffffff1660e01b815260040180856001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156115a1578181015183820152602001611589565b50505050905090810190601f1680156115ce5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156115f057600080fd5b505af1158015611604573d6000803e3d6000fd5b50505050505b5050505b6001016114c6565b600061166b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116c79092919063ffffffff16565b8051909150156112ed5780806020019051602081101561168a57600080fd5b50516112ed5760405162461bcd60e51b815260040180806020018281038252602a8152602001806119ee602a913960400191505060405180910390fd5b60606116d684846000856116de565b949350505050565b60608247101561171f5760405162461bcd60e51b815260040180806020018281038252602681526020018061192d6026913960400191505060405180910390fd5b61172885611839565b611779576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106117b75780518252601f199092019160209182019101611798565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611819576040519150601f19603f3d011682016040523d82523d6000602084013e61181e565b606091505b509150915061182e82828661183f565b979650505050505050565b3b151590565b6060831561184e5750816111cf565b82511561185e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118a8578181015183820152602001611890565b50505050905090810190601f1680156118d55780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734661726d3a207265776172647320746f6f206c617267652c20776f756c64206c6f636b416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4661726d3a207365744e465444657461696c7320696e70757420617272617973206e65656420746f20686176652073616d65206c656e677468536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657243616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ac31f3db23f56695902dabb3c8cb539143008d6ac3fec8172e84cddd37871e1864736f6c63430007060033

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

000000000000000000000000c992a50169f6075d52013118355c633bf92ae85300000000000000000000000034f797e7190c131cf630524655a618b5bd8738e7

-----Decoded View---------------
Arg [0] : _stakeToken (address): 0xC992A50169F6075d52013118355C633Bf92Ae853
Arg [1] : _rewardToken (address): 0x34f797e7190C131cF630524655A618b5BD8738e7

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c992a50169f6075d52013118355c633bf92ae853
Arg [1] : 00000000000000000000000034f797e7190c131cf630524655a618b5bd8738e7


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

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