false
true
0

Contract Address Details

0x6Db12389B2365f13B8B7a0863905e4Afd5d5A125

Contract Name
LockupSacrifice
Creator
0xe9a2cc–e7b8f7 at 0x0bc4a8–49e82d
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
6,320 Transactions
Transfers
0 Transfers
Gas Used
0
Last Balance Update
25925876
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
LockupSacrifice




Optimization enabled
true
Compiler version
v0.6.11+commit.5ef660b1




Optimization runs
100
EVM Version
istanbul




Verified at
2023-12-07T21:59:24.838061Z

contracts/LOAN/LockupSacrifice.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

import "../Dependencies/SafeMath.sol";
import "../Interfaces/ILOANToken.sol";
import "../Dependencies/Ownable.sol";
import "../Dependencies/Pausable.sol";
import "../Interfaces/ICommunityPoints.sol";

/*
* The lockup contract architecture is a modified implemention of the forked LockupContract.
* 
* The token balance is locked for a specified duration and then releases after the date.
*/
contract LockupSacrifice is Ownable, Pausable {

    using SafeMath for uint;

    uint256 constant RELEASE_SLOTS = 25;
    string constant public NAME = "LockupSacrifice";

    ILOANToken public loanToken;
    ICommunityPoints public communityPoints;

    // --- Structs and Enums ---
    struct BeneficiaryData {
        bool[RELEASE_SLOTS] withdrawn;
    }

    mapping(address => BeneficiaryData) internal _beneficiaries;

    uint256[RELEASE_SLOTS] private releaseSlots;

    // --- Events ---
    event SacrificeEntitlementReleased(address _beneficiary, uint _LOANwithdrawal, uint index, uint timestamp);
    event SacrificeReleaseSlotsSetted(uint256[RELEASE_SLOTS] releaseSlots);

    function _getNextWithdrawAvailable(address _beneficiary) internal view returns (uint, uint) {

        (bool registered_, uint256 total_, uint256[RELEASE_SLOTS] memory entitlements_) = communityPoints.getEntitlements(_beneficiary);
        
        require(registered_, "INVALID_BENEFICIARY");
        require(total_ > 0, "INVALID_BENEFICIARY");

        for (uint i = 0; i < RELEASE_SLOTS && block.timestamp >= releaseSlots[i]; i++) {
            if (!_beneficiaries[_beneficiary].withdrawn[i] && entitlements_[i] > 0) {
                return (i+1, entitlements_[i]);
            }
        }        
        return (0,0);
    }

    function canWithdraw() external view returns (bool) {
        (uint index,) = _getNextWithdrawAvailable(msg.sender);
        return (index > 0);
    }

    function withdrawLOAN() external whenNotPaused {
        (uint i, uint entitlement_) = _getNextWithdrawAvailable(msg.sender);
        require(i > 0, "NO_WITHDRAW_AVAILABLE");

        if (loanToken.transfer(msg.sender, entitlement_)) {
            _beneficiaries[msg.sender].withdrawn[i-1] = true;
            emit SacrificeEntitlementReleased(msg.sender, entitlement_, i-1, block.timestamp);
        }
    }

    function setParams(address _loanTokenAddress, address _communityPoints, uint256[RELEASE_SLOTS] calldata _releaseSlots) onlyOwner whenPaused external {
        loanToken = ILOANToken(_loanTokenAddress);
        communityPoints = ICommunityPoints(_communityPoints);
        releaseSlots = _releaseSlots;
        emit SacrificeReleaseSlotsSetted(_releaseSlots);
        _unpause();
        _renounceOwnership();
    }

    function getLOANtokenEntitlements(address _beneficiary) external view returns (uint256[RELEASE_SLOTS] memory) {
        (,, uint256[RELEASE_SLOTS] memory entitlements_) = communityPoints.getEntitlements(_beneficiary);
        return entitlements_;
    }

    function getLOANtokenWithdrawnEntitlements(address _beneficiary) external view returns (bool[RELEASE_SLOTS] memory) {
        return _beneficiaries[_beneficiary].withdrawn;
    }

    function getWithdrawTimestamps() external view returns (uint256[RELEASE_SLOTS] memory) {
        return releaseSlots;
    }
}
// 2023 Liquid Loans
        

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

interface ICommunityPoints {
   function addBeneficiary(address _beneficiary, uint256 _total, uint256[25] calldata _entitlement) external;
   function getEntitlements(address _beneficiary) external view returns (bool, uint256, uint256[25] memory);
}
// 2023 Liquid Loans
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

import "../Dependencies/IERC20.sol";
import "../Dependencies/IERC2612.sol";

interface ILOANToken is IERC20, IERC2612 { 
   
    // --- Events ---
    
    event CommunityIssuanceAddressSet(address _communityIssuanceAddress);
    event LOANStakingAddressSet(address _loanStakingAddress);
    event LockupContractFactoryAddressSet(address _lockupContractFactoryAddress);

    // --- Functions ---
    
    function sendToLOANStaking(address _sender, uint256 _amount) external;

    function getDeploymentStartTime() external view returns (uint256);

    function getLpRewardsEntitlement() external view returns (uint256);
}
// 2022 Liquid Loans
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

/**
 * Based on OpenZeppelin's SafeMath:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
 *
 * @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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}
// 2022 Liquid Loans
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

/**
 * Based on OpenZeppelin's Pausable contract:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/Pausable.sol
 *
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    constructor() public {
        _paused = true;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(msg.sender);
    }
}
// 2022 Liquid Loans
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

/**
 * @dev Interface of the ERC2612 standard as defined in the EIP.
 *
 * Adds the {permit} method, which can be used to change one's
 * {IERC20-allowance} without having to send a transaction, by signing a
 * message. This allows users to spend tokens without having to hold Pulse.
 *
 * See https://eips.ethereum.org/EIPS/eip-2612.
 * 
 * Code adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2237/
 */
interface IERC2612 {
    /**
     * @dev Sets `amount` as the allowance of `spender` over `owner`'s tokens,
     * given `owner`'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(address owner, address spender, uint256 amount, 
                    uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
    
    /**
     * @dev Returns the current ERC2612 nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases `owner`'s nonce by one. This
     * prevents a signature from being used multiple times.
     *
     * `owner` can limit the time a Permit is valid for by setting `deadline` to 
     * a value in the near future. The deadline argument can be set to uint(-1) to 
     * create Permits that effectively never expire.
     */
    function nonces(address owner) external view returns (uint256);
    
    function version() external view returns (string memory);
    function permitTypeHash() external view returns (bytes32);
    function domainSeparator() external view returns (bytes32);
}
// 2022 Liquid Loans
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

/**
 * Based on OpenZeppelin's Ownable contract:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
 *
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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 {
    address private _owner;

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

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

    /**
     * @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(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     *
     * NOTE: This function is not safe, as it doesn’t check owner is calling it.
     * Make sure you check it before calling it.
     */
    function _renounceOwnership() internal {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }
}
// 2022 Liquid Loans
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

/**
 * Based on the OpenZeppelin IER20 interface:
 * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol
 *
 * @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);
    function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    
    /**
     * @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);
}
// 2022 Liquid Loans
          

Compiler Settings

{"remappings":[],"optimizer":{"runs":100,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"contracts/LOAN/LockupSacrifice.sol":"LockupSacrifice"}}
              

Contract ABI

[{"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":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SacrificeEntitlementReleased","inputs":[{"type":"address","name":"_beneficiary","internalType":"address","indexed":false},{"type":"uint256","name":"_LOANwithdrawal","internalType":"uint256","indexed":false},{"type":"uint256","name":"index","internalType":"uint256","indexed":false},{"type":"uint256","name":"timestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SacrificeReleaseSlotsSetted","inputs":[{"type":"uint256[25]","name":"releaseSlots","internalType":"uint256[25]","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"NAME","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"canWithdraw","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ICommunityPoints"}],"name":"communityPoints","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[25]","name":"","internalType":"uint256[25]"}],"name":"getLOANtokenEntitlements","inputs":[{"type":"address","name":"_beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool[25]","name":"","internalType":"bool[25]"}],"name":"getLOANtokenWithdrawnEntitlements","inputs":[{"type":"address","name":"_beneficiary","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[25]","name":"","internalType":"uint256[25]"}],"name":"getWithdrawTimestamps","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ILOANToken"}],"name":"loanToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setParams","inputs":[{"type":"address","name":"_loanTokenAddress","internalType":"address"},{"type":"address","name":"_communityPoints","internalType":"address"},{"type":"uint256[25]","name":"_releaseSlots","internalType":"uint256[25]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawLOAN","inputs":[]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b50600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36000805460ff60a01b1916600160a01b179055610a99806100726000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b1e9dabb11610071578063b1e9dabb146101e5578063b51459fe1461021d578063b831f2e514610225578063bcb9d2d31461024b578063c459711714610253578063fa305b841461025b576100b4565b806306d37817146100b957806334204178146100dd5780635c975abb1461013c5780638da5cb5b146101585780638f32d59b14610160578063a3f4df7e14610168575b600080fd5b6100c1610263565b604080516001600160a01b039092168252519081900360200190f35b610103600480360360208110156100f357600080fd5b50356001600160a01b0316610272565b604051808261032080838360005b83811015610129578181015183820152602001610111565b5050505090500191505060405180910390f35b610144610315565b604080519115158252519081900360200190f35b6100c1610326565b610144610335565b610170610346565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101aa578181015183820152602001610192565b50505050905090810190601f1680156101d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021b60048036036103608110156101fc57600080fd5b506001600160a01b038135811691602081013590911690604001610371565b005b610144610474565b6101036004803603602081101561023b57600080fd5b50356001600160a01b0316610489565b61021b6104fa565b6100c1610677565b610103610686565b6001546001600160a01b031681565b61027a6109ec565b6102826109ec565b60025460408051637ccdcbd360e11b81526001600160a01b0386811660048301529151919092169163f99b97a691602480830192610360929190829003018186803b1580156102d057600080fd5b505afa1580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061036081101561030a57600080fd5b506040019392505050565b600054600160a01b900460ff165b90565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6040518060400160405280600f81526020016e4c6f636b757053616372696669636560881b81525081565b610379610335565b6103ca576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103d26106c2565b600180546001600160a01b038086166001600160a01b031992831617909255600280549285169290911691909117905561040f6004826019610a0b565b507f91516d56b7a3adabdf412df8cd546d80a1607e06febf69fd1ca6b81ac58af66b816040518082601960200280828437600083820152604051601f909101601f1916909201829003935090915050a1610467610714565b61046f61075e565b505050565b600080610480336107a8565b50151591505090565b6104916109ec565b6001600160a01b03821660009081526003602052604080822081516103208101928390529290916019918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116104bf575094979650505050505050565b61050261099f565b60008061050e336107a8565b915091506000821161055f576040805162461bcd60e51b81526020600482015260156024820152744e4f5f57495448445241575f415641494c41424c4560581b604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506040513d60208110156105dd57600080fd5b5051156106735733600090815260036020526040902060019060001984016019811061060557fe5b60208082049092018054931515601f9092166101000a91820260ff909202199093161790915560408051338152918201839052600019840182820152426060830152517f5ac1006f73b58f762e0cb8b982924bf388c54147849aabdfebac0eb10de338fd9181900360800190a15b5050565b6002546001600160a01b031681565b61068e6109ec565b604080516103208101918290529060049060199082845b8154815260200190600101908083116106a5575050505050905090565b6106ca610315565b610712576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b565b61071c6106c2565b6000805460ff60a01b191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000806000806107b66109ec565b60025460408051637ccdcbd360e11b81526001600160a01b0389811660048301529151919092169163f99b97a691602480830192610360929190829003018186803b15801561080457600080fd5b505afa158015610818573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061036081101561083e57600080fd5b50805160208201519094509250604001905082610898576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f42454e454649434941525960681b604482015290519081900360640190fd5b600082116108e3576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f42454e454649434941525960681b604482015290519081900360640190fd5b60005b6019811080156109045750600481601981106108fe57fe5b01544210155b1561098e576001600160a01b0387166000908152600360205260409020816019811061092c57fe5b602081049091015460ff601f9092166101000a90041615801561095f5750600082826019811061095857fe5b6020020151115b15610986578060010182826019811061097457fe5b6020020151955095505050505061099a565b6001016108e6565b50600094508493505050505b915091565b6109a7610315565b15610712576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6040518061032001604052806019906020820280368337509192915050565b8260198101928215610a39579160200282015b82811115610a39578235825591602001919060010190610a1e565b50610a45929150610a49565b5090565b61032391905b80821115610a455760008155600101610a4f56fea26469706673582212201cbf9d24f5203166aa273b1e01269844a1b264eedc6e57dc6550799619dca7b864736f6c634300060b0033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b1e9dabb11610071578063b1e9dabb146101e5578063b51459fe1461021d578063b831f2e514610225578063bcb9d2d31461024b578063c459711714610253578063fa305b841461025b576100b4565b806306d37817146100b957806334204178146100dd5780635c975abb1461013c5780638da5cb5b146101585780638f32d59b14610160578063a3f4df7e14610168575b600080fd5b6100c1610263565b604080516001600160a01b039092168252519081900360200190f35b610103600480360360208110156100f357600080fd5b50356001600160a01b0316610272565b604051808261032080838360005b83811015610129578181015183820152602001610111565b5050505090500191505060405180910390f35b610144610315565b604080519115158252519081900360200190f35b6100c1610326565b610144610335565b610170610346565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101aa578181015183820152602001610192565b50505050905090810190601f1680156101d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021b60048036036103608110156101fc57600080fd5b506001600160a01b038135811691602081013590911690604001610371565b005b610144610474565b6101036004803603602081101561023b57600080fd5b50356001600160a01b0316610489565b61021b6104fa565b6100c1610677565b610103610686565b6001546001600160a01b031681565b61027a6109ec565b6102826109ec565b60025460408051637ccdcbd360e11b81526001600160a01b0386811660048301529151919092169163f99b97a691602480830192610360929190829003018186803b1580156102d057600080fd5b505afa1580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061036081101561030a57600080fd5b506040019392505050565b600054600160a01b900460ff165b90565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6040518060400160405280600f81526020016e4c6f636b757053616372696669636560881b81525081565b610379610335565b6103ca576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6103d26106c2565b600180546001600160a01b038086166001600160a01b031992831617909255600280549285169290911691909117905561040f6004826019610a0b565b507f91516d56b7a3adabdf412df8cd546d80a1607e06febf69fd1ca6b81ac58af66b816040518082601960200280828437600083820152604051601f909101601f1916909201829003935090915050a1610467610714565b61046f61075e565b505050565b600080610480336107a8565b50151591505090565b6104916109ec565b6001600160a01b03821660009081526003602052604080822081516103208101928390529290916019918390855b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116104bf575094979650505050505050565b61050261099f565b60008061050e336107a8565b915091506000821161055f576040805162461bcd60e51b81526020600482015260156024820152744e4f5f57495448445241575f415641494c41424c4560581b604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156105b357600080fd5b505af11580156105c7573d6000803e3d6000fd5b505050506040513d60208110156105dd57600080fd5b5051156106735733600090815260036020526040902060019060001984016019811061060557fe5b60208082049092018054931515601f9092166101000a91820260ff909202199093161790915560408051338152918201839052600019840182820152426060830152517f5ac1006f73b58f762e0cb8b982924bf388c54147849aabdfebac0eb10de338fd9181900360800190a15b5050565b6002546001600160a01b031681565b61068e6109ec565b604080516103208101918290529060049060199082845b8154815260200190600101908083116106a5575050505050905090565b6106ca610315565b610712576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b565b61071c6106c2565b6000805460ff60a01b191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000806000806107b66109ec565b60025460408051637ccdcbd360e11b81526001600160a01b0389811660048301529151919092169163f99b97a691602480830192610360929190829003018186803b15801561080457600080fd5b505afa158015610818573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061036081101561083e57600080fd5b50805160208201519094509250604001905082610898576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f42454e454649434941525960681b604482015290519081900360640190fd5b600082116108e3576040805162461bcd60e51b8152602060048201526013602482015272494e56414c49445f42454e454649434941525960681b604482015290519081900360640190fd5b60005b6019811080156109045750600481601981106108fe57fe5b01544210155b1561098e576001600160a01b0387166000908152600360205260409020816019811061092c57fe5b602081049091015460ff601f9092166101000a90041615801561095f5750600082826019811061095857fe5b6020020151115b15610986578060010182826019811061097457fe5b6020020151955095505050505061099a565b6001016108e6565b50600094508493505050505b915091565b6109a7610315565b15610712576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6040518061032001604052806019906020820280368337509192915050565b8260198101928215610a39579160200282015b82811115610a39578235825591602001919060010190610a1e565b50610a45929150610a49565b5090565b61032391905b80821115610a455760008155600101610a4f56fea26469706673582212201cbf9d24f5203166aa273b1e01269844a1b264eedc6e57dc6550799619dca7b864736f6c634300060b0033