ETH Price: $2,056.90 (-2.93%)

Contract

0xefF1CDc3CC01afAB104b00a7D9cd09619B94ae8F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Initialize116892902021-01-20 1:23:241888 days ago1611105804IN
Armor.fi: Referral Rewards Master
0 ETH0.004519141

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:
ReferralRewards

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2021-01-22
*/

// Sources flattened with hardhat v2.0.8 https://hardhat.org

// File contracts/general/Ownable.sol

pragma solidity ^0.6.6;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 * 
 * @dev We've added a second owner to share control of the timelocked owner contract.
 */
contract Ownable {
    address private _owner;
    address private _pendingOwner;
    
    // Second allows a DAO to share control.
    address private _secondOwner;
    address private _pendingSecond;

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

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    function initializeOwnable() internal {
        require(_owner == address(0), "already initialized");
        _owner = msg.sender;
        _secondOwner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);
        emit SecondOwnershipTransferred(address(0), msg.sender);
    }


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

    /**
     * @return the address of the owner.
     */
    function secondOwner() public view returns (address) {
        return _secondOwner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "msg.sender is not owner");
        _;
    }
    
    modifier onlyFirstOwner() {
        require(msg.sender == _owner, "msg.sender is not owner");
        _;
    }
    
    modifier onlySecondOwner() {
        require(msg.sender == _secondOwner, "msg.sender is not owner");
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner || msg.sender == _secondOwner;

    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyFirstOwner {
        _pendingOwner = newOwner;
    }

    function receiveOwnership() public {
        require(msg.sender == _pendingOwner, "only pending owner can call this function");
        _transferOwnership(_pendingOwner);
        _pendingOwner = address(0);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferSecondOwnership(address newOwner) public onlySecondOwner {
        _pendingSecond = newOwner;
    }

    function receiveSecondOwnership() public {
        require(msg.sender == _pendingSecond, "only pending owner can call this function");
        _transferSecondOwnership(_pendingSecond);
        _pendingSecond = address(0);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferSecondOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit SecondOwnershipTransferred(_secondOwner, newOwner);
        _secondOwner = newOwner;
    }

    uint256[50] private __gap;
}


// File contracts/libraries/Address.sol

pragma solidity ^0.6.6;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing 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.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != 0x0 && codehash != accountHash);
    }

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

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

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


// File contracts/libraries/SafeMath.sol

pragma solidity ^0.6.6;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 * 
 * @dev Default OpenZeppelin
 */
library SafeMath {
    /**
     * @dev Multiplies two unsigned integers, reverts on 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-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
     * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Adds two unsigned integers, reverts on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
     * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
     * reverts when dividing by zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}


// File contracts/interfaces/IERC20.sol

pragma solidity ^0.6.6;

/**
 * @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);

    function mint(address to, uint256 amount) external returns (bool);
    
    function burn(address from, 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 contracts/general/SafeERC20.sol

pragma solidity ^0.6.6;



/**
 * @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 ERC20;` 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));
    }

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

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "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 contracts/general/BalanceWrapper.sol

pragma solidity ^0.6.6;

contract BalanceWrapper {
    using SafeMath for uint256;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

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

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

    function _addStake(address user, uint256 amount) internal {
        _totalSupply = _totalSupply.add(amount);
        _balances[user] = _balances[user].add(amount);
    }

    function _removeStake(address user, uint256 amount) internal {
        _totalSupply = _totalSupply.sub(amount);
        _balances[user] = _balances[user].sub(amount);
    }
}


// File contracts/libraries/Math.sol

pragma solidity ^0.6.6;

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


// File contracts/interfaces/IRewardDistributionRecipient.sol

pragma solidity ^0.6.6;

interface IRewardDistributionRecipient {
    function notifyRewardAmount(uint256 reward) payable external;
}


// File contracts/interfaces/IRewardManager.sol

pragma solidity ^0.6.6;

interface IRewardManager is IRewardDistributionRecipient {
  function initialize(address _rewardToken, address _stakeController) external;
  function stake(address _user, address _referral, uint256 _coverPrice) external;
  function withdraw(address _user, address _referral, uint256 _coverPrice) external;
  function getReward(address payable _user) external;
}


// File contracts/core/ReferralRewards.sol

pragma solidity ^0.6.6;


/**
 * @dev This contract is used to distribute rewards to referrers of users of the arNXMVault contract.
 *      It exists because we want the reward to be taken from rewards gained from staking, and those
 *      are not rewarded on an individual basis but to the arNXMVault contract as a whole. This means
 *      we can only reward the referrers as a pool as well, so we're using the SNX scheme to 
 *      reward a group of referrers all at once.
 *  SPDX-License-Identifier: (c) Armor.Fi, 2021
**/
contract ReferralRewards is BalanceWrapper, Ownable, IRewardManager {
    using SafeERC20 for IERC20;

    // Reward token is 0 if Ether is the reward.
    IERC20 public rewardToken;
    address public stakeController;

    // Duration is 1 to distribute nearly instantly.
    uint256 public constant DURATION = 1;

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

    event RewardAdded(uint256 reward, uint256 timestamp);
    event BalanceAdded(address indexed user, address indexed referral, uint256 amount, uint256 timestamp);
    event BalanceWithdrawn(address indexed user, address indexed referral, uint256 amount, uint256 timestamp);
    event RewardPaid(address indexed user, uint256 reward, uint256 timestamp);

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

    modifier onlyStakeController {
        require(msg.sender == stakeController, "Caller is not stake controller.");
        _;
    }

    function initialize(address _rewardToken, address _stakeController)
      external
      override
    {
        Ownable.initializeOwnable();
        require(address(stakeController) == address(0), "Contract is already initialized.");
        stakeController = _stakeController;
        rewardToken = IERC20(_rewardToken);
    }

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

    // stake visibility is public as overriding LPTokenWrapper's stake() function
    function stake(address user, address referral, uint256 amount) external override onlyStakeController updateReward(user) {
        _addStake(user, amount);
        emit BalanceAdded(user, referral, amount, block.timestamp);
    }

    function withdraw(address user, address referral, uint256 amount) public override onlyStakeController updateReward(user) {
        amount = amount <= balanceOf(user) ? amount : balanceOf(user);
        _removeStake(user, amount);
        emit BalanceWithdrawn(user, referral, amount, block.timestamp);
    }

    function getReward(address payable user) public override updateReward(user) {
        uint256 reward = earned(user);
        if (reward > 0) {
            rewards[user] = 0;
            
            if ( address(rewardToken) == address(0) ) user.transfer(reward);
            else rewardToken.safeTransfer(user, reward);
            
            emit RewardPaid(user, reward, block.timestamp);
        }
    }

    function notifyRewardAmount(uint256 reward)
        external
        payable
        override
        onlyStakeController
        updateReward(address(0))
    {
        //this will make sure tokens are in the reward pool
        if ( address(rewardToken) == address(0) ) {
            require(msg.value == reward, "Correct reward was not sent.");
        }
        else {
            require(msg.value == 0, "Do not send ETH");
            rewardToken.safeTransferFrom(msg.sender, address(this), reward);
        }
        
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(DURATION);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(DURATION);
        }
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(DURATION);
        emit RewardAdded(reward, block.timestamp);
    }
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"referral","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BalanceAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"referral","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BalanceWithdrawn","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":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","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"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"SecondOwnershipTransferred","type":"event"},{"inputs":[],"name":"DURATION","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":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"user","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_stakeController","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"payable","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":[],"name":"receiveOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"receiveSecondOwnership","outputs":[],"stateMutability":"nonpayable","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":[],"name":"secondOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"referral","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeController","outputs":[{"internalType":"address","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":"address","name":"newOwner","type":"address"}],"name":"transferSecondOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"referral","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000603a556000603b5534801561001a57600080fd5b506114ee8061002a6000396000f3fe6080604052600436106101805760003560e01c80638b876347116100d1578063cd3daf9d1161008a578063eb63421011610064578063eb634210146104d5578063ebe2b12b146104ea578063f2fde38b146104ff578063f7c618c11461053257610180565b8063cd3daf9d14610468578063d9caed121461047d578063df136d65146104c057610180565b80638b8763471461036c5780638da5cb5b1461039f5780638f32d59b146103b4578063bf6eac2f146103dd578063c00007b014610420578063c8f33c911461045357610180565b806343a08b781161013e57806370a082311161011857806370a08231146102fa5780637b0a47ee1461032d57806380faa57d14610342578063857355c91461035757610180565b806343a08b781461025b578063485cc9551461028e57806368a9f31c146102c957610180565b80628cc262146101855780630700037d146101ca57806318160ddd146101fd5780631be05289146102125780631c74a301146102275780633c6b16ab1461023e575b600080fd5b34801561019157600080fd5b506101b8600480360360208110156101a857600080fd5b50356001600160a01b0316610547565b60408051918252519081900360200190f35b3480156101d657600080fd5b506101b8600480360360208110156101ed57600080fd5b50356001600160a01b03166105b5565b34801561020957600080fd5b506101b86105c7565b34801561021e57600080fd5b506101b86105ce565b34801561023357600080fd5b5061023c6105d3565b005b61023c6004803603602081101561025457600080fd5b5035610643565b34801561026757600080fd5b5061023c6004803603602081101561027e57600080fd5b50356001600160a01b0316610872565b34801561029a57600080fd5b5061023c600480360360408110156102b157600080fd5b506001600160a01b03813581169160200135166108ed565b3480156102d557600080fd5b506102de610984565b604080516001600160a01b039092168252519081900360200190f35b34801561030657600080fd5b506101b86004803603602081101561031d57600080fd5b50356001600160a01b0316610993565b34801561033957600080fd5b506101b86109ae565b34801561034e57600080fd5b506101b86109b4565b34801561036357600080fd5b5061023c6109c7565b34801561037857600080fd5b506101b86004803603602081101561038f57600080fd5b50356001600160a01b0316610a37565b3480156103ab57600080fd5b506102de610a49565b3480156103c057600080fd5b506103c9610a58565b604080519115158252519081900360200190f35b3480156103e957600080fd5b5061023c6004803603606081101561040057600080fd5b506001600160a01b03813581169160208101359091169060400135610a81565b34801561042c57600080fd5b5061023c6004803603602081101561044357600080fd5b50356001600160a01b0316610b9e565b34801561045f57600080fd5b506101b8610cc9565b34801561047457600080fd5b506101b8610ccf565b34801561048957600080fd5b5061023c600480360360608110156104a057600080fd5b506001600160a01b03813581169160208101359091169060400135610d1d565b3480156104cc57600080fd5b506101b8610e5c565b3480156104e157600080fd5b506102de610e62565b3480156104f657600080fd5b506101b8610e71565b34801561050b57600080fd5b5061023c6004803603602081101561052257600080fd5b50356001600160a01b0316610e77565b34801561053e57600080fd5b506102de610ef2565b6001600160a01b0381166000908152603f6020908152604080832054603e9092528220546105af91906105a990670de0b6b3a7640000906105a3906105949061058e610ccf565b90610f01565b61059d88610993565b90610f16565b90610f44565b90610f66565b92915050565b603f6020526000908152604090205481565b6000545b90565b600181565b6003546001600160a01b0316331461061c5760405162461bcd60e51b81526004018080602001828103825260298152602001806114666029913960400191505060405180910390fd5b600354610631906001600160a01b0316610f78565b600380546001600160a01b0319169055565b6039546001600160a01b031633146106a2576040805162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206973206e6f74207374616b6520636f6e74726f6c6c65722e00604482015290519081900360640190fd5b60006106ac610ccf565b603d556106b76109b4565b603c556001600160a01b038116156106fe576106d281610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b6038546001600160a01b031661076757813414610762576040805162461bcd60e51b815260206004820152601c60248201527f436f72726563742072657761726420776173206e6f742073656e742e00000000604482015290519081900360640190fd5b6107c4565b34156107ac576040805162461bcd60e51b815260206004820152600f60248201526e088de40dcdee840e6cadcc8408aa89608b1b604482015290519081900360640190fd5b6038546107c4906001600160a01b0316333085610fe7565b603a5442106107e0576107d8826001610f44565b603b55610820565b603a546000906107f09042610f01565b90506000610809603b5483610f1690919063ffffffff16565b905061081a60016105a38684610f66565b603b5550505b42603c819055610831906001610f66565b603a556040805183815242602082015281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a15050565b6004546001600160a01b031633146108cb576040805162461bcd60e51b815260206004820152601760248201527636b9b39739b2b73232b91034b9903737ba1037bbb732b960491b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6108f5611047565b6039546001600160a01b031615610953576040805162461bcd60e51b815260206004820181905260248201527f436f6e747261637420697320616c726561647920696e697469616c697a65642e604482015290519081900360640190fd5b603980546001600160a01b039283166001600160a01b03199182161790915560388054939092169216919091179055565b6004546001600160a01b031690565b6001600160a01b031660009081526001602052604090205490565b603b5481565b60006109c242603a54611116565b905090565b6005546001600160a01b03163314610a105760405162461bcd60e51b81526004018080602001828103825260298152602001806114666029913960400191505060405180910390fd5b600554610a25906001600160a01b031661112c565b600580546001600160a01b0319169055565b603e6020526000908152604090205481565b6002546001600160a01b031690565b6002546000906001600160a01b03163314806109c25750506004546001600160a01b0316331490565b6039546001600160a01b03163314610ae0576040805162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206973206e6f74207374616b6520636f6e74726f6c6c65722e00604482015290519081900360640190fd5b82610ae9610ccf565b603d55610af46109b4565b603c556001600160a01b03811615610b3b57610b0f81610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b610b45848361119b565b826001600160a01b0316846001600160a01b03167f806bd68205d924dfe913819ec283c4c84e43d0f1c26d5f3679410b96a35a6ac78442604051808381526020018281526020019250505060405180910390a350505050565b80610ba7610ccf565b603d55610bb26109b4565b603c556001600160a01b03811615610bf957610bcd81610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b6000610c0483610547565b90508015610cc4576001600160a01b038084166000908152603f602052604081205560385416610c6a576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015610c64573d6000803e3d6000fd5b50610c81565b603854610c81906001600160a01b031684836111ed565b6040805182815242602082015281516001600160a01b038616927fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f51928290030190a25b505050565b603c5481565b6000610cd96105c7565b610ce65750603d546105cb565b6109c2610d14610cf46105c7565b6105a3670de0b6b3a764000061059d603b5461059d603c5461058e6109b4565b603d5490610f66565b6039546001600160a01b03163314610d7c576040805162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206973206e6f74207374616b6520636f6e74726f6c6c65722e00604482015290519081900360640190fd5b82610d85610ccf565b603d55610d906109b4565b603c556001600160a01b03811615610dd757610dab81610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b610de084610993565b821115610df557610df084610993565b610df7565b815b9150610e03848361123f565b826001600160a01b0316846001600160a01b03167ffa6f90c718f93a35cd29248f3a4408662da31b23206a4b01b9d40faaacd6fa048442604051808381526020018281526020019250505060405180910390a350505050565b603d5481565b6039546001600160a01b031681565b603a5481565b6002546001600160a01b03163314610ed0576040805162461bcd60e51b815260206004820152601760248201527636b9b39739b2b73232b91034b9903737ba1037bbb732b960491b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6038546001600160a01b031681565b600082821115610f1057600080fd5b50900390565b600082610f25575060006105af565b82820282848281610f3257fe5b0414610f3d57600080fd5b9392505050565b6000808211610f5257600080fd5b6000828481610f5d57fe5b04949350505050565b600082820183811015610f3d57600080fd5b6001600160a01b038116610f8b57600080fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611041908590611271565b50505050565b6002546001600160a01b03161561109b576040805162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b60028054336001600160a01b0319918216811790925560048054909116821790556040516000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a360405133906000907f056a46fd3a2b20fb8bde8639e8a4b1bd407af5f7c1169369575e29e97d41a6ca908290a3565b60008183106111255781610f3d565b5090919050565b6001600160a01b03811661113f57600080fd5b6004546040516001600160a01b038084169216907f056a46fd3a2b20fb8bde8639e8a4b1bd407af5f7c1169369575e29e97d41a6ca90600090a3600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546111a89082610f66565b60009081556001600160a01b0383168152600160205260409020546111cd9082610f66565b6001600160a01b0390921660009081526001602052604090209190915550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610cc4908490611271565b60005461124c9082610f01565b60009081556001600160a01b0383168152600160205260409020546111cd9082610f01565b611283826001600160a01b0316611429565b6112d4576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106113125780518252601f1990920191602091820191016112f3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611374576040519150601f19603f3d011682016040523d82523d6000602084013e611379565b606091505b5091509150816113d0576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611041578080602001905160208110156113ec57600080fd5b50516110415760405162461bcd60e51b815260040180806020018281038252602a81526020018061148f602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061145d5750808214155b94935050505056fe6f6e6c792070656e64696e67206f776e65722063616e2063616c6c20746869732066756e6374696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212201f6d7247705b73bd1182fec633834756d2120d1fcdc97961749b3ec0b0f60e9a64736f6c634300060c0033

Deployed Bytecode

0x6080604052600436106101805760003560e01c80638b876347116100d1578063cd3daf9d1161008a578063eb63421011610064578063eb634210146104d5578063ebe2b12b146104ea578063f2fde38b146104ff578063f7c618c11461053257610180565b8063cd3daf9d14610468578063d9caed121461047d578063df136d65146104c057610180565b80638b8763471461036c5780638da5cb5b1461039f5780638f32d59b146103b4578063bf6eac2f146103dd578063c00007b014610420578063c8f33c911461045357610180565b806343a08b781161013e57806370a082311161011857806370a08231146102fa5780637b0a47ee1461032d57806380faa57d14610342578063857355c91461035757610180565b806343a08b781461025b578063485cc9551461028e57806368a9f31c146102c957610180565b80628cc262146101855780630700037d146101ca57806318160ddd146101fd5780631be05289146102125780631c74a301146102275780633c6b16ab1461023e575b600080fd5b34801561019157600080fd5b506101b8600480360360208110156101a857600080fd5b50356001600160a01b0316610547565b60408051918252519081900360200190f35b3480156101d657600080fd5b506101b8600480360360208110156101ed57600080fd5b50356001600160a01b03166105b5565b34801561020957600080fd5b506101b86105c7565b34801561021e57600080fd5b506101b86105ce565b34801561023357600080fd5b5061023c6105d3565b005b61023c6004803603602081101561025457600080fd5b5035610643565b34801561026757600080fd5b5061023c6004803603602081101561027e57600080fd5b50356001600160a01b0316610872565b34801561029a57600080fd5b5061023c600480360360408110156102b157600080fd5b506001600160a01b03813581169160200135166108ed565b3480156102d557600080fd5b506102de610984565b604080516001600160a01b039092168252519081900360200190f35b34801561030657600080fd5b506101b86004803603602081101561031d57600080fd5b50356001600160a01b0316610993565b34801561033957600080fd5b506101b86109ae565b34801561034e57600080fd5b506101b86109b4565b34801561036357600080fd5b5061023c6109c7565b34801561037857600080fd5b506101b86004803603602081101561038f57600080fd5b50356001600160a01b0316610a37565b3480156103ab57600080fd5b506102de610a49565b3480156103c057600080fd5b506103c9610a58565b604080519115158252519081900360200190f35b3480156103e957600080fd5b5061023c6004803603606081101561040057600080fd5b506001600160a01b03813581169160208101359091169060400135610a81565b34801561042c57600080fd5b5061023c6004803603602081101561044357600080fd5b50356001600160a01b0316610b9e565b34801561045f57600080fd5b506101b8610cc9565b34801561047457600080fd5b506101b8610ccf565b34801561048957600080fd5b5061023c600480360360608110156104a057600080fd5b506001600160a01b03813581169160208101359091169060400135610d1d565b3480156104cc57600080fd5b506101b8610e5c565b3480156104e157600080fd5b506102de610e62565b3480156104f657600080fd5b506101b8610e71565b34801561050b57600080fd5b5061023c6004803603602081101561052257600080fd5b50356001600160a01b0316610e77565b34801561053e57600080fd5b506102de610ef2565b6001600160a01b0381166000908152603f6020908152604080832054603e9092528220546105af91906105a990670de0b6b3a7640000906105a3906105949061058e610ccf565b90610f01565b61059d88610993565b90610f16565b90610f44565b90610f66565b92915050565b603f6020526000908152604090205481565b6000545b90565b600181565b6003546001600160a01b0316331461061c5760405162461bcd60e51b81526004018080602001828103825260298152602001806114666029913960400191505060405180910390fd5b600354610631906001600160a01b0316610f78565b600380546001600160a01b0319169055565b6039546001600160a01b031633146106a2576040805162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206973206e6f74207374616b6520636f6e74726f6c6c65722e00604482015290519081900360640190fd5b60006106ac610ccf565b603d556106b76109b4565b603c556001600160a01b038116156106fe576106d281610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b6038546001600160a01b031661076757813414610762576040805162461bcd60e51b815260206004820152601c60248201527f436f72726563742072657761726420776173206e6f742073656e742e00000000604482015290519081900360640190fd5b6107c4565b34156107ac576040805162461bcd60e51b815260206004820152600f60248201526e088de40dcdee840e6cadcc8408aa89608b1b604482015290519081900360640190fd5b6038546107c4906001600160a01b0316333085610fe7565b603a5442106107e0576107d8826001610f44565b603b55610820565b603a546000906107f09042610f01565b90506000610809603b5483610f1690919063ffffffff16565b905061081a60016105a38684610f66565b603b5550505b42603c819055610831906001610f66565b603a556040805183815242602082015281517f6c07ee05dcf262f13abf9d87b846ee789d2f90fe991d495acd7d7fc109ee1f55929181900390910190a15050565b6004546001600160a01b031633146108cb576040805162461bcd60e51b815260206004820152601760248201527636b9b39739b2b73232b91034b9903737ba1037bbb732b960491b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6108f5611047565b6039546001600160a01b031615610953576040805162461bcd60e51b815260206004820181905260248201527f436f6e747261637420697320616c726561647920696e697469616c697a65642e604482015290519081900360640190fd5b603980546001600160a01b039283166001600160a01b03199182161790915560388054939092169216919091179055565b6004546001600160a01b031690565b6001600160a01b031660009081526001602052604090205490565b603b5481565b60006109c242603a54611116565b905090565b6005546001600160a01b03163314610a105760405162461bcd60e51b81526004018080602001828103825260298152602001806114666029913960400191505060405180910390fd5b600554610a25906001600160a01b031661112c565b600580546001600160a01b0319169055565b603e6020526000908152604090205481565b6002546001600160a01b031690565b6002546000906001600160a01b03163314806109c25750506004546001600160a01b0316331490565b6039546001600160a01b03163314610ae0576040805162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206973206e6f74207374616b6520636f6e74726f6c6c65722e00604482015290519081900360640190fd5b82610ae9610ccf565b603d55610af46109b4565b603c556001600160a01b03811615610b3b57610b0f81610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b610b45848361119b565b826001600160a01b0316846001600160a01b03167f806bd68205d924dfe913819ec283c4c84e43d0f1c26d5f3679410b96a35a6ac78442604051808381526020018281526020019250505060405180910390a350505050565b80610ba7610ccf565b603d55610bb26109b4565b603c556001600160a01b03811615610bf957610bcd81610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b6000610c0483610547565b90508015610cc4576001600160a01b038084166000908152603f602052604081205560385416610c6a576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015610c64573d6000803e3d6000fd5b50610c81565b603854610c81906001600160a01b031684836111ed565b6040805182815242602082015281516001600160a01b038616927fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f51928290030190a25b505050565b603c5481565b6000610cd96105c7565b610ce65750603d546105cb565b6109c2610d14610cf46105c7565b6105a3670de0b6b3a764000061059d603b5461059d603c5461058e6109b4565b603d5490610f66565b6039546001600160a01b03163314610d7c576040805162461bcd60e51b815260206004820152601f60248201527f43616c6c6572206973206e6f74207374616b6520636f6e74726f6c6c65722e00604482015290519081900360640190fd5b82610d85610ccf565b603d55610d906109b4565b603c556001600160a01b03811615610dd757610dab81610547565b6001600160a01b0382166000908152603f6020908152604080832093909355603d54603e909152919020555b610de084610993565b821115610df557610df084610993565b610df7565b815b9150610e03848361123f565b826001600160a01b0316846001600160a01b03167ffa6f90c718f93a35cd29248f3a4408662da31b23206a4b01b9d40faaacd6fa048442604051808381526020018281526020019250505060405180910390a350505050565b603d5481565b6039546001600160a01b031681565b603a5481565b6002546001600160a01b03163314610ed0576040805162461bcd60e51b815260206004820152601760248201527636b9b39739b2b73232b91034b9903737ba1037bbb732b960491b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6038546001600160a01b031681565b600082821115610f1057600080fd5b50900390565b600082610f25575060006105af565b82820282848281610f3257fe5b0414610f3d57600080fd5b9392505050565b6000808211610f5257600080fd5b6000828481610f5d57fe5b04949350505050565b600082820183811015610f3d57600080fd5b6001600160a01b038116610f8b57600080fd5b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611041908590611271565b50505050565b6002546001600160a01b03161561109b576040805162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b60028054336001600160a01b0319918216811790925560048054909116821790556040516000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a360405133906000907f056a46fd3a2b20fb8bde8639e8a4b1bd407af5f7c1169369575e29e97d41a6ca908290a3565b60008183106111255781610f3d565b5090919050565b6001600160a01b03811661113f57600080fd5b6004546040516001600160a01b038084169216907f056a46fd3a2b20fb8bde8639e8a4b1bd407af5f7c1169369575e29e97d41a6ca90600090a3600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546111a89082610f66565b60009081556001600160a01b0383168152600160205260409020546111cd9082610f66565b6001600160a01b0390921660009081526001602052604090209190915550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610cc4908490611271565b60005461124c9082610f01565b60009081556001600160a01b0383168152600160205260409020546111cd9082610f01565b611283826001600160a01b0316611429565b6112d4576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106113125780518252601f1990920191602091820191016112f3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611374576040519150601f19603f3d011682016040523d82523d6000602084013e611379565b606091505b5091509150816113d0576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611041578080602001905160208110156113ec57600080fd5b50516110415760405162461bcd60e51b815260040180806020018281038252602a81526020018061148f602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061145d5750808214155b94935050505056fe6f6e6c792070656e64696e67206f776e65722063616e2063616c6c20746869732066756e6374696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212201f6d7247705b73bd1182fec633834756d2120d1fcdc97961749b3ec0b0f60e9a64736f6c634300060c0033

Deployed Bytecode Sourcemap

18734:4700:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21081:265;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21081:265:0;-1:-1:-1;;;;;21081:265:0;;:::i;:::-;;;;;;;;;;;;;;;;19280:42;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19280:42:0;-1:-1:-1;;;;;19280:42:0;;:::i;16067:91::-;;;;;;;;;;;;;:::i;19019:36::-;;;;;;;;;;;;;:::i;2518:216::-;;;;;;;;;;;;;:::i;:::-;;22422:1009;;;;;;;;;;;;;;;;-1:-1:-1;22422:1009:0;;:::i;3248:118::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3248:118:0;-1:-1:-1;;;;;3248:118:0;;:::i;20171:335::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;20171:335:0;;;;;;;;;;:::i;1468:91::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1468:91:0;;;;;;;;;;;;;;16166:110;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16166:110:0;-1:-1:-1;;;;;16166:110:0;;:::i;19102:29::-;;;;;;;;;;;;;:::i;20514:131::-;;;;;;;;;;;;;:::i;3374:231::-;;;;;;;;;;;;;:::i;19216:57::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19216:57:0;-1:-1:-1;;;;;19216:57:0;;:::i;1321:79::-;;;;;;;;;;;;;:::i;2099:124::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;21437:231;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;21437:231:0;;;;;;;;;;;;;;;;;:::i;21995:419::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21995:419:0;-1:-1:-1;;;;;21995:419:0;;:::i;19138:29::-;;;;;;;;;;;;;:::i;20653:420::-;;;;;;;;;;;;;:::i;21676:311::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;21676:311:0;;;;;;;;;;;;;;;;;:::i;19174:35::-;;;;;;;;;;;;;:::i;18926:30::-;;;;;;;;;;;;;:::i;19064:31::-;;;;;;;;;;;;;:::i;2400:110::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2400:110:0;-1:-1:-1;;;;;2400:110:0;;:::i;18894:25::-;;;;;;;;;;;;;:::i;21081:265::-;-1:-1:-1;;;;;21321:16:0;;21135:7;21321:16;;;:7;:16;;;;;;;;;21237:22;:31;;;;;;21175:163;;21321:16;21175:123;;21293:4;;21175:95;;21216:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;21175:18;21185:7;21175:9;:18::i;:::-;:40;;:95::i;:::-;:117;;:123::i;:::-;:145;;:163::i;:::-;21155:183;21081:265;-1:-1:-1;;21081:265:0:o;19280:42::-;;;;;;;;;;;;;:::o;16067:91::-;16111:7;16138:12;16067:91;;:::o;19019:36::-;19054:1;19019:36;:::o;2518:216::-;2586:13;;-1:-1:-1;;;;;2586:13:0;2572:10;:27;2564:81;;;;-1:-1:-1;;;2564:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2675:13;;2656:33;;-1:-1:-1;;;;;2675:13:0;2656:18;:33::i;:::-;2700:13;:26;;-1:-1:-1;;;;;;2700:26:0;;;2518:216::o;22422:1009::-;20092:15;;-1:-1:-1;;;;;20092:15:0;20078:10;:29;20070:73;;;;;-1:-1:-1;;;20070:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22578:1:::1;19765:16;:14;:16::i;:::-;19742:20;:39:::0;19809:26:::1;:24;:26::i;:::-;19792:14;:43:::0;-1:-1:-1;;;;;19850:21:0;::::1;::::0;19846:157:::1;;19907:15;19914:7;19907:6;:15::i;:::-;-1:-1:-1::0;;;;;19888:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;19971:20:::1;::::0;19937:22:::1;:31:::0;;;;;;:54;19846:157:::1;22672:11:::2;::::0;-1:-1:-1;;;;;22672:11:0::2;22659:291;;22737:6;22724:9;:19;22716:60;;;::::0;;-1:-1:-1;;;22716:60:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;::::2;::::0;;;;;;;;;;;;;::::2;;22659:291;;;22826:9;:14:::0;22818:42:::2;;;::::0;;-1:-1:-1;;;22818:42:0;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;22818:42:0;;;;;;;;;;;;;::::2;;22875:11;::::0;:63:::2;::::0;-1:-1:-1;;;;;22875:11:0::2;22904:10;22924:4;22931:6:::0;22875:28:::2;:63::i;:::-;22993:12;;22974:15;:31;22970:304;;23035:20;:6:::0;19054:1:::2;23035:10;:20::i;:::-;23022:10;:33:::0;22970:304:::2;;;23108:12;::::0;23088:17:::2;::::0;23108:33:::2;::::0;23125:15:::2;23108:16;:33::i;:::-;23088:53;;23156:16;23175:25;23189:10;;23175:9;:13;;:25;;;;:::i;:::-;23156:44:::0;-1:-1:-1;23228:34:0::2;19054:1;23228:20;:6:::0;23156:44;23228:10:::2;:20::i;:34::-;23215:10;:47:::0;-1:-1:-1;;22970:304:0::2;23301:15;23284:14;:32:::0;;;23342:29:::2;::::0;19054:1:::2;23342:19;:29::i;:::-;23327:12;:44:::0;23387:36:::2;::::0;;;;;23407:15:::2;23387:36;::::0;::::2;::::0;;;::::2;::::0;;;;;;;;;::::2;20154:1:::1;22422:1009:::0;:::o;3248:118::-;1946:12;;-1:-1:-1;;;;;1946:12:0;1932:10;:26;1924:62;;;;;-1:-1:-1;;;1924:62:0;;;;;;;;;;;;-1:-1:-1;;;1924:62:0;;;;;;;;;;;;;;;3333:14:::1;:25:::0;;-1:-1:-1;;;;;;3333:25:0::1;-1:-1:-1::0;;;;;3333:25:0;;;::::1;::::0;;;::::1;::::0;;3248:118::o;20171:335::-;20287:27;:25;:27::i;:::-;20341:15;;-1:-1:-1;;;;;20341:15:0;20333:38;20325:83;;;;;-1:-1:-1;;;20325:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20419:15;:34;;-1:-1:-1;;;;;20419:34:0;;;-1:-1:-1;;;;;;20419:34:0;;;;;;;20464:11;:34;;;;;;;;;;;;;;20171:335::o;1468:91::-;1539:12;;-1:-1:-1;;;;;1539:12:0;1468:91;:::o;16166:110::-;-1:-1:-1;;;;;16250:18:0;16223:7;16250:18;;;:9;:18;;;;;;;16166:110::o;19102:29::-;;;;:::o;20514:131::-;20571:7;20598:39;20607:15;20624:12;;20598:8;:39::i;:::-;20591:46;;20514:131;:::o;3374:231::-;3448:14;;-1:-1:-1;;;;;3448:14:0;3434:10;:28;3426:82;;;;-1:-1:-1;;;3426:82:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3544:14;;3519:40;;-1:-1:-1;;;;;3544:14:0;3519:24;:40::i;:::-;3570:14;:27;;-1:-1:-1;;;;;;3570:27:0;;;3374:231::o;19216:57::-;;;;;;;;;;;;;:::o;1321:79::-;1386:6;;-1:-1:-1;;;;;1386:6:0;1321:79;:::o;2099:124::-;2177:6;;2139:4;;-1:-1:-1;;;;;2177:6:0;2163:10;:20;;:50;;-1:-1:-1;;2201:12:0;;-1:-1:-1;;;;;2201:12:0;2187:10;:26;;2099:124::o;21437:231::-;20092:15;;-1:-1:-1;;;;;20092:15:0;20078:10;:29;20070:73;;;;;-1:-1:-1;;;20070:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;21551:4:::1;19765:16;:14;:16::i;:::-;19742:20;:39:::0;19809:26:::1;:24;:26::i;:::-;19792:14;:43:::0;-1:-1:-1;;;;;19850:21:0;::::1;::::0;19846:157:::1;;19907:15;19914:7;19907:6;:15::i;:::-;-1:-1:-1::0;;;;;19888:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;19971:20:::1;::::0;19937:22:::1;:31:::0;;;;;;:54;19846:157:::1;21568:23:::2;21578:4;21584:6;21568:9;:23::i;:::-;21626:8;-1:-1:-1::0;;;;;21607:53:0::2;21620:4;-1:-1:-1::0;;;;;21607:53:0::2;;21636:6;21644:15;21607:53;;;;;;;;;;;;;;;;;;;;;;;;20154:1:::1;21437:231:::0;;;:::o;21995:419::-;22065:4;19765:16;:14;:16::i;:::-;19742:20;:39;19809:26;:24;:26::i;:::-;19792:14;:43;-1:-1:-1;;;;;19850:21:0;;;19846:157;;19907:15;19914:7;19907:6;:15::i;:::-;-1:-1:-1;;;;;19888:16:0;;;;;;:7;:16;;;;;;;;:34;;;;19971:20;;19937:22;:31;;;;;;:54;19846:157;22082:14:::1;22099:12;22106:4;22099:6;:12::i;:::-;22082:29:::0;-1:-1:-1;22126:10:0;;22122:285:::1;;-1:-1:-1::0;;;;;22153:13:0;;::::1;22169:1;22153:13:::0;;;:7:::1;:13;::::0;;;;:17;22212:11:::1;::::0;::::1;22199:121;;22241:21;::::0;-1:-1:-1;;;;;22241:13:0;::::1;::::0;:21;::::1;;;::::0;22255:6;;22241:21:::1;::::0;;;22255:6;22241:13;:21;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;22199:121;;;22282:11;::::0;:38:::1;::::0;-1:-1:-1;;;;;22282:11:0::1;22307:4:::0;22313:6;22282:24:::1;:38::i;:::-;22354:41;::::0;;;;;22379:15:::1;22354:41;::::0;::::1;::::0;;;-1:-1:-1;;;;;22354:41:0;::::1;::::0;::::1;::::0;;;;;;::::1;22122:285;20013:1;21995:419:::0;;:::o;19138:29::-;;;;:::o;20653:420::-;20700:7;20724:13;:11;:13::i;:::-;20720:78;;-1:-1:-1;20766:20:0;;20759:27;;20720:78;20828:237;20871:179;21036:13;:11;:13::i;:::-;20871:138;21004:4;20871:106;20966:10;;20871:68;20924:14;;20871:26;:24;:26::i;:179::-;20828:20;;;:24;:237::i;21676:311::-;20092:15;;-1:-1:-1;;;;;20092:15:0;20078:10;:29;20070:73;;;;;-1:-1:-1;;;20070:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;21791:4:::1;19765:16;:14;:16::i;:::-;19742:20;:39:::0;19809:26:::1;:24;:26::i;:::-;19792:14;:43:::0;-1:-1:-1;;;;;19850:21:0;::::1;::::0;19846:157:::1;;19907:15;19914:7;19907:6;:15::i;:::-;-1:-1:-1::0;;;;;19888:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;19971:20:::1;::::0;19937:22:::1;:31:::0;;;;;;:54;19846:157:::1;21827:15:::2;21837:4;21827:9;:15::i;:::-;21817:6;:25;;:52;;21854:15;21864:4;21854:9;:15::i;:::-;21817:52;;;21845:6;21817:52;21808:61;;21880:26;21893:4;21899:6;21880:12;:26::i;:::-;21945:8;-1:-1:-1::0;;;;;21922:57:0::2;21939:4;-1:-1:-1::0;;;;;21922:57:0::2;;21955:6;21963:15;21922:57;;;;;;;;;;;;;;;;;;;;;;;;20154:1:::1;21676:311:::0;;;:::o;19174:35::-;;;;:::o;18926:30::-;;;-1:-1:-1;;;;;18926:30:0;;:::o;19064:31::-;;;;:::o;2400:110::-;1820:6;;-1:-1:-1;;;;;1820:6:0;1806:10;:20;1798:56;;;;;-1:-1:-1;;;1798:56:0;;;;;;;;;;;;-1:-1:-1;;;1798:56:0;;;;;;;;;;;;;;;2478:13:::1;:24:::0;;-1:-1:-1;;;;;;2478:24:0::1;-1:-1:-1::0;;;;;2478:24:0;;;::::1;::::0;;;::::1;::::0;;2400:110::o;18894:25::-;;;-1:-1:-1;;;;;18894:25:0;;:::o;8467:150::-;8525:7;8558:1;8553;:6;;8545:15;;;;;;-1:-1:-1;8583:5:0;;;8467:150::o;7458:433::-;7516:7;7760:6;7756:47;;-1:-1:-1;7790:1:0;7783:8;;7756:47;7827:5;;;7831:1;7827;:5;:1;7851:5;;;;;:10;7843:19;;;;;;7882:1;7458:433;-1:-1:-1;;;7458:433:0:o;8026:303::-;8084:7;8183:1;8179;:5;8171:14;;;;;;8196:9;8212:1;8208;:5;;;;;;;8026:303;-1:-1:-1;;;;8026:303:0:o;8705:150::-;8763:7;8795:5;;;8819:6;;;;8811:15;;;;;2884:187;-1:-1:-1;;;;;2958:22:0;;2950:31;;;;;;3018:6;;2997:38;;-1:-1:-1;;;;;2997:38:0;;;;3018:6;;2997:38;;3018:6;;2997:38;3046:6;:17;;-1:-1:-1;;;;;;3046:17:0;-1:-1:-1;;;;;3046:17:0;;;;;;;;;;2884:187::o;12904:204::-;13031:68;;;-1:-1:-1;;;;;13031:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;13031:68:0;-1:-1:-1;;;13031:68:0;;;13005:95;;13024:5;;13005:18;:95::i;:::-;12904:204;;;;:::o;950:301::-;1007:6;;-1:-1:-1;;;;;1007:6:0;:20;999:52;;;;;-1:-1:-1;;;999:52:0;;;;;;;;;;;;-1:-1:-1;;;999:52:0;;;;;;;;;;;;;;;1062:6;:19;;1071:10;-1:-1:-1;;;;;;1062:19:0;;;;;;;;1092:12;:25;;;;;;;;;1133:44;;-1:-1:-1;;1133:44:0;;-1:-1:-1;;1133:44:0;1193:50;;1232:10;;1228:1;;1193:50;;1228:1;;1193:50;950:301::o;17062:106::-;17120:7;17151:1;17147;:5;:13;;17159:1;17147:13;;;-1:-1:-1;17155:1:0;;17140:20;-1:-1:-1;17062:106:0:o;3755:211::-;-1:-1:-1;;;;;3835:22:0;;3827:31;;;;;;3901:12;;3874:50;;-1:-1:-1;;;;;3874:50:0;;;;3901:12;;3874:50;;3901:12;;3874:50;3935:12;:23;;-1:-1:-1;;;;;;3935:23:0;-1:-1:-1;;;;;3935:23:0;;;;;;;;;;3755:211::o;16284:172::-;16368:12;;:24;;16385:6;16368:16;:24::i;:::-;16353:12;:39;;;-1:-1:-1;;;;;16421:15:0;;;;:9;:15;;;;;;:27;;16441:6;16421:19;:27::i;:::-;-1:-1:-1;;;;;16403:15:0;;;;;;;:9;:15;;;;;:45;;;;-1:-1:-1;16284:172:0:o;12720:176::-;12829:58;;;-1:-1:-1;;;;;12829:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12829:58:0;-1:-1:-1;;;12829:58:0;;;12803:85;;12822:5;;12803:18;:85::i;16464:175::-;16551:12;;:24;;16568:6;16551:16;:24::i;:::-;16536:12;:39;;;-1:-1:-1;;;;;16604:15:0;;;;:9;:15;;;;;;:27;;16624:6;16604:19;:27::i;14714:1114::-;15318:27;15326:5;-1:-1:-1;;;;;15318:25:0;;:27::i;:::-;15310:71;;;;;-1:-1:-1;;;15310:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;15455:12;15469:23;15504:5;-1:-1:-1;;;;;15496:19:0;15516:4;15496:25;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;15496:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15454:67;;;;15540:7;15532:52;;;;;-1:-1:-1;;;15532:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15601:17;;:21;15597:224;;15743:10;15732:30;;;;;;;;;;;;;;;-1:-1:-1;15732:30:0;15724:85;;;;-1:-1:-1;;;15724:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4626:810;4686:4;5345:20;;5188:66;5385:15;;;;;:42;;;5416:11;5404:8;:23;;5385:42;5377:51;4626:810;-1:-1:-1;;;;4626:810:0:o

Swarm Source

ipfs://1f6d7247705b73bd1182fec633834756d2120d1fcdc97961749b3ec0b0f60e9a

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.