ETH Price: $1,438.16 (-9.59%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add116530352021-01-14 11:48:041545 days ago1610624884IN
0x261Ff7Ab...340426E87
0 ETH0.0064227550

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NiceCashFarming

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-01-14
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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;
    }
}




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

    /**
     * @dev 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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}




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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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




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




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

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

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

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

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

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

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

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

            bytes32 lastvalue = set._values[lastIndex];

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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












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








/**
 * @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.
 */
contract Ownable is Context {
    address internal _owner;

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender() || _owner == address(0), "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;
    }
}









/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}












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

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

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

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

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

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

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

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

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








/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
}



contract NCashToken is ERC20, ERC20Burnable {

    using SafeMath for uint256;
    uint256 public start;

    mapping (address => uint256) public lockedBalance;

    constructor() ERC20("NiceCash Token", "NCT") public {
        _mint(msg.sender, 100000000 * (10 ** uint(decimals())));
        start = now;

    }

    function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {
        require(lockedBalance[from] == 0 || amount <= vestedAmount(from));
    }

    function transferWithVesting(address recipient, uint256 amount) public returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        lockedBalance[recipient] = lockedBalance[recipient].add(amount);
        return true;
    }

    /**
   * @dev Calculates the amount that has already vested.
   */
    function vestedAmount(address from) public view returns (uint256) {
        uint256 balance = balanceOf(address(from));
        
        if (now >= start + 360 days) {
            return balance;
        } else if (now >= start + 330 days) {
            return balance.sub(lockedBalance[from].div(12));
        } else if (now >= start + 300 days) {
            return balance.sub(lockedBalance[from].div(12).mul(2));
        } else if (now >= start + 270 days) {
            return balance.sub(lockedBalance[from].div(12).mul(3));
        } else if (now >= start + 240 days) {
            return balance.sub(lockedBalance[from].div(12).mul(4));
        } else if (now >= start + 210 days) {
            return balance.sub(lockedBalance[from].div(12).mul(5));
        } else if (now >= start + 180 days) {
            return balance.sub(lockedBalance[from].div(12).mul(6));
        } else if (now >= start + 150 days) {
            return balance.sub(lockedBalance[from].div(12).mul(7));
        } else if (now >= start + 120 days) {
            return balance.sub(lockedBalance[from].div(12).mul(8));
        } else if (now >= start + 90 days) {
            return balance.sub(lockedBalance[from].div(12).mul(9));
        } else if (now >= start + 60 days) {
            return balance.sub(lockedBalance[from].div(12).mul(10));
        } else if (now >= start + 30 days) {
            return balance.sub(lockedBalance[from].div(12).mul(11));
        } else {
            return balance.sub(lockedBalance[from]);
        }
    }
}


interface ILiquidityMigrator {
    function migrate(IERC20 token) external returns (IERC20);
}

// Have fun reading it. Hopefully it's bug-free. God bless.
contract NiceCashFarming is Ownable, AccessControl {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    //ACL
    //Manager is the person allowed to manage pools
    bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");

    // Info of each user.
    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of NCTs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accNCTPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accNCTPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. NCTs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that NCTs distribution occurs.
        uint256 accNCTPerShare; // Accumulated NCTs per share, times 1e12. See below.
    }

    // The NCT TOKEN
    NCashToken public nctToken;
    // NCT tokens created per block.
    uint256 public nctPerBlock;
    // The migrator contract. It has a lot of power. Can only be set through governance (owner).
    ILiquidityMigrator public migrator;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (uint16 => mapping (address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when NCT mining starts.
    uint256 public startBlock;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amountLiquidity, uint256 amountNCT);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    constructor(
        address _ncashToken,
        uint256 _nctPerBlock,
        uint256 _startBlock
    ) public {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(MANAGER_ROLE, _msgSender());

        nctToken = NCashToken(_ncashToken);
        nctPerBlock = _nctPerBlock;
        startBlock = _startBlock;

    }

    /**
    * @dev Throws if called by any account other than the one with the Manager role granted.
    */
    modifier onlyManager() {
        require(hasRole(MANAGER_ROLE, msg.sender), "Caller is not the Manager");
        _;
    }

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

    function pool(uint16 _index) external view returns (address, uint256, uint256, uint256) {
        require (_index < poolInfo.length, "index incorrect");
        PoolInfo memory pool = poolInfo[_index];
        return (address(pool.lpToken), pool.allocPoint, pool.lastRewardBlock, pool.accNCTPerShare);
    }

    function setNCTPerBlock(uint256 _nctPerBlock) public onlyManager {
        nctPerBlock = _nctPerBlock;
        massUpdatePools();
    }

    function setStartBlock(uint256 _startBlock) public onlyManager {
        startBlock = _startBlock;
        massUpdatePools();
    }

    // Add a new lp to the pool. Can only be called by the owner.
    // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
    function add(uint256 _allocPoint, address _lpTokenAddress, bool _withUpdate) public onlyManager {
        IERC20 _lpToken = IERC20(_lpTokenAddress);
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accNCTPerShare: 0
        }));
    }

    // Update the given pool's NCT allocation point. Can only be called by the owner.
    function set(uint16 _pid, uint256 _allocPoint, bool _withUpdate) public onlyManager {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // Set the migrator contract. Can only be called by the owner.
    function setMigrator(address _migrator) public onlyOwner {
        migrator = ILiquidityMigrator(_migrator);
    }

    // Migrate lp token to another lp contract. We trust that migrator contract is good.
    function migrate(uint16 _pid) public onlyOwner {
        require(address(migrator) != address(0), "migrate: no migrator");
        PoolInfo storage pool = poolInfo[_pid];
        IERC20 lpToken = pool.lpToken;
        uint256 bal = lpToken.balanceOf(address(this));
        lpToken.safeApprove(address(migrator), bal);
        IERC20 newLpToken = migrator.migrate(lpToken);
        require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
        pool.lpToken = newLpToken;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        require (_from <= _to, "incorrect from/to sequence");
        if (_to <= startBlock){
            return 0;
        }else if (_from < startBlock && _to > startBlock){
            return _to.sub(startBlock);
        } else {
            return _to.sub(_from);
        }
    }

    // View function to see pending NCTs on frontend.
    function getUserInfo(uint16 _pid, address _user) external view returns (uint256, uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accNCTPerShare = pool.accNCTPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 nctReward = multiplier.mul(nctPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accNCTPerShare = accNCTPerShare.add(nctReward.mul(1e12).div(lpSupply));
        }
        return (userInfo[_pid][_user].amount,user.amount.mul(accNCTPerShare).div(1e12).sub(user.rewardDebt));
    }

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

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 nctReward = multiplier.mul(nctPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        pool.accNCTPerShare = pool.accNCTPerShare.add(nctReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    // Deposit LP tokens to NiceCashFarming for NCT allocation.
    function deposit(uint16 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accNCTPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                safeNCTTransfer(msg.sender, pending);
            }
        }
        if(_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            user.amount = user.amount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accNCTPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from NiceCashFarming.
    function withdraw(uint16 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accNCTPerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
            safeNCTTransfer(msg.sender, pending);
        }
        if(_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accNCTPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount, pending);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint16 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Safe nctToken transfer function, just in case if rounding error causes pool to not have enough NCTs.
    function safeNCTTransfer(address _to, uint256 _amount) internal {
        uint256 nctBal = nctToken.balanceOf(address(this));
        if (_amount > nctBal) {
            nctToken.transfer(_to, nctBal);
        } else {
            nctToken.transfer(_to, _amount);
        }
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_ncashToken","type":"address"},{"internalType":"uint256","name":"_nctPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLiquidity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountNCT","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"address","name":"_lpTokenAddress","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pid","type":"uint16"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pid","type":"uint16"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pid","type":"uint16"},{"internalType":"address","name":"_user","type":"address"}],"name":"getUserInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pid","type":"uint16"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"contract ILiquidityMigrator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nctPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nctToken","outputs":[{"internalType":"contract NCashToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_index","type":"uint16"}],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accNCTPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pid","type":"uint16"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nctPerBlock","type":"uint256"}],"name":"setNCTPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"setStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pid","type":"uint16"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260006007553480156200001657600080fd5b506040516200299638038062002996833981810160405260608110156200003c57600080fd5b50805160208201516040909201519091906000620000626001600160e01b036200013a16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000d46000620000c56001600160e01b036200013a16565b6001600160e01b036200013e16565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206200010d90620000c56001600160e01b036200013a16565b600280546001600160a01b0319166001600160a01b03949094169390931790925560035560085562000274565b3390565b6200015382826001600160e01b036200015716565b5050565b60008281526001602090815260409091206200017e91839062002030620001db821b17901c565b156200015357620001976001600160e01b036200013a16565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001fb836001600160a01b0384166001600160e01b036200020416565b90505b92915050565b60006200021b83836001600160e01b036200025c16565b6200025357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001fe565b506000620001fe565b60009081526001919091016020526040902054151590565b61271280620002846000396000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c80637cd07e471161012a578063b392c6a3116100bd578063e515804a1161008c578063efaf059711610071578063efaf059714610601578063f2fde38b14610631578063f35e4a6e1461065757610226565b8063e515804a146105ca578063ec87621c146105f957610226565b8063b392c6a314610543578063ca15c87314610560578063d547741f1461057d578063dd8ab012146105a957610226565b80639010d07c116100f95780639010d07c146104b757806391d14854146104da578063a217fddf1461051a578063b34a3fcf1461052257610226565b80637cd07e471461045d578063859fe6c7146104655780638da5cb5b1461048c5780638dbb1e3a1461049457610226565b80632f2ff15d116101bd5780633d9120331161018c57806351eb05a61161017157806351eb05a614610430578063630b5ba11461044d578063715018a61461045557610226565b80633d9120331461040157806348cd4cb11461042857610226565b80632f2ff15d1461033f5780633545b0fe1461036b578063357fad9a146103b457806336568abe146103d557610226565b806317caf6f1116101f957806317caf6f1146102be5780631eaaa045146102c657806323cf3118146102fc578063248a9ca31461032257610226565b8063081e3eda1461022b5780631034204014610245578063105036ae1461024d5780631526fe2714610271575b600080fd5b610233610674565b60408051918252519081900360200190f35b61023361067a565b610255610680565b604080516001600160a01b039092168252519081900360200190f35b61028e6004803603602081101561028757600080fd5b503561068f565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6102336106d0565b6102fa600480360360608110156102dc57600080fd5b508035906001600160a01b03602082013516906040013515156106d6565b005b6102fa6004803603602081101561031257600080fd5b50356001600160a01b0316610880565b6102336004803603602081101561033857600080fd5b5035610920565b6102fa6004803603604081101561035557600080fd5b50803590602001356001600160a01b0316610935565b61039b6004803603604081101561038157600080fd5b50803561ffff1690602001356001600160a01b03166109a1565b6040805192835260208301919091528051918290030190f35b61028e600480360360208110156103ca57600080fd5b503561ffff16610b68565b6102fa600480360360408110156103eb57600080fd5b50803590602001356001600160a01b0316610c42565b6102fa6004803603604081101561041757600080fd5b5061ffff8135169060200135610ca3565b610233610e2b565b6102fa6004803603602081101561044657600080fd5b5035610e31565b6102fa610f67565b6102fa610f86565b61025561104e565b6102fa6004803603604081101561047b57600080fd5b5061ffff813516906020013561105d565b610255611191565b610233600480360360408110156104aa57600080fd5b50803590602001356111a0565b610255600480360360408110156104cd57600080fd5b5080359060200135611250565b610506600480360360408110156104f057600080fd5b50803590602001356001600160a01b0316611275565b604080519115158252519081900360200190f35b610233611293565b6102fa6004803603602081101561053857600080fd5b503561ffff16611298565b6102fa6004803603602081101561055957600080fd5b5035611346565b6102336004803603602081101561057657600080fd5b50356113cf565b6102fa6004803603604081101561059357600080fd5b50803590602001356001600160a01b03166113e6565b6102fa600480360360208110156105bf57600080fd5b503561ffff1661143f565b6102fa600480360360608110156105e057600080fd5b5061ffff81351690602081013590604001351515611758565b61023361185b565b61039b6004803603604081101561061757600080fd5b50803561ffff1690602001356001600160a01b031661187f565b6102fa6004803603602081101561064757600080fd5b50356001600160a01b03166118a3565b6102fa6004803603602081101561066d57600080fd5b50356119c1565b60055490565b60035481565b6002546001600160a01b031681565b6005818154811061069c57fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60075481565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206107019033611275565b610752576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b81811561076157610761610f67565b6000600854431161077457600854610776565b435b60075490915061078c908663ffffffff611a4a16565b600755604080516080810182526001600160a01b0393841681526020810196875290810191825260006060820181815260058054600181018255925291517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600490920291820180546001600160a01b031916919095161790935594517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db282015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3909301929092555050565b610888611aa4565b6000546001600160a01b03908116911614806108ad57506000546001600160a01b0316155b6108fe576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60009081526001602052604090206002015490565b60008281526001602052604090206002015461095890610953611aa4565b611275565b6109935760405162461bcd60e51b815260040180806020018281038252602f8152602001806125a8602f913960400191505060405180910390fd5b61099d8282611aa8565b5050565b600080600060058561ffff16815481106109b757fe5b6000918252602080832061ffff891684526006825260408085206001600160a01b038a8116875290845281862060049586029093016003810154815484516370a0823160e01b81523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b158015610a3957600080fd5b505afa158015610a4d573d6000803e3d6000fd5b505050506040513d6020811015610a6357600080fd5b5051600285015490915043118015610a7a57508015155b15610afe576000610a8f8560020154436111a0565b90506000610ace600754610ac28860010154610ab660035487611b1790919063ffffffff16565b9063ffffffff611b1716565b9063ffffffff611b7016565b9050610af9610aec84610ac28464e8d4a5100063ffffffff611b1716565b859063ffffffff611a4a16565b935050505b61ffff881660009081526006602090815260408083206001600160a01b038b16845290915290205460018401548454610b599190610b4d9064e8d4a5100090610ac2908863ffffffff611b1716565b9063ffffffff611bb216565b95509550505050509250929050565b6000806000806005805490508561ffff1610610bcb576040805162461bcd60e51b815260206004820152600f60248201527f696e64657820696e636f72726563740000000000000000000000000000000000604482015290519081900360640190fd5b610bd3612554565b60058661ffff1681548110610be457fe5b60009182526020918290206040805160808101825260049390930290910180546001600160a01b0316808452600182015494840185905260028201549284018390526003909101546060909301839052999298509650945092505050565b610c4a611aa4565b6001600160a01b0316816001600160a01b031614610c995760405162461bcd60e51b815260040180806020018281038252602f8152602001806126ae602f913960400191505060405180910390fd5b61099d8282611bf4565b600060058361ffff1681548110610cb657fe5b6000918252602080832061ffff871684526006825260408085203386529092529220805460049092029092019250831115610d38576040805162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610d458461ffff16610e31565b6000610d738260010154610b4d64e8d4a51000610ac287600301548760000154611b1790919063ffffffff16565b90508015610d8557610d853382611c63565b8315610dbb578154610d9d908563ffffffff611bb216565b82558254610dbb906001600160a01b0316338663ffffffff611df416565b60038301548254610ddc9164e8d4a5100091610ac29163ffffffff611b1716565b60018301556040805185815260208101839052815161ffff88169233927f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca94929081900390910190a35050505050565b60085481565b600060058281548110610e4057fe5b9060005260206000209060040201905080600201544311610e615750610f64565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610eab57600080fd5b505afa158015610ebf573d6000803e3d6000fd5b505050506040513d6020811015610ed557600080fd5b5051905080610eeb575043600290910155610f64565b6000610efb8360020154436111a0565b90506000610f22600754610ac28660010154610ab660035487611b1790919063ffffffff16565b9050610f51610f4084610ac28464e8d4a5100063ffffffff611b1716565b60038601549063ffffffff611a4a16565b6003850155505043600290920191909155505b50565b60055460005b8181101561099d57610f7e81610e31565b600101610f6d565b610f8e611aa4565b6000546001600160a01b0390811691161480610fb357506000546001600160a01b0316155b611004576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6004546001600160a01b031681565b600060058361ffff168154811061107057fe5b6000918252602080832061ffff87168085526006835260408086203387529093529190932060049092029092019250906110a990610e31565b8054156110f25760006110de8260010154610b4d64e8d4a51000610ac287600301548760000154611b1790919063ffffffff16565b905080156110f0576110f03382611c63565b505b821561112a578154611115906001600160a01b031633308663ffffffff611e4616565b8054611127908463ffffffff611a4a16565b81555b6003820154815461114b9164e8d4a5100091610ac29163ffffffff611b1716565b600182015560408051848152905161ffff86169133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6000546001600160a01b031690565b6000818311156111f7576040805162461bcd60e51b815260206004820152601a60248201527f696e636f72726563742066726f6d2f746f2073657175656e6365000000000000604482015290519081900360640190fd5b60085482116112085750600061124a565b6008548310801561121a575060085482115b1561123a5760085461123390839063ffffffff611bb216565b905061124a565b611233828463ffffffff611bb216565b92915050565b600082815260016020526040812061126e908363ffffffff611ebf16565b9392505050565b600082815260016020526040812061126e908363ffffffff611ecb16565b600081565b600060058261ffff16815481106112ab57fe5b6000918252602080832061ffff861684526006825260408085203380875293528420805485825560018201959095556004909302018054909450919291611305916001600160a01b0391909116908363ffffffff611df416565b60408051828152905161ffff86169133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206113719033611275565b6113c2576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b6003819055610f64610f67565b600081815260016020526040812061124a90611ee0565b60008281526001602052604090206002015461140490610953611aa4565b610c995760405162461bcd60e51b81526004018080602001828103825260308152602001806125fd6030913960400191505060405180910390fd5b611447611aa4565b6000546001600160a01b039081169116148061146c57506000546001600160a01b0316155b6114bd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6004546001600160a01b031661151a576040805162461bcd60e51b815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b600060058261ffff168154811061152d57fe5b600091825260208083206004928302018054604080516370a0823160e01b81523095810195909552519195506001600160a01b0316939284926370a0823192602480840193829003018186803b15801561158657600080fd5b505afa15801561159a573d6000803e3d6000fd5b505050506040513d60208110156115b057600080fd5b50516004549091506115d5906001600160a01b0384811691168363ffffffff611eeb16565b60048054604080517fce5494bb0000000000000000000000000000000000000000000000000000000081526001600160a01b038681169482019490945290516000939092169163ce5494bb9160248082019260209290919082900301818787803b15801561164257600080fd5b505af1158015611656573d6000803e3d6000fd5b505050506040513d602081101561166c57600080fd5b5051604080516370a0823160e01b815230600482015290519192506001600160a01b038316916370a0823191602480820192602092909190829003018186803b1580156116b857600080fd5b505afa1580156116cc573d6000803e3d6000fd5b505050506040513d60208110156116e257600080fd5b50518214611737576040805162461bcd60e51b815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83546001600160a01b0319166001600160a01b039190911617909255505050565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206117839033611275565b6117d4576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b80156117e2576117e2610f67565b6118298261181d60058661ffff16815481106117fa57fe5b906000526020600020906004020160010154600754611bb290919063ffffffff16565b9063ffffffff611a4a16565b6007819055508160058461ffff168154811061184157fe5b906000526020600020906004020160010181905550505050565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c01902081565b60066020908152600092835260408084209091529082529020805460019091015482565b6118ab611aa4565b6000546001600160a01b03908116911614806118d057506000546001600160a01b0316155b611921576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166119665760405162461bcd60e51b81526004018080602001828103825260268152602001806125d76026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206119ec9033611275565b611a3d576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b6008819055610f64610f67565b60008282018381101561126e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6000828152600160205260409020611ac6908263ffffffff61203016565b1561099d57611ad3611aa4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082611b265750600061124a565b82820282848281611b3357fe5b041461126e5760405162461bcd60e51b815260040180806020018281038252602181526020018061262d6021913960400191505060405180910390fd5b600061126e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612045565b600061126e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120e7565b6000828152600160205260409020611c12908263ffffffff61214116565b1561099d57611c1f611aa4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611cae57600080fd5b505afa158015611cc2573d6000803e3d6000fd5b505050506040513d6020811015611cd857600080fd5b5051905080821115611d6c576002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611d3a57600080fd5b505af1158015611d4e573d6000803e3d6000fd5b505050506040513d6020811015611d6457600080fd5b50611def9050565b6002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611dc257600080fd5b505af1158015611dd6573d6000803e3d6000fd5b505050506040513d6020811015611dec57600080fd5b50505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611def908490612156565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03167f23b872dd00000000000000000000000000000000000000000000000000000000179052611eb9908590612156565b50505050565b600061126e8383612207565b600061126e836001600160a01b03841661226b565b600061124a82612283565b801580611f8a5750604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611f5c57600080fd5b505afa158015611f70573d6000803e3d6000fd5b505050506040513d6020811015611f8657600080fd5b5051155b611fc55760405162461bcd60e51b81526004018080602001828103825260368152602001806126786036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611def908490612156565b600061126e836001600160a01b038416612287565b600081836120d15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561209657818101518382015260200161207e565b50505050905090810190601f1680156120c35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816120dd57fe5b0495945050505050565b600081848411156121395760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561209657818101518382015260200161207e565b505050900390565b600061126e836001600160a01b0384166122d1565b60606121ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123979092919063ffffffff16565b805190915015611def578080602001905160208110156121ca57600080fd5b5051611def5760405162461bcd60e51b815260040180806020018281038252602a81526020018061264e602a913960400191505060405180910390fd5b815460009082106122495760405162461bcd60e51b81526004018080602001828103825260228152602001806125866022913960400191505060405180910390fd5b82600001828154811061225857fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b6000612293838361226b565b6122c95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561124a565b50600061124a565b6000818152600183016020526040812054801561238d578354600019808301919081019060009087908390811061230457fe5b906000526020600020015490508087600001848154811061232157fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061235157fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061124a565b600091505061124a565b60606123a684846000856123ae565b949350505050565b60606123b98561251b565b61240a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106124495780518252601f19909201916020918201910161242a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146124ab576040519150601f19603f3d011682016040523d82523d6000602084013e6124b0565b606091505b509150915081156124c45791506123a69050565b8051156124d45780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561209657818101518382015260200161207e565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906123a6575050151592915050565b604051806080016040528060006001600160a01b03168152602001600081526020016000815260200160008152509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220419202a19107ae9d420ef7969bc8d72eeaed1074d3c7aec92afc124719341f9864736f6c63430006060033000000000000000000000000523a7fe78f3b11eff51441e3fcc95cb94a37d25c0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000b71b00

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102265760003560e01c80637cd07e471161012a578063b392c6a3116100bd578063e515804a1161008c578063efaf059711610071578063efaf059714610601578063f2fde38b14610631578063f35e4a6e1461065757610226565b8063e515804a146105ca578063ec87621c146105f957610226565b8063b392c6a314610543578063ca15c87314610560578063d547741f1461057d578063dd8ab012146105a957610226565b80639010d07c116100f95780639010d07c146104b757806391d14854146104da578063a217fddf1461051a578063b34a3fcf1461052257610226565b80637cd07e471461045d578063859fe6c7146104655780638da5cb5b1461048c5780638dbb1e3a1461049457610226565b80632f2ff15d116101bd5780633d9120331161018c57806351eb05a61161017157806351eb05a614610430578063630b5ba11461044d578063715018a61461045557610226565b80633d9120331461040157806348cd4cb11461042857610226565b80632f2ff15d1461033f5780633545b0fe1461036b578063357fad9a146103b457806336568abe146103d557610226565b806317caf6f1116101f957806317caf6f1146102be5780631eaaa045146102c657806323cf3118146102fc578063248a9ca31461032257610226565b8063081e3eda1461022b5780631034204014610245578063105036ae1461024d5780631526fe2714610271575b600080fd5b610233610674565b60408051918252519081900360200190f35b61023361067a565b610255610680565b604080516001600160a01b039092168252519081900360200190f35b61028e6004803603602081101561028757600080fd5b503561068f565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6102336106d0565b6102fa600480360360608110156102dc57600080fd5b508035906001600160a01b03602082013516906040013515156106d6565b005b6102fa6004803603602081101561031257600080fd5b50356001600160a01b0316610880565b6102336004803603602081101561033857600080fd5b5035610920565b6102fa6004803603604081101561035557600080fd5b50803590602001356001600160a01b0316610935565b61039b6004803603604081101561038157600080fd5b50803561ffff1690602001356001600160a01b03166109a1565b6040805192835260208301919091528051918290030190f35b61028e600480360360208110156103ca57600080fd5b503561ffff16610b68565b6102fa600480360360408110156103eb57600080fd5b50803590602001356001600160a01b0316610c42565b6102fa6004803603604081101561041757600080fd5b5061ffff8135169060200135610ca3565b610233610e2b565b6102fa6004803603602081101561044657600080fd5b5035610e31565b6102fa610f67565b6102fa610f86565b61025561104e565b6102fa6004803603604081101561047b57600080fd5b5061ffff813516906020013561105d565b610255611191565b610233600480360360408110156104aa57600080fd5b50803590602001356111a0565b610255600480360360408110156104cd57600080fd5b5080359060200135611250565b610506600480360360408110156104f057600080fd5b50803590602001356001600160a01b0316611275565b604080519115158252519081900360200190f35b610233611293565b6102fa6004803603602081101561053857600080fd5b503561ffff16611298565b6102fa6004803603602081101561055957600080fd5b5035611346565b6102336004803603602081101561057657600080fd5b50356113cf565b6102fa6004803603604081101561059357600080fd5b50803590602001356001600160a01b03166113e6565b6102fa600480360360208110156105bf57600080fd5b503561ffff1661143f565b6102fa600480360360608110156105e057600080fd5b5061ffff81351690602081013590604001351515611758565b61023361185b565b61039b6004803603604081101561061757600080fd5b50803561ffff1690602001356001600160a01b031661187f565b6102fa6004803603602081101561064757600080fd5b50356001600160a01b03166118a3565b6102fa6004803603602081101561066d57600080fd5b50356119c1565b60055490565b60035481565b6002546001600160a01b031681565b6005818154811061069c57fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60075481565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206107019033611275565b610752576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b81811561076157610761610f67565b6000600854431161077457600854610776565b435b60075490915061078c908663ffffffff611a4a16565b600755604080516080810182526001600160a01b0393841681526020810196875290810191825260006060820181815260058054600181018255925291517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600490920291820180546001600160a01b031916919095161790935594517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1830155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db282015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3909301929092555050565b610888611aa4565b6000546001600160a01b03908116911614806108ad57506000546001600160a01b0316155b6108fe576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60009081526001602052604090206002015490565b60008281526001602052604090206002015461095890610953611aa4565b611275565b6109935760405162461bcd60e51b815260040180806020018281038252602f8152602001806125a8602f913960400191505060405180910390fd5b61099d8282611aa8565b5050565b600080600060058561ffff16815481106109b757fe5b6000918252602080832061ffff891684526006825260408085206001600160a01b038a8116875290845281862060049586029093016003810154815484516370a0823160e01b81523098810198909852935191985093969395939492909116926370a08231926024808301939192829003018186803b158015610a3957600080fd5b505afa158015610a4d573d6000803e3d6000fd5b505050506040513d6020811015610a6357600080fd5b5051600285015490915043118015610a7a57508015155b15610afe576000610a8f8560020154436111a0565b90506000610ace600754610ac28860010154610ab660035487611b1790919063ffffffff16565b9063ffffffff611b1716565b9063ffffffff611b7016565b9050610af9610aec84610ac28464e8d4a5100063ffffffff611b1716565b859063ffffffff611a4a16565b935050505b61ffff881660009081526006602090815260408083206001600160a01b038b16845290915290205460018401548454610b599190610b4d9064e8d4a5100090610ac2908863ffffffff611b1716565b9063ffffffff611bb216565b95509550505050509250929050565b6000806000806005805490508561ffff1610610bcb576040805162461bcd60e51b815260206004820152600f60248201527f696e64657820696e636f72726563740000000000000000000000000000000000604482015290519081900360640190fd5b610bd3612554565b60058661ffff1681548110610be457fe5b60009182526020918290206040805160808101825260049390930290910180546001600160a01b0316808452600182015494840185905260028201549284018390526003909101546060909301839052999298509650945092505050565b610c4a611aa4565b6001600160a01b0316816001600160a01b031614610c995760405162461bcd60e51b815260040180806020018281038252602f8152602001806126ae602f913960400191505060405180910390fd5b61099d8282611bf4565b600060058361ffff1681548110610cb657fe5b6000918252602080832061ffff871684526006825260408085203386529092529220805460049092029092019250831115610d38576040805162461bcd60e51b815260206004820152601260248201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604482015290519081900360640190fd5b610d458461ffff16610e31565b6000610d738260010154610b4d64e8d4a51000610ac287600301548760000154611b1790919063ffffffff16565b90508015610d8557610d853382611c63565b8315610dbb578154610d9d908563ffffffff611bb216565b82558254610dbb906001600160a01b0316338663ffffffff611df416565b60038301548254610ddc9164e8d4a5100091610ac29163ffffffff611b1716565b60018301556040805185815260208101839052815161ffff88169233927f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca94929081900390910190a35050505050565b60085481565b600060058281548110610e4057fe5b9060005260206000209060040201905080600201544311610e615750610f64565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610eab57600080fd5b505afa158015610ebf573d6000803e3d6000fd5b505050506040513d6020811015610ed557600080fd5b5051905080610eeb575043600290910155610f64565b6000610efb8360020154436111a0565b90506000610f22600754610ac28660010154610ab660035487611b1790919063ffffffff16565b9050610f51610f4084610ac28464e8d4a5100063ffffffff611b1716565b60038601549063ffffffff611a4a16565b6003850155505043600290920191909155505b50565b60055460005b8181101561099d57610f7e81610e31565b600101610f6d565b610f8e611aa4565b6000546001600160a01b0390811691161480610fb357506000546001600160a01b0316155b611004576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6004546001600160a01b031681565b600060058361ffff168154811061107057fe5b6000918252602080832061ffff87168085526006835260408086203387529093529190932060049092029092019250906110a990610e31565b8054156110f25760006110de8260010154610b4d64e8d4a51000610ac287600301548760000154611b1790919063ffffffff16565b905080156110f0576110f03382611c63565b505b821561112a578154611115906001600160a01b031633308663ffffffff611e4616565b8054611127908463ffffffff611a4a16565b81555b6003820154815461114b9164e8d4a5100091610ac29163ffffffff611b1716565b600182015560408051848152905161ffff86169133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6000546001600160a01b031690565b6000818311156111f7576040805162461bcd60e51b815260206004820152601a60248201527f696e636f72726563742066726f6d2f746f2073657175656e6365000000000000604482015290519081900360640190fd5b60085482116112085750600061124a565b6008548310801561121a575060085482115b1561123a5760085461123390839063ffffffff611bb216565b905061124a565b611233828463ffffffff611bb216565b92915050565b600082815260016020526040812061126e908363ffffffff611ebf16565b9392505050565b600082815260016020526040812061126e908363ffffffff611ecb16565b600081565b600060058261ffff16815481106112ab57fe5b6000918252602080832061ffff861684526006825260408085203380875293528420805485825560018201959095556004909302018054909450919291611305916001600160a01b0391909116908363ffffffff611df416565b60408051828152905161ffff86169133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206113719033611275565b6113c2576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b6003819055610f64610f67565b600081815260016020526040812061124a90611ee0565b60008281526001602052604090206002015461140490610953611aa4565b610c995760405162461bcd60e51b81526004018080602001828103825260308152602001806125fd6030913960400191505060405180910390fd5b611447611aa4565b6000546001600160a01b039081169116148061146c57506000546001600160a01b0316155b6114bd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6004546001600160a01b031661151a576040805162461bcd60e51b815260206004820152601460248201527f6d6967726174653a206e6f206d69677261746f72000000000000000000000000604482015290519081900360640190fd5b600060058261ffff168154811061152d57fe5b600091825260208083206004928302018054604080516370a0823160e01b81523095810195909552519195506001600160a01b0316939284926370a0823192602480840193829003018186803b15801561158657600080fd5b505afa15801561159a573d6000803e3d6000fd5b505050506040513d60208110156115b057600080fd5b50516004549091506115d5906001600160a01b0384811691168363ffffffff611eeb16565b60048054604080517fce5494bb0000000000000000000000000000000000000000000000000000000081526001600160a01b038681169482019490945290516000939092169163ce5494bb9160248082019260209290919082900301818787803b15801561164257600080fd5b505af1158015611656573d6000803e3d6000fd5b505050506040513d602081101561166c57600080fd5b5051604080516370a0823160e01b815230600482015290519192506001600160a01b038316916370a0823191602480820192602092909190829003018186803b1580156116b857600080fd5b505afa1580156116cc573d6000803e3d6000fd5b505050506040513d60208110156116e257600080fd5b50518214611737576040805162461bcd60e51b815260206004820152600c60248201527f6d6967726174653a206261640000000000000000000000000000000000000000604482015290519081900360640190fd5b83546001600160a01b0319166001600160a01b039190911617909255505050565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206117839033611275565b6117d4576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b80156117e2576117e2610f67565b6118298261181d60058661ffff16815481106117fa57fe5b906000526020600020906004020160010154600754611bb290919063ffffffff16565b9063ffffffff611a4a16565b6007819055508160058461ffff168154811061184157fe5b906000526020600020906004020160010181905550505050565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c01902081565b60066020908152600092835260408084209091529082529020805460019091015482565b6118ab611aa4565b6000546001600160a01b03908116911614806118d057506000546001600160a01b0316155b611921576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166119665760405162461bcd60e51b81526004018080602001828103825260268152602001806125d76026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206119ec9033611275565b611a3d576040805162461bcd60e51b815260206004820152601960248201527f43616c6c6572206973206e6f7420746865204d616e6167657200000000000000604482015290519081900360640190fd5b6008819055610f64610f67565b60008282018381101561126e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b6000828152600160205260409020611ac6908263ffffffff61203016565b1561099d57611ad3611aa4565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082611b265750600061124a565b82820282848281611b3357fe5b041461126e5760405162461bcd60e51b815260040180806020018281038252602181526020018061262d6021913960400191505060405180910390fd5b600061126e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612045565b600061126e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120e7565b6000828152600160205260409020611c12908263ffffffff61214116565b1561099d57611c1f611aa4565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611cae57600080fd5b505afa158015611cc2573d6000803e3d6000fd5b505050506040513d6020811015611cd857600080fd5b5051905080821115611d6c576002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611d3a57600080fd5b505af1158015611d4e573d6000803e3d6000fd5b505050506040513d6020811015611d6457600080fd5b50611def9050565b6002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015611dc257600080fd5b505af1158015611dd6573d6000803e3d6000fd5b505050506040513d6020811015611dec57600080fd5b50505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611def908490612156565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03167f23b872dd00000000000000000000000000000000000000000000000000000000179052611eb9908590612156565b50505050565b600061126e8383612207565b600061126e836001600160a01b03841661226b565b600061124a82612283565b801580611f8a5750604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611f5c57600080fd5b505afa158015611f70573d6000803e3d6000fd5b505050506040513d6020811015611f8657600080fd5b5051155b611fc55760405162461bcd60e51b81526004018080602001828103825260368152602001806126786036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052611def908490612156565b600061126e836001600160a01b038416612287565b600081836120d15760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561209657818101518382015260200161207e565b50505050905090810190601f1680156120c35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816120dd57fe5b0495945050505050565b600081848411156121395760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561209657818101518382015260200161207e565b505050900390565b600061126e836001600160a01b0384166122d1565b60606121ab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123979092919063ffffffff16565b805190915015611def578080602001905160208110156121ca57600080fd5b5051611def5760405162461bcd60e51b815260040180806020018281038252602a81526020018061264e602a913960400191505060405180910390fd5b815460009082106122495760405162461bcd60e51b81526004018080602001828103825260228152602001806125866022913960400191505060405180910390fd5b82600001828154811061225857fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b6000612293838361226b565b6122c95750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561124a565b50600061124a565b6000818152600183016020526040812054801561238d578354600019808301919081019060009087908390811061230457fe5b906000526020600020015490508087600001848154811061232157fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061235157fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061124a565b600091505061124a565b60606123a684846000856123ae565b949350505050565b60606123b98561251b565b61240a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106124495780518252601f19909201916020918201910161242a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146124ab576040519150601f19603f3d011682016040523d82523d6000602084013e6124b0565b606091505b509150915081156124c45791506123a69050565b8051156124d45780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561209657818101518382015260200161207e565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906123a6575050151592915050565b604051806080016040528060006001600160a01b03168152602001600081526020016000815260200160008152509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220419202a19107ae9d420ef7969bc8d72eeaed1074d3c7aec92afc124719341f9864736f6c63430006060033

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

000000000000000000000000523a7fe78f3b11eff51441e3fcc95cb94a37d25c0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000b71b00

-----Decoded View---------------
Arg [0] : _ncashToken (address): 0x523A7FE78f3b11efF51441E3fCc95CB94A37D25C
Arg [1] : _nctPerBlock (uint256): 1000000000000000000
Arg [2] : _startBlock (uint256): 12000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000523a7fe78f3b11eff51441e3fcc95cb94a37d25c
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000b71b00


Deployed Bytecode Sourcemap

51095:10490:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;51095:10490:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;54144:95:0;;;:::i;:::-;;;;;;;;;;;;;;;;52697:26;;;:::i;52626:::-;;;:::i;:::-;;;;-1:-1:-1;;;;;52626:26:0;;;;;;;;;;;;;;52898;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;52898:26:0;;:::i;:::-;;;;-1:-1:-1;;;;;52898:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53140:34;;;:::i;55015:574::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;55015:574:0;;;-1:-1:-1;;;;;55015:574:0;;;;;;;;;;;;:::i;:::-;;56065:116;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56065:116:0;-1:-1:-1;;;;;56065:116:0;;:::i;33266:114::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;33266:114:0;;:::i;33642:227::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;33642:227:0;;;;;;-1:-1:-1;;;;;33642:227:0;;:::i;57292:790::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;57292:790:0;;;;;;;;-1:-1:-1;;;;;57292:790:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;54247:311;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;54247:311:0;;;;:::i;34851:209::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34851:209:0;;;;;;-1:-1:-1;;;;;34851:209:0;;:::i;59979:745::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;59979:745:0;;;;;;;;;:::i;53230:25::-;;;:::i;58421:680::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;58421:680:0;;:::i;58165:180::-;;;:::i;28468:148::-;;;:::i;52828:34::-;;;:::i;59174:748::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;59174:748:0;;;;;;;;;:::i;27802:79::-;;;:::i;56855:374::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56855:374:0;;;;;;;:::i;32939:138::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;32939:138:0;;;;;;;:::i;31900:139::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;31900:139:0;;;;;;-1:-1:-1;;;;;31900:139:0;;:::i;:::-;;;;;;;;;;;;;;;;;;30645:49;;;:::i;60795:384::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;60795:384:0;;;;:::i;54566:138::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;54566:138:0;;:::i;32213:127::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;32213:127:0;;:::i;34114:230::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34114:230:0;;;;;;-1:-1:-1;;;;;34114:230:0;;:::i;56279:500::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;56279:500:0;;;;:::i;55684:305::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;55684:305:0;;;;;;;;;;;;;;;;:::i;51285:64::-;;;:::i;52980:65::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;52980:65:0;;;;;;;;-1:-1:-1;;;;;52980:65:0;;:::i;28771:244::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;28771:244:0;-1:-1:-1;;;;;28771:244:0;;:::i;54712:134::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;54712:134:0;;:::i;54144:95::-;54216:8;:15;54144:95;:::o;52697:26::-;;;;:::o;52626:::-;;;-1:-1:-1;;;;;52626:26:0;;:::o;52898:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;52898:26:0;;;;-1:-1:-1;52898:26:0;;;:::o;53140:34::-;;;;:::o;55015:574::-;51324:25;;;-1:-1:-1;;;51324:25:0;;;;;;;;;;;;54053:33;;54075:10;54053:7;:33::i;:::-;54045:71;;;;;-1:-1:-1;;;54045:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;55147:15;55174:61;::::1;;;55206:17;:15;:17::i;:::-;55245:23;55286:10;;55271:12;:25;:53;;55314:10;;55271:53;;;55299:12;55271:53;55353:15;::::0;55245:79;;-1:-1:-1;55353:32:0::1;::::0;55373:11;55353:32:::1;:19;:32;:::i;:::-;55335:15;:50:::0;55410:170:::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;55410:170:0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;55410:170:0;;;;;;55396:8:::1;27:10:-1::0;;39:1:::1;23:18:::0;::::1;45:23:::0;;55396:185:0;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;55396:185:0::1;::::0;;;::::1;;::::0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;55015:574:0:o;56065:116::-;28024:12;:10;:12::i;:::-;28014:6;;-1:-1:-1;;;;;28014:6:0;;;:22;;;;:46;;-1:-1:-1;28058:1:0;28040:6;-1:-1:-1;;;;;28040:6:0;:20;28014:46;28006:91;;;;;-1:-1:-1;;;28006:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56133:8:::1;:40:::0;;-1:-1:-1;;;;;;56133:40:0::1;-1:-1:-1::0;;;;;56133:40:0;;;::::1;::::0;;;::::1;::::0;;56065:116::o;33266:114::-;33323:7;33350:12;;;:6;:12;;;;;:22;;;;33266:114::o;33642:227::-;33734:12;;;;:6;:12;;;;;:22;;;33726:45;;33758:12;:10;:12::i;:::-;33726:7;:45::i;:::-;33718:105;;;;-1:-1:-1;;;33718:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33836:25;33847:4;33853:7;33836:10;:25::i;:::-;33642:227;;:::o;57292:790::-;57364:7;57373;57393:21;57417:8;57426:4;57417:14;;;;;;;;;;;;;;;;;;57466;;;;;:8;:14;;;;;;-1:-1:-1;;;;;57466:21:0;;;;;;;;;;;57417:14;;;;;;;57523:19;;;;57572:12;;:37;;-1:-1:-1;;;57572:37:0;;57603:4;57572:37;;;;;;;;;57417:14;;-1:-1:-1;57466:21:0;;57523:19;;57417:14;;57572:12;;;;;:22;;:37;;;;;57417:14;;57572:37;;;;;:12;:37;;;2:2:-1;;;;27:1;24;17:12;2:2;57572:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57572:37:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;57572:37:0;57639:20;;;;57572:37;;-1:-1:-1;57624:12:0;:35;:52;;;;-1:-1:-1;57663:13:0;;;57624:52;57620:344;;;57693:18;57714:49;57728:4;:20;;;57750:12;57714:13;:49::i;:::-;57693:70;;57778:17;57798:69;57851:15;;57798:48;57830:4;:15;;;57798:27;57813:11;;57798:10;:14;;:27;;;;:::i;:::-;:31;:48;:31;:48;:::i;:::-;:52;:69;:52;:69;:::i;:::-;57778:89;-1:-1:-1;57899:53:0;57918:33;57942:8;57918:19;57778:89;57932:4;57918:19;:13;:19;:::i;:33::-;57899:14;;:53;:18;:53;:::i;:::-;57882:70;;57620:344;;;57982:14;;;;;;;:8;:14;;;;;;;;-1:-1:-1;;;;;57982:21:0;;;;;;;;;:28;58057:15;;;;58011:11;;:62;;58057:15;58011:41;;58047:4;;58011:31;;58027:14;58011:31;:15;:31;:::i;:41::-;:45;:62;:45;:62;:::i;:::-;57974:100;;;;;;;;57292:790;;;;;:::o;54247:311::-;54299:7;54308;54317;54326;54364:8;:15;;;;54355:6;:24;;;54346:53;;;;;-1:-1:-1;;;54346:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;54410:20;;:::i;:::-;54433:8;54442:6;54433:16;;;;;;;;;;;;;;;;;;;54410:39;;;;;;;;54433:16;;;;;;;;54410:39;;-1:-1:-1;;;;;54410:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;54410:39:0;-1:-1:-1;54410:39:0;-1:-1:-1;54247:311:0;-1:-1:-1;;;54247:311:0:o;34851:209::-;34949:12;:10;:12::i;:::-;-1:-1:-1;;;;;34938:23:0;:7;-1:-1:-1;;;;;34938:23:0;;34930:83;;;;-1:-1:-1;;;34930:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35026:26;35038:4;35044:7;35026:11;:26::i;59979:745::-;60045:21;60069:8;60078:4;60069:14;;;;;;;;;;;;;;;;;;60118;;;;;:8;:14;;;;;;60133:10;60118:26;;;;;;;60163:11;;60069:14;;;;;;;;-1:-1:-1;60163:22:0;-1:-1:-1;60163:22:0;60155:53;;;;;-1:-1:-1;;;60155:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;60219:16;60230:4;60219:16;;:10;:16::i;:::-;60246:15;60264:67;60315:4;:15;;;60264:46;60305:4;60264:36;60280:4;:19;;;60264:4;:11;;;:15;;:36;;;;:::i;:67::-;60246:85;-1:-1:-1;60345:11:0;;60342:79;;60373:36;60389:10;60401:7;60373:15;:36::i;:::-;60434:11;;60431:151;;60476:11;;:24;;60492:7;60476:24;:15;:24;:::i;:::-;60462:38;;60515:12;;:55;;-1:-1:-1;;;;;60515:12:0;60549:10;60562:7;60515:55;:25;:55;:::i;:::-;60626:19;;;;60610:11;;:46;;60651:4;;60610:36;;;:15;:36;:::i;:46::-;60592:15;;;:64;60672:44;;;;;;;;;;;;;;;;;;60681:10;;60672:44;;;;;;;;;;;59979:745;;;;;:::o;53230:25::-;;;;:::o;58421:680::-;58473:21;58497:8;58506:4;58497:14;;;;;;;;;;;;;;;;;;58473:38;;58542:4;:20;;;58526:12;:36;58522:75;;58579:7;;;58522:75;58626:12;;:37;;;-1:-1:-1;;;58626:37:0;;58657:4;58626:37;;;;;;58607:16;;-1:-1:-1;;;;;58626:12:0;;:22;;:37;;;;;;;;;;;;;;:12;:37;;;2:2:-1;;;;27:1;24;17:12;2:2;58626:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;58626:37:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;58626:37:0;;-1:-1:-1;58678:13:0;58674:102;;-1:-1:-1;58731:12:0;58708:20;;;;:35;58758:7;;58674:102;58786:18;58807:49;58821:4;:20;;;58843:12;58807:13;:49::i;:::-;58786:70;;58867:17;58887:69;58940:15;;58887:48;58919:4;:15;;;58887:27;58902:11;;58887:10;:14;;:27;;;;:::i;:69::-;58867:89;-1:-1:-1;58989:58:0;59013:33;59037:8;59013:19;58867:89;59027:4;59013:19;:13;:19;:::i;:33::-;58989:19;;;;;:58;:23;:58;:::i;:::-;58967:19;;;:80;-1:-1:-1;;59081:12:0;59058:20;;;;:35;;;;-1:-1:-1;58421:680:0;;:::o;58165:180::-;58227:8;:15;58210:14;58253:85;58281:6;58275:3;:12;58253:85;;;58311:15;58322:3;58311:10;:15::i;:::-;58289:5;;58253:85;;28468:148;28024:12;:10;:12::i;:::-;28014:6;;-1:-1:-1;;;;;28014:6:0;;;:22;;;;:46;;-1:-1:-1;28058:1:0;28040:6;-1:-1:-1;;;;;28040:6:0;:20;28014:46;28006:91;;;;;-1:-1:-1;;;28006:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28575:1:::1;28559:6:::0;;28538:40:::1;::::0;-1:-1:-1;;;;;28559:6:0;;::::1;::::0;28538:40:::1;::::0;28575:1;;28538:40:::1;28606:1;28589:19:::0;;-1:-1:-1;;;;;;28589:19:0::1;::::0;;28468:148::o;52828:34::-;;;-1:-1:-1;;;;;52828:34:0;;:::o;59174:748::-;59239:21;59263:8;59272:4;59263:14;;;;;;;;;;;;;;;;;;59312;;;;;;:8;:14;;;;;;59327:10;59312:26;;;;;;;;;59263:14;;;;;;;;-1:-1:-1;59312:26:0;59349:16;;:10;:16::i;:::-;59380:11;;:15;59376:234;;59412:15;59430:67;59481:4;:15;;;59430:46;59471:4;59430:36;59446:4;:19;;;59430:4;:11;;;:15;;:36;;;;:::i;:67::-;59412:85;-1:-1:-1;59515:11:0;;59512:87;;59547:36;59563:10;59575:7;59547:15;:36::i;:::-;59376:234;;59623:11;;59620:170;;59651:12;;:74;;-1:-1:-1;;;;;59651:12:0;59689:10;59710:4;59717:7;59651:74;:29;:74;:::i;:::-;59754:11;;:24;;59770:7;59754:24;:15;:24;:::i;:::-;59740:38;;59620:170;59834:19;;;;59818:11;;:46;;59859:4;;59818:36;;;:15;:36;:::i;:46::-;59800:15;;;:64;59880:34;;;;;;;;;;;;59888:10;;59880:34;;;;;;;;;59174:748;;;;:::o;27802:79::-;27840:7;27867:6;-1:-1:-1;;;;;27867:6:0;27802:79;:::o;56855:374::-;56927:7;56965:3;56956:5;:12;;56947:52;;;;;-1:-1:-1;;;56947:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;57021:10;;57014:3;:17;57010:212;;-1:-1:-1;57054:1:0;57047:8;;57010:212;57084:10;;57076:5;:18;:38;;;;;57104:10;;57098:3;:16;57076:38;57072:150;;;57145:10;;57137:19;;:3;;:19;:7;:19;:::i;:::-;57130:26;;;;57072:150;57196:14;:3;57204:5;57196:14;:7;:14;:::i;57072:150::-;56855:374;;;;:::o;32939:138::-;33012:7;33039:12;;;:6;:12;;;;;:30;;33063:5;33039:30;:23;:30;:::i;:::-;33032:37;32939:138;-1:-1:-1;;;32939:138:0:o;31900:139::-;31969:4;31993:12;;;:6;:12;;;;;:38;;32023:7;31993:38;:29;:38;:::i;30645:49::-;30690:4;30645:49;:::o;60795:384::-;60853:21;60877:8;60886:4;60877:14;;;;;;;;;;;;;;;;;;60926;;;;;:8;:14;;;;;;60941:10;60926:26;;;;;;;60980:11;;61002:15;;;-1:-1:-1;61028:15:0;;:19;;;;60877:14;;;;;61058:12;;60877:14;;-1:-1:-1;60926:26:0;;60980:11;61058:54;;-1:-1:-1;;;;;61058:12:0;;;;;60980:11;61058:54;:25;:54;:::i;:::-;61128:43;;;;;;;;;;;;61146:10;;61128:43;;;;;;;;;60795:384;;;;:::o;54566:138::-;51324:25;;;-1:-1:-1;;;51324:25:0;;;;;;;;;;;;54053:33;;54075:10;54053:7;:33::i;:::-;54045:71;;;;;-1:-1:-1;;;54045:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;54642:11:::1;:26:::0;;;54679:17:::1;:15;:17::i;32213:127::-:0;32276:7;32303:12;;;:6;:12;;;;;:29;;:27;:29::i;34114:230::-;34207:12;;;;:6;:12;;;;;:22;;;34199:45;;34231:12;:10;:12::i;34199:45::-;34191:106;;;;-1:-1:-1;;;34191:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56279:500;28024:12;:10;:12::i;:::-;28014:6;;-1:-1:-1;;;;;28014:6:0;;;:22;;;;:46;;-1:-1:-1;28058:1:0;28040:6;-1:-1:-1;;;;;28040:6:0;:20;28014:46;28006:91;;;;;-1:-1:-1;;;28006:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56353:8:::1;::::0;-1:-1:-1;;;;;56353:8:0::1;56337:64;;;::::0;;-1:-1:-1;;;56337:64:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;56412:21;56436:8;56445:4;56436:14;;;;;;;;;;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;56478:12:::0;;56515:32:::1;::::0;;-1:-1:-1;;;56515:32:0;;56541:4:::1;56515:32:::0;;::::1;::::0;;;;;56436:14;;-1:-1:-1;;;;;;56478:12:0::1;::::0;56436:14;56478:12;;56515:17:::1;::::0;:32;;;;;;;;;;56478:12;56515:32;::::1;;2:2:-1::0;::::1;;;27:1;24::::0;17:12:::1;2:2;56515:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;56515:32:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;-1:-1:::0;56515:32:0;56586:8:::1;::::0;56515:32;;-1:-1:-1;56558:43:0::1;::::0;-1:-1:-1;;;;;56558:19:0;;::::1;::::0;56586:8:::1;56515:32:::0;56558:43:::1;:19;:43;:::i;:::-;56632:8;::::0;;:25:::1;::::0;;;;;-1:-1:-1;;;;;56632:25:0;;::::1;::::0;;::::1;::::0;;;;;;56612:17:::1;::::0;56632:8;;::::1;::::0;:16:::1;::::0;:25;;;;;::::1;::::0;;;;;;;;;56612:17;56632:8;:25;::::1;;2:2:-1::0;::::1;;;27:1;24::::0;17:12:::1;2:2;56632:25:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;56632:25:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;-1:-1:::0;56632:25:0;56683:35:::1;::::0;;-1:-1:-1;;;56683:35:0;;56712:4:::1;56683:35;::::0;::::1;::::0;;;56632:25;;-1:-1:-1;;;;;;56683:20:0;::::1;::::0;::::1;::::0;:35;;;;;56632:25:::1;::::0;56683:35;;;;;;;;:20;:35;::::1;;2:2:-1::0;::::1;;;27:1;24::::0;17:12:::1;2:2;56683:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;56683:35:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;-1:-1:::0;56683:35:0;56676:42;::::1;56668:67;;;::::0;;-1:-1:-1;;;56668:67:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;56746:25:::0;;-1:-1:-1;;;;;;56746:25:0::1;-1:-1:-1::0;;;;;56746:25:0;;;::::1;;::::0;;;-1:-1:-1;;;56279:500:0:o;55684:305::-;51324:25;;;-1:-1:-1;;;51324:25:0;;;;;;;;;;;;54053:33;;54075:10;54053:7;:33::i;:::-;54045:71;;;;;-1:-1:-1;;;54045:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;55783:11:::1;55779:61;;;55811:17;:15;:17::i;:::-;55868:63;55919:11;55868:46;55888:8;55897:4;55888:14;;;;;;;;;;;;;;;;;;;;:25;;;55868:15;;:19;;:46;;;;:::i;:::-;:50:::0;:63:::1;:50;:63;:::i;:::-;55850:15;:81;;;;55970:11;55942:8;55951:4;55942:14;;;;;;;;;;;;;;;;;;;;:25;;:39;;;;55684:305:::0;;;:::o;51285:64::-;51324:25;;;-1:-1:-1;;;51324:25:0;;;;;;;;;;;;51285:64;:::o;52980:65::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;28771:244::-;28024:12;:10;:12::i;:::-;28014:6;;-1:-1:-1;;;;;28014:6:0;;;:22;;;;:46;;-1:-1:-1;28058:1:0;28040:6;-1:-1:-1;;;;;28040:6:0;:20;28014:46;28006:91;;;;;-1:-1:-1;;;28006:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28860:22:0;::::1;28852:73;;;;-1:-1:-1::0;;;28852:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28962:6;::::0;;28941:38:::1;::::0;-1:-1:-1;;;;;28941:38:0;;::::1;::::0;28962:6;::::1;::::0;28941:38:::1;::::0;::::1;28990:6;:17:::0;;-1:-1:-1;;;;;;28990:17:0::1;-1:-1:-1::0;;;;;28990:17:0;;;::::1;::::0;;;::::1;::::0;;28771:244::o;54712:134::-;51324:25;;;-1:-1:-1;;;51324:25:0;;;;;;;;;;;;54053:33;;54075:10;54053:7;:33::i;:::-;54045:71;;;;;-1:-1:-1;;;54045:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;54786:10:::1;:24:::0;;;54821:17:::1;:15;:17::i;7970:181::-:0;8028:7;8060:5;;;8084:6;;;;8076:46;;;;;-1:-1:-1;;;8076:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;605:106;693:10;605:106;:::o;36094:188::-;36168:12;;;;:6;:12;;;;;:33;;36193:7;36168:33;:24;:33;:::i;:::-;36164:111;;;36250:12;:10;:12::i;:::-;-1:-1:-1;;;;;36223:40:0;36241:7;-1:-1:-1;;;;;36223:40:0;36235:4;36223:40;;;;;;;;;;36094:188;;:::o;9324:471::-;9382:7;9627:6;9623:47;;-1:-1:-1;9657:1:0;9650:8;;9623:47;9694:5;;;9698:1;9694;:5;:1;9718:5;;;;;:10;9710:56;;;;-1:-1:-1;;;9710:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10271:132;10329:7;10356:39;10360:1;10363;10356:39;;;;;;;;;;;;;;;;;:3;:39::i;8434:136::-;8492:7;8519:43;8523:1;8526;8519:43;;;;;;;;;;;;;;;;;:3;:43::i;36290:192::-;36365:12;;;;:6;:12;;;;;:36;;36393:7;36365:36;:27;:36;:::i;:::-;36361:114;;;36450:12;:10;:12::i;:::-;-1:-1:-1;;;;;36423:40:0;36441:7;-1:-1:-1;;;;;36423:40:0;36435:4;36423:40;;;;;;;;;;36290:192;;:::o;61296:286::-;61388:8;;:33;;;-1:-1:-1;;;61388:33:0;;61415:4;61388:33;;;;;;61371:14;;-1:-1:-1;;;;;61388:8:0;;:18;;:33;;;;;;;;;;;;;;:8;:33;;;2:2:-1;;;;27:1;24;17:12;2:2;61388:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;61388:33:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;61388:33:0;;-1:-1:-1;61436:16:0;;;61432:143;;;61469:8;;:30;;;-1:-1:-1;;;61469:30:0;;-1:-1:-1;;;;;61469:30:0;;;;;;;;;;;;;;;:8;;;;;:17;;:30;;;;;;;;;;;;;;:8;;:30;;;2:2:-1;;;;27:1;24;17:12;2:2;61469:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;61469:30:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;61432:143:0;;-1:-1:-1;61432:143:0;;61532:8;;:31;;;-1:-1:-1;;;61532:31:0;;-1:-1:-1;;;;;61532:31:0;;;;;;;;;;;;;;;:8;;;;;:17;;:31;;;;;;;;;;;;;;:8;;:31;;;2:2:-1;;;;27:1;24;17:12;2:2;61532:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;61532:31:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;61432:143:0;61296:286;;;:::o;23706:177::-;23816:58;;;-1:-1:-1;;;;;23816:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;23816:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;23789:86:0;;23809:5;;23789:19;:86::i;23891:205::-;24019:68;;;-1:-1:-1;;;;;24019:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;24019:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;24042:27:0;179:29:-1;160:49;;23992:96:0;;24012:5;;23992:19;:96::i;:::-;23891:205;;;;:::o;21362:149::-;21436:7;21479:22;21483:3;21495:5;21479:3;:22::i;20657:158::-;20737:4;20761:46;20771:3;-1:-1:-1;;;;;20791:14:0;;20761:9;:46::i;20901:117::-;20964:7;20991:19;20999:3;20991:7;:19::i;24365:622::-;24735:10;;;24734:62;;-1:-1:-1;24751:39:0;;;;;;24775:4;24751:39;;;;-1:-1:-1;;;;;24751:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;2:2:-1;;;;27:1;24;17:12;2:2;24751:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24751:39:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;24751:39:0;:44;24734:62;24726:152;;;;-1:-1:-1;;;24726:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24916:62;;;-1:-1:-1;;;;;24916:62:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;24916:62:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;24939:22:0;179:29:-1;160:49;;24889:90:0;;24909:5;;24889:19;:90::i;20103:143::-;20173:4;20197:41;20202:3;-1:-1:-1;;;;;20222:14:0;;20197:4;:41::i;10899:278::-;10985:7;11020:12;11013:5;11005:28;;;;-1:-1:-1;;;11005:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;11005:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11044:9;11060:1;11056;:5;;;;;;;10899:278;-1:-1:-1;;;;;10899:278:0:o;8873:192::-;8959:7;8995:12;8987:6;;;;8979:29;;;;-1:-1:-1;;;8979:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;8979:29:0;-1:-1:-1;;;9031:5:0;;;8873:192::o;20422:149::-;20495:4;20519:44;20527:3;-1:-1:-1;;;;;20547:14:0;;20519:7;:44::i;26011:761::-;26435:23;26461:69;26489:4;26461:69;;;;;;;;;;;;;;;;;26469:5;-1:-1:-1;;;;;26461:27:0;;;:69;;;;;:::i;:::-;26545:17;;26435:95;;-1:-1:-1;26545:21:0;26541:224;;26687:10;26676:30;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;26676:30:0;26668:85;;;;-1:-1:-1;;;26668:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19645:204;19740:18;;19712:7;;19740:26;-1:-1:-1;19732:73:0;;;;-1:-1:-1;;;19732:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19823:3;:11;;19835:5;19823:18;;;;;;;;;;;;;;;;19816:25;;19645:204;;;;:::o;18977:129::-;19050:4;19074:19;;;:12;;;;;:19;;;;;;:24;;;18977:129::o;19192:109::-;19275:18;;19192:109::o;16757:414::-;16820:4;16842:21;16852:3;16857:5;16842:9;:21::i;:::-;16837:327;;-1:-1:-1;27:10;;39:1;23:18;;;45:23;;16880:11:0;:23;;;;;;;;;;;;;17063:18;;17041:19;;;:12;;;:19;;;;;;:40;;;;17096:11;;16837:327;-1:-1:-1;17147:5:0;17140:12;;17347:1544;17413:4;17552:19;;;:12;;;:19;;;;;;17588:15;;17584:1300;;18023:18;;-1:-1:-1;;17974:14:0;;;;18023:22;;;;17950:21;;18023:3;;:22;;18310;;;;;;;;;;;;;;18290:42;;18456:9;18427:3;:11;;18439:13;18427:26;;;;;;;;;;;;;;;;;;;:38;;;;18533:23;;;18575:1;18533:12;;;:23;;;;;;18559:17;;;18533:43;;18685:17;;18533:3;;18685:17;;;;;;;;;;;;;;;;;;;;;;18780:3;:12;;:19;18793:5;18780:19;;;;;;;;;;;18773:26;;;18823:4;18816:11;;;;;;;;17584:1300;18867:5;18860:12;;;;;4761:196;4864:12;4896:53;4919:6;4927:4;4933:1;4936:12;4896:22;:53::i;:::-;4889:60;4761:196;-1:-1:-1;;;;4761:196:0:o;6138:979::-;6268:12;6301:18;6312:6;6301:10;:18::i;:::-;6293:60;;;;;-1:-1:-1;;;6293:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6427:12;6441:23;6468:6;-1:-1:-1;;;;;6468:11:0;6488:8;6499:4;6468:36;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;6468:36:0;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;6426:78:0;;;;6519:7;6515:595;;;6550:10;-1:-1:-1;6543:17:0;;-1:-1:-1;6543:17:0;6515:595;6664:17;;:21;6660:439;;6927:10;6921:17;6988:15;6975:10;6971:2;6967:19;6960:44;6875:148;7063:20;;-1:-1:-1;;;7063:20:0;;;;;;;;;;;;;;;;;7070:12;;7063:20;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;1646:619:0;1706:4;2174:20;;2017:66;2214:23;;;;;;:42;;-1:-1:-1;;2241:15:0;;;2206:51;-1:-1:-1;;1646:619:0:o;51095:10490::-;;;;;;;;;;-1:-1:-1;;;;;51095:10490:0;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://419202a19107ae9d420ef7969bc8d72eeaed1074d3c7aec92afc124719341f98

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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