false
false

Contract Address Details

0x9d1dbB49b2744A1555EDbF1708D64dC71B0CB052

Contract Name
NETTFarm
Creator
0x9c003f–bede97 at 0xc2a186–01fd31
Balance
0 METIS ( )
Tokens
Fetching tokens...
Transactions
81,364 Transactions
Transfers
330,129 Transfers
Gas Used
59,714,199,093
Last Balance Update
8764843
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
NETTFarm




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
9999
EVM Version
default




Verified at
2022-01-09T13:39:45.719875Z

Constructor Arguments

00000000000000000000000090fe084f877c65e1b577c7b2ea64b8d8dd1ab2780000000000000000000000004a642be622eba7c40efc06a8f8e1b3278b1fce4e0000000000000000000000000000000000000000000000000d11e0aaf2afb6ac0000000000000000000000000000000000000000000000000000000061daf870

Arg [0] (address) : 0x90fe084f877c65e1b577c7b2ea64b8d8dd1ab278
Arg [1] (address) : 0x4a642be622eba7c40efc06a8f8e1b3278b1fce4e
Arg [2] (uint256) : 941780821917808300
Arg [3] (uint256) : 1641740400

              

Contract source code

// SPDX-License-Identifier: MIT
// File: contracts/libs/EnumerableSet.sol



pragma solidity ^0.6.12;

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

// File: contracts/libs/Address.sol


pragma solidity ^0.6.12;

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

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

// File: contracts/libs/IERC20.sol


pragma solidity ^0.6.12;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */
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.
     *
     * > Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an `Approval` event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to `approve`. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
// File: contracts/libs/BoringERC20.sol


pragma solidity 0.6.12;


// solhint-disable avoid-low-level-calls

library BoringERC20 {
    bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol()
    bytes4 private constant SIG_NAME = 0x06fdde03; // name()
    bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals()
    bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
    bytes4 private constant SIG_TRANSFER_FROM = 0x23b872dd; // transferFrom(address,address,uint256)

    function returnDataToString(bytes memory data) internal pure returns (string memory) {
        if (data.length >= 64) {
            return abi.decode(data, (string));
        } else if (data.length == 32) {
            uint8 i = 0;
            while (i < 32 && data[i] != 0) {
                i++;
            }
            bytes memory bytesArray = new bytes(i);
            for (i = 0; i < 32 && data[i] != 0; i++) {
                bytesArray[i] = data[i];
            }
            return string(bytesArray);
        } else {
            return "???";
        }
    }

    /// @notice Provides a safe ERC20.symbol version which returns '???' as fallback string.
    /// @param token The address of the ERC-20 token contract.
    /// @return (string) Token symbol.
    function safeSymbol(IERC20 token) internal view returns (string memory) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_SYMBOL));
        return success ? returnDataToString(data) : "???";
    }

    /// @notice Provides a safe ERC20.name version which returns '???' as fallback string.
    /// @param token The address of the ERC-20 token contract.
    /// @return (string) Token name.
    function safeName(IERC20 token) internal view returns (string memory) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_NAME));
        return success ? returnDataToString(data) : "???";
    }

    /// @notice Provides a safe ERC20.decimals version which returns '18' as fallback value.
    /// @param token The address of the ERC-20 token contract.
    /// @return (uint8) Token decimals.
    function safeDecimals(IERC20 token) internal view returns (uint8) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_DECIMALS));
        return success && data.length == 32 ? abi.decode(data, (uint8)) : 18;
    }

    /// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations.
    /// Reverts on a failed transfer.
    /// @param token The address of the ERC-20 token.
    /// @param to Transfer tokens to.
    /// @param amount The token amount.
    function safeTransfer(
        IERC20 token,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER, to, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: Transfer failed");
    }

    /// @notice Provides a safe ERC20.transferFrom version for different ERC-20 implementations.
    /// Reverts on a failed transfer.
    /// @param token The address of the ERC-20 token.
    /// @param from Transfer tokens from.
    /// @param to Transfer tokens to.
    /// @param amount The token amount.
    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(
            abi.encodeWithSelector(SIG_TRANSFER_FROM, from, to, amount)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: TransferFrom failed");
    }
}
// File: contracts/libs/SafeMath.sol


pragma solidity ^0.6.12;

/**
 * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        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-solidity/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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}

// File: contracts/libs/SafeERC20.sol


pragma solidity ^0.6.12;




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

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/libs/Context.sol


pragma solidity ^0.6.12;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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


pragma solidity ^0.6.12;


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

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

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

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

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

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

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


pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;







interface NETT {
    function mint(address _to, uint256 _amount) external;
    function transfer(address recipient, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
}

interface IRewarder {
    using SafeERC20 for IERC20;

    function onNETTReward(address user, uint256 newLpAmount) external;

    function pendingTokens(address user) external view returns (uint256 pending);

    function rewardToken() external view returns (address);
}

// NETTFarm is the birth place of NETT. Farmers can harvest NETT farily from the farm.
// Based on https://github.com/traderjoe-xyz/joe-core/blob/main/contracts/MasterChefJoeV2.sol
contract NETTFarm is Ownable {
    using SafeMath for uint256;
    using BoringERC20 for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;

    // 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 NETTs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accNETTPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accNETTPerShare` (and `lastRewardTimestamp`) 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. NETTs to distribute per second.
        uint256 lastRewardTimestamp; // Last timestamp that NETTs distribution occurs.
        uint256 accNETTPerShare; // Accumulated NETTs per share, times 1e12. See below.
        uint256 lpSupply;
        IRewarder rewarder;
    }

    // The NETT token!
    NETT public nett;
    // Dev address
    address public devAddr;
    // Percentage of pool rewards that goto the devs. Divided by 100.
    uint256 public devPercent = 10;
    // NETT tokens created per second.
    uint256 public nettPerSec;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Set of all LP tokens that have been added as pools
    EnumerableSet.AddressSet private lpTokens;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint;
    // The timestamp when NETT mining starts.
    uint256 public startTimestamp;

    event Add(uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken, IRewarder indexed rewarder);
    event Set(uint256 indexed pid, uint256 allocPoint, IRewarder indexed rewarder, bool overwrite);
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event UpdatePool(uint256 indexed pid, uint256 lastRewardTimestamp, uint256 lpSupply, uint256 accNETTPerShare);
    event Harvest(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event SetDevAddress(address indexed oldAddress, address indexed newAddress);
    event UpdateEmissionRate(address indexed user, uint256 _nettPerSec);

    constructor(
        NETT _nett,
        address _devAddr,
        uint256 _nettPerSec,
        uint256 _startTimestamp
    ) public {
        nett = _nett;
        devAddr = _devAddr;
        nettPerSec = _nettPerSec;
        startTimestamp = _startTimestamp;
        totalAllocPoint = 0;
    }

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

    // 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,
        IERC20 _lpToken,
        IRewarder _rewarder
    ) public onlyOwner {
        require(Address.isContract(address(_lpToken)), "add: LP token must be a valid contract");
        require(
            Address.isContract(address(_rewarder)) || address(_rewarder) == address(0),
            "add: rewarder must be contract or zero"
        );
        require(!lpTokens.contains(address(_lpToken)), "add: LP already added");
        massUpdatePools();
        uint256 lastRewardTimestamp = block.timestamp > startTimestamp ? block.timestamp : startTimestamp;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(
            PoolInfo({
                lpToken: _lpToken,
                allocPoint: _allocPoint,
                lastRewardTimestamp: lastRewardTimestamp,
                accNETTPerShare: 0,
                rewarder: _rewarder,
                lpSupply: 0
            })
        );
        lpTokens.add(address(_lpToken));
        emit Add(poolInfo.length.sub(1), _allocPoint, _lpToken, _rewarder);
    }

    // Update the given pool's NETT allocation point. Can only be called by the owner.
    function set(
        uint256 _pid,
        uint256 _allocPoint,
        IRewarder _rewarder,
        bool overwrite
    ) public onlyOwner {
        require(
            Address.isContract(address(_rewarder)) || address(_rewarder) == address(0),
            "set: rewarder must be contract or zero"
        );
        massUpdatePools();
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        if (overwrite) {
            poolInfo[_pid].rewarder = _rewarder;
        }
        emit Set(_pid, _allocPoint, overwrite ? _rewarder : poolInfo[_pid].rewarder, overwrite);
    }

    // View function to see pending NETTs on frontend.
    function pendingTokens(uint256 _pid, address _user)
        external
        view
        returns (
            uint256 pendingNETT,
            address bonusTokenAddress,
            string memory bonusTokenSymbol,
            uint256 pendingBonusToken
        )
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accNETTPerShare = pool.accNETTPerShare;
        uint256 lpSupply = pool.lpSupply;
        if (block.timestamp > pool.lastRewardTimestamp && lpSupply != 0 && totalAllocPoint > 0) {
            uint256 multiplier = block.timestamp.sub(pool.lastRewardTimestamp);
            uint256 nettReward = multiplier.mul(nettPerSec).mul(pool.allocPoint).div(totalAllocPoint);
            accNETTPerShare = accNETTPerShare.add(nettReward.mul(1e12).div(lpSupply));
        }
        pendingNETT = user.amount.mul(accNETTPerShare).div(1e12).sub(user.rewardDebt);

        // If it's a 2xreward farm, we return info about the bonus token
        if (address(pool.rewarder) != address(0)) {
            (bonusTokenAddress, bonusTokenSymbol) = rewarderBonusTokenInfo(_pid);
            pendingBonusToken = pool.rewarder.pendingTokens(_user);
        }
    }

    // Get bonus token info from the rewarder contract for a given pool, if it is a 2xreward farm
    function rewarderBonusTokenInfo(uint256 _pid)
        public
        view
        returns (address bonusTokenAddress, string memory bonusTokenSymbol)
    {
        PoolInfo storage pool = poolInfo[_pid];
        if (address(pool.rewarder) != address(0)) {
            bonusTokenAddress = address(pool.rewarder.rewardToken());
            bonusTokenSymbol = IERC20(pool.rewarder.rewardToken()).safeSymbol();
        }
    }

    // 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.timestamp <= pool.lastRewardTimestamp) {
            return;
        }
        uint256 lpSupply = pool.lpSupply;
        if (lpSupply == 0) {
            pool.lastRewardTimestamp = block.timestamp;
            return;
        }
        uint256 multiplier = block.timestamp.sub(pool.lastRewardTimestamp);
        uint256 nettReward = totalAllocPoint > 0 ? multiplier.mul(nettPerSec).mul(pool.allocPoint).div(totalAllocPoint) : 0;
        nett.mint(address(this), nettReward);
        // Mint additional 10% of reward to dev address if it isn't zero address
        if (devAddr != address(0)) {
            nett.mint(devAddr, nettReward.mul(devPercent).div(100));
        }
        pool.accNETTPerShare = pool.accNETTPerShare.add(nettReward.mul(1e12).div(lpSupply));
        pool.lastRewardTimestamp = block.timestamp;
        emit UpdatePool(_pid, pool.lastRewardTimestamp, lpSupply, pool.accNETTPerShare);
    }

    // Deposit LP tokens to NETTFarm for NETT allocation
    function deposit(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            // Harvest NETT
            uint256 pending = user.amount.mul(pool.accNETTPerShare).div(1e12).sub(user.rewardDebt);
            safeNETTTransfer(msg.sender, pending);
            emit Harvest(msg.sender, _pid, pending);
        }
        user.amount = user.amount.add(_amount);
        user.rewardDebt = user.amount.mul(pool.accNETTPerShare).div(1e12);

        IRewarder rewarder = poolInfo[_pid].rewarder;
        if (address(rewarder) != address(0)) {
            rewarder.onNETTReward(msg.sender, user.amount);
        }
        
        pool.lpSupply = pool.lpSupply.add(_amount);
        pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from NETTFarm.
    function withdraw(uint256 _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);

        if (user.amount > 0) {
            // Harvest NETT
            uint256 pending = user.amount.mul(pool.accNETTPerShare).div(1e12).sub(user.rewardDebt);
            safeNETTTransfer(msg.sender, pending);
            emit Harvest(msg.sender, _pid, pending);
        }

        user.amount = user.amount.sub(_amount);
        user.rewardDebt = user.amount.mul(pool.accNETTPerShare).div(1e12);

        IRewarder rewarder = poolInfo[_pid].rewarder;
        if (address(rewarder) != address(0)) {
            rewarder.onNETTReward(msg.sender, user.amount);
        }

        pool.lpSupply = pool.lpSupply.sub(_amount);
        pool.lpToken.safeTransfer(msg.sender, _amount);
        emit Withdraw(msg.sender, _pid, _amount);
    }

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

    // Safe NETT transfer function, just in case if rounding error causes pool to not have enough NETTs.
    function safeNETTTransfer(address _to, uint256 _amount) internal {
        uint256 nettBal = nett.balanceOf(address(this));
        if (_amount > nettBal) {
            nett.transfer(_to, nettBal);
        } else {
            nett.transfer(_to, _amount);
        }
    }

    // Update dev address by the previous dev.
    function dev(address _devAddr) public {
        require(msg.sender == devAddr, "dev: wut?");
        devAddr = _devAddr;
        emit SetDevAddress(msg.sender, _devAddr);
    }

    function setDevPercent(uint256 _newDevPercent) public onlyOwner {
        require(0 <= _newDevPercent && _newDevPercent <= 100, "setDevPercent: invalid percent value");
        devPercent = _newDevPercent;
    }

    // Pancake has to add hidden dummy pools in order to alter the emission,
    // here we make it simple and transparent to all.
    function updateEmissionRate(uint256 _nettPerSec) public onlyOwner {
        massUpdatePools();
        nettPerSec = _nettPerSec;
        emit UpdateEmissionRate(msg.sender, _nettPerSec);
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_nett","internalType":"contract NETT"},{"type":"address","name":"_devAddr","internalType":"address"},{"type":"uint256","name":"_nettPerSec","internalType":"uint256"},{"type":"uint256","name":"_startTimestamp","internalType":"uint256"}]},{"type":"event","name":"Add","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"address","name":"lpToken","internalType":"contract IERC20","indexed":true},{"type":"address","name":"rewarder","internalType":"contract IRewarder","indexed":true}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EmergencyWithdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Harvest","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Set","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"allocPoint","internalType":"uint256","indexed":false},{"type":"address","name":"rewarder","internalType":"contract IRewarder","indexed":true},{"type":"bool","name":"overwrite","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"SetDevAddress","inputs":[{"type":"address","name":"oldAddress","internalType":"address","indexed":true},{"type":"address","name":"newAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateEmissionRate","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"_nettPerSec","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdatePool","inputs":[{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"lastRewardTimestamp","internalType":"uint256","indexed":false},{"type":"uint256","name":"lpSupply","internalType":"uint256","indexed":false},{"type":"uint256","name":"accNETTPerShare","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"pid","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"add","inputs":[{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_lpToken","internalType":"contract IERC20"},{"type":"address","name":"_rewarder","internalType":"contract IRewarder"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"dev","inputs":[{"type":"address","name":"_devAddr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"devAddr","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"devPercent","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"massUpdatePools","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract NETT"}],"name":"nett","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nettPerSec","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"pendingNETT","internalType":"uint256"},{"type":"address","name":"bonusTokenAddress","internalType":"address"},{"type":"string","name":"bonusTokenSymbol","internalType":"string"},{"type":"uint256","name":"pendingBonusToken","internalType":"uint256"}],"name":"pendingTokens","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"lpToken","internalType":"contract IERC20"},{"type":"uint256","name":"allocPoint","internalType":"uint256"},{"type":"uint256","name":"lastRewardTimestamp","internalType":"uint256"},{"type":"uint256","name":"accNETTPerShare","internalType":"uint256"},{"type":"uint256","name":"lpSupply","internalType":"uint256"},{"type":"address","name":"rewarder","internalType":"contract IRewarder"}],"name":"poolInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"poolLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"bonusTokenAddress","internalType":"address"},{"type":"string","name":"bonusTokenSymbol","internalType":"string"}],"name":"rewarderBonusTokenInfo","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_allocPoint","internalType":"uint256"},{"type":"address","name":"_rewarder","internalType":"contract IRewarder"},{"type":"bool","name":"overwrite","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDevPercent","inputs":[{"type":"uint256","name":"_newDevPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startTimestamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalAllocPoint","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateEmissionRate","inputs":[{"type":"uint256","name":"_nettPerSec","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePool","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
              

Contract Creation Code

0x6080604052600a6003553480156200001657600080fd5b50604051620027f4380380620027f48339810160408190526200003991620000d7565b600062000045620000d3565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039586166001600160a01b0319918216179091556002805494909516931692909217909255600491909155600a5560006009556200013c565b3390565b60008060008060808587031215620000ed578384fd5b8451620000fa8162000123565b60208601519094506200010d8162000123565b6040860151606090960151949790965092505050565b6001600160a01b03811681146200013957600080fd5b50565b6126a8806200014c6000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c806388bba42f116100e3578063da09c72c1161008c578063f2fde38b11610066578063f2fde38b1461031c578063fc3c28af1461032f578063ffcd42631461033757610198565b8063da09c72c146102f9578063e2bbb15814610301578063e6fd48bc1461031457610198565b806393f1a40b116100bd57806393f1a40b146102a4578063ab7de098146102c5578063bc70fdbc146102d857610198565b806388bba42f146102765780638d88a90e146102895780638da5cb5b1461029c57610198565b8063472ea10d11610145578063630b5ba11161011f578063630b5ba1146102535780636eaddad21461025b578063715018a61461026e57610198565b8063472ea10d1461021857806351eb05a61461022d5780635312ea8e1461024057610198565b806317caf6f11161017657806317caf6f1146101f55780633390bb69146101fd578063441a3e701461020557610198565b8063081e3eda1461019d5780630ba84cd2146101bb5780631526fe27146101d0575b600080fd5b6101a561035a565b6040516101b291906125ad565b60405180910390f35b6101ce6101c9366004611f79565b610360565b005b6101e36101de366004611f79565b6103e8565b6040516101b29695949392919061215c565b6101a5610438565b6101a561043e565b6101ce610213366004612019565b610444565b610220610688565b6040516101b291906120e9565b6101ce61023b366004611f79565b610697565b6101ce61024e366004611f79565b6108b8565b6101ce61096c565b6101ce610269366004611f79565b61098f565b6101ce6109ea565b6101ce61028436600461203a565b610a81565b6101ce610297366004611e6c565b610c24565b610220610cb2565b6102b76102b2366004611fa9565b610cc1565b6040516101b29291906125ff565b6101ce6102d3366004611fd8565b610ce5565b6102eb6102e6366004611f79565b610fa0565b6040516101b292919061213a565b610220611105565b6101ce61030f366004612019565b611114565b6101a561131d565b6101ce61032a366004611e6c565b611323565b6101a56113f1565b61034a610345366004611fa9565b6113f7565b6040516101b294939291906125b6565b60055490565b6103686115ca565b6000546001600160a01b0390811691161461039e5760405162461bcd60e51b815260040161039590612398565b60405180910390fd5b6103a661096c565b600481905560405133907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053906103dd9084906125ad565b60405180910390a250565b600581815481106103f557fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0394851696509294919390921686565b60095481565b60045481565b60006005838154811061045357fe5b60009182526020808320868452600882526040808520338652909252922080546006909202909201925083111561049c5760405162461bcd60e51b81526004016103959061242a565b6104a584610697565b8054156105365760006104e682600101546104e064e8d4a510006104da876003015487600001546115ce90919063ffffffff16565b90611611565b90611646565b90506104f2338261166e565b84336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249548360405161052c91906125ad565b60405180910390a3505b80546105429084611646565b808255600383015461055f9164e8d4a51000916104da91906115ce565b816001018190555060006005858154811061057657fe5b60009182526020909120600560069092020101546001600160a01b0316905080156106155781546040517f41197d4d0000000000000000000000000000000000000000000000000000000081526001600160a01b038316916341197d4d916105e29133916004016120fd565b600060405180830381600087803b1580156105fc57600080fd5b505af1158015610610573d6000803e3d6000fd5b505050505b60048301546106249085611646565b6004840155825461063f906001600160a01b03163386611859565b84336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5688660405161067991906125ad565b60405180910390a35050505050565b6001546001600160a01b031681565b6000600582815481106106a657fe5b90600052602060002090600602019050806002015442116106c757506108b5565b6004810154806106de5750426002909101556108b5565b60006106f783600201544261164690919063ffffffff16565b90506000806009541161070b576000610734565b6107346009546104da866001015461072e600454876115ce90919063ffffffff16565b906115ce565b6001546040517f40c10f190000000000000000000000000000000000000000000000000000000081529192506001600160a01b0316906340c10f199061078090309085906004016120fd565b600060405180830381600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b50506002546001600160a01b03161591506108449050576001546002546003546001600160a01b03928316926340c10f199216906107f4906064906104da9087906115ce565b6040518363ffffffff1660e01b81526004016108119291906120fd565b600060405180830381600087803b15801561082b57600080fd5b505af115801561083f573d6000803e3d6000fd5b505050505b61086561085a846104da8464e8d4a510006115ce565b60038601549061199a565b60038501819055426002860181905560405187927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926108a8929091889161260d565b60405180910390a2505050505b50565b6000600582815481106108c757fe5b6000918252602080832085845260088252604080852033808752935290932080546006909302909301805490945061090c926001600160a01b03919091169190611859565b8054600483015461091c91611646565b60048301558054604051849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059591610955916125ad565b60405180910390a360008082556001909101555050565b60055460005b8181101561098b5761098381610697565b600101610972565b5050565b6109976115ca565b6000546001600160a01b039081169116146109c45760405162461bcd60e51b815260040161039590612398565b60648111156109e55760405162461bcd60e51b815260040161039590612550565b600355565b6109f26115ca565b6000546001600160a01b03908116911614610a1f5760405162461bcd60e51b815260040161039590612398565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b610a896115ca565b6000546001600160a01b03908116911614610ab65760405162461bcd60e51b815260040161039590612398565b610abf826119bf565b80610ad157506001600160a01b038216155b610aed5760405162461bcd60e51b815260040161039590612461565b610af561096c565b610b3283610b2c60058781548110610b0957fe5b90600052602060002090600602016001015460095461164690919063ffffffff16565b9061199a565b6009819055508260058581548110610b4657fe5b9060005260206000209060060201600101819055508015610ba5578160058581548110610b6f57fe5b906000526020600020906006020160050160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80610bd95760058481548110610bb757fe5b60009182526020909120600560069092020101546001600160a01b0316610bdb565b815b6001600160a01b0316847fa54644aae5c48c5971516f334e4fe8ecbc7930e23f34877d4203c6551e67ffaa8584604051610c169291906125ef565b60405180910390a350505050565b6002546001600160a01b03163314610c4e5760405162461bcd60e51b8152600401610395906122cd565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03831690811790915560405133907f618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e790600090a350565b6000546001600160a01b031690565b60086020908152600092835260408084209091529082529020805460019091015482565b610ced6115ca565b6000546001600160a01b03908116911614610d1a5760405162461bcd60e51b815260040161039590612398565b610d23826119bf565b610d3f5760405162461bcd60e51b8152600401610395906123cd565b610d48816119bf565b80610d5a57506001600160a01b038116155b610d765760405162461bcd60e51b8152600401610395906124be565b610d816006836119c9565b15610d9e5760405162461bcd60e51b815260040161039590612361565b610da661096c565b6000600a544211610db957600a54610dbb565b425b600954909150610dcb908561199a565b6009556040805160c0810182526001600160a01b038086168252602082018781529282018481526000606084018181526080850182815288851660a08701908152600580546001810182559452955160069384027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180549288167fffffffffffffffffffffffff000000000000000000000000000000000000000093841617905597517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db189015593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db288015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3870155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db486015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db5909401805494909216931692909217909155610f4490846119de565b506005546001600160a01b038084169190851690610f63906001611646565b7f4b16bd2431ad24dc020ab0e1de7fcb6563dead6a24fb10089d6c23e97a70381f87604051610f9291906125ad565b60405180910390a450505050565b60006060600060058481548110610fb357fe5b6000918252602090912060069091020160058101549091506001600160a01b0316156110ff578060050160009054906101000a90046001600160a01b03166001600160a01b031663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b15801561102957600080fd5b505afa15801561103d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110619190611e88565b92506110fc8160050160009054906101000a90046001600160a01b03166001600160a01b031663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b657600080fd5b505afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190611e88565b6001600160a01b03166119f3565b91505b50915091565b6002546001600160a01b031681565b60006005838154811061112357fe5b6000918252602080832086845260088252604080852033865290925292206006909102909101915061115484610697565b8054156111d957600061118982600101546104e064e8d4a510006104da876003015487600001546115ce90919063ffffffff16565b9050611195338261166e565b84336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954836040516111cf91906125ad565b60405180910390a3505b80546111e5908461199a565b80825560038301546112029164e8d4a51000916104da91906115ce565b816001018190555060006005858154811061121957fe5b60009182526020909120600560069092020101546001600160a01b0316905080156112b85781546040517f41197d4d0000000000000000000000000000000000000000000000000000000081526001600160a01b038316916341197d4d916112859133916004016120fd565b600060405180830381600087803b15801561129f57600080fd5b505af11580156112b3573d6000803e3d6000fd5b505050505b60048301546112c7908561199a565b600484015582546112e3906001600160a01b0316333087611afe565b84336001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a158660405161067991906125ad565b600a5481565b61132b6115ca565b6000546001600160a01b039081169116146113585760405162461bcd60e51b815260040161039590612398565b6001600160a01b03811661137e5760405162461bcd60e51b8152600401610395906121cb565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60035481565b60008060606000806005878154811061140c57fe5b600091825260208083208a84526008825260408085206001600160a01b038c168652909252922060036006909202909201908101546004820154600283015492945090914211801561145d57508015155b801561146b57506000600954115b156114d457600061148985600201544261164690919063ffffffff16565b905060006114b06009546104da886001015461072e600454876115ce90919063ffffffff16565b90506114cf6114c8846104da8464e8d4a510006115ce565b859061199a565b935050505b6114fc83600101546104e064e8d4a510006104da8688600001546115ce90919063ffffffff16565b60058501549098506001600160a01b0316156115bd5761151b8a610fa0565b60058601546040517fc031a66f0000000000000000000000000000000000000000000000000000000081529299509097506001600160a01b03169063c031a66f9061156a908c906004016120e9565b60206040518083038186803b15801561158257600080fd5b505afa158015611596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ba9190611f91565b94505b5050505092959194509250565b3390565b6000826115dd5750600061160b565b828202828482816115ea57fe5b04146116085760405162461bcd60e51b815260040161039590612304565b90505b92915050565b60008082116116325760405162461bcd60e51b815260040161039590612296565b600082848161163d57fe5b04949350505050565b6000828211156116685760405162461bcd60e51b81526004016103959061225f565b50900390565b6001546040517f70a082310000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906370a08231906116b89030906004016120e9565b60206040518083038186803b1580156116d057600080fd5b505afa1580156116e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117089190611f91565b9050808211156117b5576001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063a9059cbb9061175d90869085906004016120fd565b602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117af9190611ea4565b50611854565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063a9059cbb9061180090869086906004016120fd565b602060405180830381600087803b15801561181a57600080fd5b505af115801561182e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118529190611ea4565b505b505050565b60006060846001600160a01b031663a9059cbb60e01b85856040516024016118829291906120fd565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161190b91906120cd565b6000604051808303816000865af19150503d8060008114611948576040519150601f19603f3d011682016040523d82523d6000602084013e61194d565b606091505b50915091508180156119775750805115806119775750808060200190518101906119779190611ea4565b6119935760405162461bcd60e51b815260040161039590612194565b5050505050565b6000828201838110156116085760405162461bcd60e51b815260040161039590612228565b803b15155b919050565b6000611608836001600160a01b038416611c42565b6000611608836001600160a01b038416611c5a565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009183916001600160a01b03861691611a6891906120cd565b600060405180830381855afa9150503d8060008114611aa3576040519150601f19603f3d011682016040523d82523d6000602084013e611aa8565b606091505b509150915081611aed576040518060400160405280600381526020017f3f3f3f0000000000000000000000000000000000000000000000000000000000815250611af6565b611af681611ca4565b949350505050565b60006060856001600160a01b03166323b872dd60e01b868686604051602401611b2993929190612116565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051611bb291906120cd565b6000604051808303816000865af19150503d8060008114611bef576040519150601f19603f3d011682016040523d82523d6000602084013e611bf4565b606091505b5091509150818015611c1e575080511580611c1e575080806020019051810190611c1e9190611ea4565b611c3a5760405162461bcd60e51b81526004016103959061251b565b505050505050565b60009081526001919091016020526040902054151590565b6000611c668383611c42565b611c9c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561160b565b50600061160b565b60606040825110611cca5781806020019051810190611cc39190611ec0565b90506119c4565b815160201415611e325760005b60208160ff16108015611d1e5750828160ff1681518110611cf457fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15611d2b57600101611cd7565b60608160ff1667ffffffffffffffff81118015611d4757600080fd5b506040519080825280601f01601f191660200182016040528015611d72576020820181803683370190505b509050600091505b60208260ff16108015611dc15750838260ff1681518110611d9757fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15611e2957838260ff1681518110611dd557fe5b602001015160f81c60f81b818360ff1681518110611def57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190910190611d7a565b91506119c49050565b5060408051808201909152600381527f3f3f3f000000000000000000000000000000000000000000000000000000000060208201526119c4565b600060208284031215611e7d578081fd5b81356116088161264f565b600060208284031215611e99578081fd5b81516116088161264f565b600060208284031215611eb5578081fd5b815161160881612664565b600060208284031215611ed1578081fd5b815167ffffffffffffffff80821115611ee8578283fd5b818401915084601f830112611efb578283fd5b815181811115611f09578384fd5b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715611f47578586fd5b604052818152838201602001871015611f5e578485fd5b611f6f826020830160208701612623565b9695505050505050565b600060208284031215611f8a578081fd5b5035919050565b600060208284031215611fa2578081fd5b5051919050565b60008060408385031215611fbb578081fd5b823591506020830135611fcd8161264f565b809150509250929050565b600080600060608486031215611fec578081fd5b833592506020840135611ffe8161264f565b9150604084013561200e8161264f565b809150509250925092565b6000806040838503121561202b578182fd5b50508035926020909101359150565b6000806000806080858703121561204f578081fd5b843593506020850135925060408501356120688161264f565b9150606085013561207881612664565b939692955090935050565b6000815180845261209b816020860160208601612623565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516120df818460208701612623565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b038416825260406020830152611af66040830184612083565b6001600160a01b039687168152602081019590955260408501939093526060840191909152608083015290911660a082015260c00190565b6020808252601c908201527f426f72696e6745524332303a205472616e73666572206661696c656400000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526009908201527f6465763a207775743f0000000000000000000000000000000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f6164643a204c5020616c72656164792061646465640000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526026908201527f6164643a204c5020746f6b656e206d75737420626520612076616c696420636f60408201527f6e74726163740000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604082015260600190565b60208082526026908201527f7365743a207265776172646572206d75737420626520636f6e7472616374206f60408201527f72207a65726f0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6164643a207265776172646572206d75737420626520636f6e7472616374206f60408201527f72207a65726f0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f426f72696e6745524332303a205472616e7366657246726f6d206661696c6564604082015260600190565b60208082526024908201527f73657444657650657263656e743a20696e76616c69642070657263656e74207660408201527f616c756500000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60008582526001600160a01b0385166020830152608060408301526125de6080830185612083565b905082606083015295945050505050565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60005b8381101561263e578181015183820152602001612626565b838111156118525750506000910152565b6001600160a01b03811681146108b557600080fd5b80151581146108b557600080fdfea264697066735822122026a8084090b0f55e84cab482266d197bebc8212dd86b8b6a50e129c3f52443ee64736f6c634300060c003300000000000000000000000090fe084f877c65e1b577c7b2ea64b8d8dd1ab2780000000000000000000000004a642be622eba7c40efc06a8f8e1b3278b1fce4e0000000000000000000000000000000000000000000000000d11e0aaf2afb6ac0000000000000000000000000000000000000000000000000000000061daf870

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101985760003560e01c806388bba42f116100e3578063da09c72c1161008c578063f2fde38b11610066578063f2fde38b1461031c578063fc3c28af1461032f578063ffcd42631461033757610198565b8063da09c72c146102f9578063e2bbb15814610301578063e6fd48bc1461031457610198565b806393f1a40b116100bd57806393f1a40b146102a4578063ab7de098146102c5578063bc70fdbc146102d857610198565b806388bba42f146102765780638d88a90e146102895780638da5cb5b1461029c57610198565b8063472ea10d11610145578063630b5ba11161011f578063630b5ba1146102535780636eaddad21461025b578063715018a61461026e57610198565b8063472ea10d1461021857806351eb05a61461022d5780635312ea8e1461024057610198565b806317caf6f11161017657806317caf6f1146101f55780633390bb69146101fd578063441a3e701461020557610198565b8063081e3eda1461019d5780630ba84cd2146101bb5780631526fe27146101d0575b600080fd5b6101a561035a565b6040516101b291906125ad565b60405180910390f35b6101ce6101c9366004611f79565b610360565b005b6101e36101de366004611f79565b6103e8565b6040516101b29695949392919061215c565b6101a5610438565b6101a561043e565b6101ce610213366004612019565b610444565b610220610688565b6040516101b291906120e9565b6101ce61023b366004611f79565b610697565b6101ce61024e366004611f79565b6108b8565b6101ce61096c565b6101ce610269366004611f79565b61098f565b6101ce6109ea565b6101ce61028436600461203a565b610a81565b6101ce610297366004611e6c565b610c24565b610220610cb2565b6102b76102b2366004611fa9565b610cc1565b6040516101b29291906125ff565b6101ce6102d3366004611fd8565b610ce5565b6102eb6102e6366004611f79565b610fa0565b6040516101b292919061213a565b610220611105565b6101ce61030f366004612019565b611114565b6101a561131d565b6101ce61032a366004611e6c565b611323565b6101a56113f1565b61034a610345366004611fa9565b6113f7565b6040516101b294939291906125b6565b60055490565b6103686115ca565b6000546001600160a01b0390811691161461039e5760405162461bcd60e51b815260040161039590612398565b60405180910390fd5b6103a661096c565b600481905560405133907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c4053906103dd9084906125ad565b60405180910390a250565b600581815481106103f557fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160a01b0394851696509294919390921686565b60095481565b60045481565b60006005838154811061045357fe5b60009182526020808320868452600882526040808520338652909252922080546006909202909201925083111561049c5760405162461bcd60e51b81526004016103959061242a565b6104a584610697565b8054156105365760006104e682600101546104e064e8d4a510006104da876003015487600001546115ce90919063ffffffff16565b90611611565b90611646565b90506104f2338261166e565b84336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249548360405161052c91906125ad565b60405180910390a3505b80546105429084611646565b808255600383015461055f9164e8d4a51000916104da91906115ce565b816001018190555060006005858154811061057657fe5b60009182526020909120600560069092020101546001600160a01b0316905080156106155781546040517f41197d4d0000000000000000000000000000000000000000000000000000000081526001600160a01b038316916341197d4d916105e29133916004016120fd565b600060405180830381600087803b1580156105fc57600080fd5b505af1158015610610573d6000803e3d6000fd5b505050505b60048301546106249085611646565b6004840155825461063f906001600160a01b03163386611859565b84336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5688660405161067991906125ad565b60405180910390a35050505050565b6001546001600160a01b031681565b6000600582815481106106a657fe5b90600052602060002090600602019050806002015442116106c757506108b5565b6004810154806106de5750426002909101556108b5565b60006106f783600201544261164690919063ffffffff16565b90506000806009541161070b576000610734565b6107346009546104da866001015461072e600454876115ce90919063ffffffff16565b906115ce565b6001546040517f40c10f190000000000000000000000000000000000000000000000000000000081529192506001600160a01b0316906340c10f199061078090309085906004016120fd565b600060405180830381600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b50506002546001600160a01b03161591506108449050576001546002546003546001600160a01b03928316926340c10f199216906107f4906064906104da9087906115ce565b6040518363ffffffff1660e01b81526004016108119291906120fd565b600060405180830381600087803b15801561082b57600080fd5b505af115801561083f573d6000803e3d6000fd5b505050505b61086561085a846104da8464e8d4a510006115ce565b60038601549061199a565b60038501819055426002860181905560405187927f3be3541fc42237d611b30329040bfa4569541d156560acdbbae57640d20b8f46926108a8929091889161260d565b60405180910390a2505050505b50565b6000600582815481106108c757fe5b6000918252602080832085845260088252604080852033808752935290932080546006909302909301805490945061090c926001600160a01b03919091169190611859565b8054600483015461091c91611646565b60048301558054604051849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059591610955916125ad565b60405180910390a360008082556001909101555050565b60055460005b8181101561098b5761098381610697565b600101610972565b5050565b6109976115ca565b6000546001600160a01b039081169116146109c45760405162461bcd60e51b815260040161039590612398565b60648111156109e55760405162461bcd60e51b815260040161039590612550565b600355565b6109f26115ca565b6000546001600160a01b03908116911614610a1f5760405162461bcd60e51b815260040161039590612398565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b610a896115ca565b6000546001600160a01b03908116911614610ab65760405162461bcd60e51b815260040161039590612398565b610abf826119bf565b80610ad157506001600160a01b038216155b610aed5760405162461bcd60e51b815260040161039590612461565b610af561096c565b610b3283610b2c60058781548110610b0957fe5b90600052602060002090600602016001015460095461164690919063ffffffff16565b9061199a565b6009819055508260058581548110610b4657fe5b9060005260206000209060060201600101819055508015610ba5578160058581548110610b6f57fe5b906000526020600020906006020160050160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b80610bd95760058481548110610bb757fe5b60009182526020909120600560069092020101546001600160a01b0316610bdb565b815b6001600160a01b0316847fa54644aae5c48c5971516f334e4fe8ecbc7930e23f34877d4203c6551e67ffaa8584604051610c169291906125ef565b60405180910390a350505050565b6002546001600160a01b03163314610c4e5760405162461bcd60e51b8152600401610395906122cd565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03831690811790915560405133907f618c54559e94f1499a808aad71ee8729f8e74e8c48e979616328ce493a1a52e790600090a350565b6000546001600160a01b031690565b60086020908152600092835260408084209091529082529020805460019091015482565b610ced6115ca565b6000546001600160a01b03908116911614610d1a5760405162461bcd60e51b815260040161039590612398565b610d23826119bf565b610d3f5760405162461bcd60e51b8152600401610395906123cd565b610d48816119bf565b80610d5a57506001600160a01b038116155b610d765760405162461bcd60e51b8152600401610395906124be565b610d816006836119c9565b15610d9e5760405162461bcd60e51b815260040161039590612361565b610da661096c565b6000600a544211610db957600a54610dbb565b425b600954909150610dcb908561199a565b6009556040805160c0810182526001600160a01b038086168252602082018781529282018481526000606084018181526080850182815288851660a08701908152600580546001810182559452955160069384027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0810180549288167fffffffffffffffffffffffff000000000000000000000000000000000000000093841617905597517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db189015593517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db288015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3870155517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db486015592517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db5909401805494909216931692909217909155610f4490846119de565b506005546001600160a01b038084169190851690610f63906001611646565b7f4b16bd2431ad24dc020ab0e1de7fcb6563dead6a24fb10089d6c23e97a70381f87604051610f9291906125ad565b60405180910390a450505050565b60006060600060058481548110610fb357fe5b6000918252602090912060069091020160058101549091506001600160a01b0316156110ff578060050160009054906101000a90046001600160a01b03166001600160a01b031663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b15801561102957600080fd5b505afa15801561103d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110619190611e88565b92506110fc8160050160009054906101000a90046001600160a01b03166001600160a01b031663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b1580156110b657600080fd5b505afa1580156110ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ee9190611e88565b6001600160a01b03166119f3565b91505b50915091565b6002546001600160a01b031681565b60006005838154811061112357fe5b6000918252602080832086845260088252604080852033865290925292206006909102909101915061115484610697565b8054156111d957600061118982600101546104e064e8d4a510006104da876003015487600001546115ce90919063ffffffff16565b9050611195338261166e565b84336001600160a01b03167f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954836040516111cf91906125ad565b60405180910390a3505b80546111e5908461199a565b80825560038301546112029164e8d4a51000916104da91906115ce565b816001018190555060006005858154811061121957fe5b60009182526020909120600560069092020101546001600160a01b0316905080156112b85781546040517f41197d4d0000000000000000000000000000000000000000000000000000000081526001600160a01b038316916341197d4d916112859133916004016120fd565b600060405180830381600087803b15801561129f57600080fd5b505af11580156112b3573d6000803e3d6000fd5b505050505b60048301546112c7908561199a565b600484015582546112e3906001600160a01b0316333087611afe565b84336001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a158660405161067991906125ad565b600a5481565b61132b6115ca565b6000546001600160a01b039081169116146113585760405162461bcd60e51b815260040161039590612398565b6001600160a01b03811661137e5760405162461bcd60e51b8152600401610395906121cb565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60035481565b60008060606000806005878154811061140c57fe5b600091825260208083208a84526008825260408085206001600160a01b038c168652909252922060036006909202909201908101546004820154600283015492945090914211801561145d57508015155b801561146b57506000600954115b156114d457600061148985600201544261164690919063ffffffff16565b905060006114b06009546104da886001015461072e600454876115ce90919063ffffffff16565b90506114cf6114c8846104da8464e8d4a510006115ce565b859061199a565b935050505b6114fc83600101546104e064e8d4a510006104da8688600001546115ce90919063ffffffff16565b60058501549098506001600160a01b0316156115bd5761151b8a610fa0565b60058601546040517fc031a66f0000000000000000000000000000000000000000000000000000000081529299509097506001600160a01b03169063c031a66f9061156a908c906004016120e9565b60206040518083038186803b15801561158257600080fd5b505afa158015611596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ba9190611f91565b94505b5050505092959194509250565b3390565b6000826115dd5750600061160b565b828202828482816115ea57fe5b04146116085760405162461bcd60e51b815260040161039590612304565b90505b92915050565b60008082116116325760405162461bcd60e51b815260040161039590612296565b600082848161163d57fe5b04949350505050565b6000828211156116685760405162461bcd60e51b81526004016103959061225f565b50900390565b6001546040517f70a082310000000000000000000000000000000000000000000000000000000081526000916001600160a01b0316906370a08231906116b89030906004016120e9565b60206040518083038186803b1580156116d057600080fd5b505afa1580156116e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117089190611f91565b9050808211156117b5576001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063a9059cbb9061175d90869085906004016120fd565b602060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117af9190611ea4565b50611854565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063a9059cbb9061180090869086906004016120fd565b602060405180830381600087803b15801561181a57600080fd5b505af115801561182e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118529190611ea4565b505b505050565b60006060846001600160a01b031663a9059cbb60e01b85856040516024016118829291906120fd565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161190b91906120cd565b6000604051808303816000865af19150503d8060008114611948576040519150601f19603f3d011682016040523d82523d6000602084013e61194d565b606091505b50915091508180156119775750805115806119775750808060200190518101906119779190611ea4565b6119935760405162461bcd60e51b815260040161039590612194565b5050505050565b6000828201838110156116085760405162461bcd60e51b815260040161039590612228565b803b15155b919050565b6000611608836001600160a01b038416611c42565b6000611608836001600160a01b038416611c5a565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009183916001600160a01b03861691611a6891906120cd565b600060405180830381855afa9150503d8060008114611aa3576040519150601f19603f3d011682016040523d82523d6000602084013e611aa8565b606091505b509150915081611aed576040518060400160405280600381526020017f3f3f3f0000000000000000000000000000000000000000000000000000000000815250611af6565b611af681611ca4565b949350505050565b60006060856001600160a01b03166323b872dd60e01b868686604051602401611b2993929190612116565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051611bb291906120cd565b6000604051808303816000865af19150503d8060008114611bef576040519150601f19603f3d011682016040523d82523d6000602084013e611bf4565b606091505b5091509150818015611c1e575080511580611c1e575080806020019051810190611c1e9190611ea4565b611c3a5760405162461bcd60e51b81526004016103959061251b565b505050505050565b60009081526001919091016020526040902054151590565b6000611c668383611c42565b611c9c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561160b565b50600061160b565b60606040825110611cca5781806020019051810190611cc39190611ec0565b90506119c4565b815160201415611e325760005b60208160ff16108015611d1e5750828160ff1681518110611cf457fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15611d2b57600101611cd7565b60608160ff1667ffffffffffffffff81118015611d4757600080fd5b506040519080825280601f01601f191660200182016040528015611d72576020820181803683370190505b509050600091505b60208260ff16108015611dc15750838260ff1681518110611d9757fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15611e2957838260ff1681518110611dd557fe5b602001015160f81c60f81b818360ff1681518110611def57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190910190611d7a565b91506119c49050565b5060408051808201909152600381527f3f3f3f000000000000000000000000000000000000000000000000000000000060208201526119c4565b600060208284031215611e7d578081fd5b81356116088161264f565b600060208284031215611e99578081fd5b81516116088161264f565b600060208284031215611eb5578081fd5b815161160881612664565b600060208284031215611ed1578081fd5b815167ffffffffffffffff80821115611ee8578283fd5b818401915084601f830112611efb578283fd5b815181811115611f09578384fd5b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715611f47578586fd5b604052818152838201602001871015611f5e578485fd5b611f6f826020830160208701612623565b9695505050505050565b600060208284031215611f8a578081fd5b5035919050565b600060208284031215611fa2578081fd5b5051919050565b60008060408385031215611fbb578081fd5b823591506020830135611fcd8161264f565b809150509250929050565b600080600060608486031215611fec578081fd5b833592506020840135611ffe8161264f565b9150604084013561200e8161264f565b809150509250925092565b6000806040838503121561202b578182fd5b50508035926020909101359150565b6000806000806080858703121561204f578081fd5b843593506020850135925060408501356120688161264f565b9150606085013561207881612664565b939692955090935050565b6000815180845261209b816020860160208601612623565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082516120df818460208701612623565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b038416825260406020830152611af66040830184612083565b6001600160a01b039687168152602081019590955260408501939093526060840191909152608083015290911660a082015260c00190565b6020808252601c908201527f426f72696e6745524332303a205472616e73666572206661696c656400000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526009908201527f6465763a207775743f0000000000000000000000000000000000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f6164643a204c5020616c72656164792061646465640000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526026908201527f6164643a204c5020746f6b656e206d75737420626520612076616c696420636f60408201527f6e74726163740000000000000000000000000000000000000000000000000000606082015260800190565b60208082526012908201527f77697468647261773a206e6f7420676f6f640000000000000000000000000000604082015260600190565b60208082526026908201527f7365743a207265776172646572206d75737420626520636f6e7472616374206f60408201527f72207a65726f0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f6164643a207265776172646572206d75737420626520636f6e7472616374206f60408201527f72207a65726f0000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f426f72696e6745524332303a205472616e7366657246726f6d206661696c6564604082015260600190565b60208082526024908201527f73657444657650657263656e743a20696e76616c69642070657263656e74207660408201527f616c756500000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b60008582526001600160a01b0385166020830152608060408301526125de6080830185612083565b905082606083015295945050505050565b9182521515602082015260400190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60005b8381101561263e578181015183820152602001612626565b838111156118525750506000910152565b6001600160a01b03811681146108b557600080fd5b80151581146108b557600080fdfea264697066735822122026a8084090b0f55e84cab482266d197bebc8212dd86b8b6a50e129c3f52443ee64736f6c634300060c0033