false
true
0

Contract Address Details

0x61E7B219DA665e3fe21338aB95b0b1ceAaCb9b82

Contract Name
LockupContractCreator
Creator
0xe9a2cc–e7b8f7 at 0x9ce928–0e0fa3
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
4 Transfers
Gas Used
1,128,889
Last Balance Update
25915823
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:
LockupContractCreator




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




Optimization runs
100
EVM Version
istanbul




Verified at
2023-12-07T22:00:42.964186Z

contracts/LOAN/LockupContractCreator.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;

import "../Dependencies/CheckContract.sol";
import "../Dependencies/Ownable.sol";
import "../Interfaces/ILockupContractFactory.sol";
import "./LockupContract.sol";
import "../Dependencies/SafeMath.sol";

contract LockupContractCreator is Ownable, CheckContract {
    using SafeMath for uint256;

    string constant public NAME = "LockupContractCreator";

    // NOTE: change to (1 hours) to test. TODO: always revert back to 365 days;
    uint constant internal UNLOCK_TIME_START = 365 days;

    ILOANToken internal loanToken;
    ILockupContractFactory internal lockupContractFactory;

    uint internal _1_MILLION = 1e24;    // 1e6 * 1e18 = 1e24
    uint internal _1_BILLION = 1e27;    // 1e9 * 1e18 = 1e27

    uint256 internal entitlementA = _1_BILLION.mul(948).add(_1_MILLION.mul(750)); // Team A Lockup contract allocation 948,750,000,000
    uint256 internal entitlementB = _1_BILLION.mul(13).add(_1_MILLION.mul(750));  // Team B Lockup contract allocation 13,750,000,000

    address internal teamLockA;
    address internal teamLockB;

    uint256 internal startTime;
    
    // --- Events ---
    event LockupContractCreatorParamsSet(address _teamLockA, address _teamLockB);

    function setParamsAndDeployLockupContract(
        address _loanTokenAddress,
        address _lockupFactoryAddress,
        address _beneficiaryA,
        address _beneficiaryB) external onlyOwner {

        checkContract(_loanTokenAddress);
        checkContract(_lockupFactoryAddress);

        loanToken = ILOANToken(_loanTokenAddress);
        lockupContractFactory = ILockupContractFactory(_lockupFactoryAddress);

        startTime = block.timestamp.add(UNLOCK_TIME_START);

        teamLockA = lockupContractFactory.deployLockupContract(_beneficiaryA, startTime, LockupContract.LockupClass.A);
        teamLockB = lockupContractFactory.deployLockupContract(_beneficiaryB, startTime, LockupContract.LockupClass.B);

        loanToken.transfer(teamLockA, entitlementA);
        loanToken.transfer(teamLockB, entitlementB);

        emit LockupContractCreatorParamsSet(teamLockA, teamLockB);

        _renounceOwnership();
    }

    function getContracts() public view returns (address,address) {
        return (teamLockA, teamLockB);
    }
}
// 2023 Liquid Loans
        

/

// SPDX-License-Identifier: MIT

pragma solidity 0.6.11;


contract CheckContract {
    /**
     * Check that the account is an already deployed non-destroyed contract.
     * See: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol#L12
     */
    function checkContract(address _account) internal view {
        require(_account != address(0), "Account cannot be zero address");

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(_account) }
        require(size > 0, "Account code size cannot be zero");
    }
}
// 2022 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;

import "../LOAN/LockupContract.sol";

interface ILockupContractFactory {
    
    // --- Events ---

    event LOANTokenAddressSet(address _loanTokenAddress);
    event LockupContractDeployedThroughFactory(address _lockupContractAddress, address _beneficiary, uint _unlockTime, address _deployer);

    // --- Functions ---

    function setLOANTokenAddress(address _loanTokenAddress) external;

    function deployLockupContract(address _beneficiary, uint _unlockTime, LockupContract.LockupClass _lockupClass) external returns (address);

    function isRegisteredLockup(address _addr) external view returns (bool);
}
// 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;

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

import "../Dependencies/SafeMath.sol";
import "../Interfaces/ILOANToken.sol";

/*
* The Liquid Loans LockupContract architecture is a modified implemention of the original forked LockupContract.
* 
* The token balance is locked for at least 1 year from inception and 
* then vests 1/24 of the balance amount over a 30 day period.
*/
contract LockupContract {
    using SafeMath for uint;

    // --- Data ---
    string constant public NAME = "LockupContract";

    // NOTE: change to (1 hours) to test. TODO: always revert back to 365 days;
    uint constant internal UNLOCK_TIME_START = 365 days;

    // NOTE: change to (10 minutes) to test. TODO: always revert back to 30 days
    uint constant internal UNLOCK_TIME_SLOT =  30 days;

    address public immutable beneficiary;

    ILOANToken internal loanToken;

    // Unix point in time at which the funds can be withdrawn.
    uint public startTime;
    // Unix point in time at which the next unlock can occur.
    uint public nextUnlockTime;
    // How much the contract has dispersed
    uint public released;
    // Released slot for Team A contracts
    uint internal currentReleaseSlot;
    // Released amount for Team A contracts
    uint internal releaseAmountPerSlot;
    // Category of team user
    enum LockupClass { A, B }
    LockupClass public lockupClass;

    // --- Events ---

    event LockupContractCreated(address _beneficiary, uint _startTime, LockupClass _class);
    event LockupContractEmptied(uint _LOANwithdrawal);

    // --- Functions ---

    constructor 
    (
        address _loanTokenAddress,
        address _beneficiary,
        uint _startTime,
        LockupClass _class
    )
        public 
    {
        loanToken = ILOANToken(_loanTokenAddress);

        _requireStartTimeIsAtLeastOneYear(_startTime);
        _requireBeneficiaryAddressIsValid(_beneficiary);

        startTime = _startTime;
        nextUnlockTime = _startTime;
        beneficiary = _beneficiary;
        lockupClass = _class;
        currentReleaseSlot = 0;

        emit LockupContractCreated(_beneficiary, _startTime, _class);
    }

    function withdrawLOAN() external {
        _requireCallerIsBeneficiary();
        _requireLockupDurationHasPassed();

        uint balance = loanToken.balanceOf(address(this));

        // Transfer 100% of the token balance if 1 year has passed for class B.
        if (lockupClass == LockupClass.B) {
            loanToken.transfer(beneficiary, balance);
            return;
        }

        uint unlockAmount = _getUnlockAmount(balance);

        if (unlockAmount == 0) {
            emit LockupContractEmptied(unlockAmount);
        }

        if (loanToken.transfer(beneficiary, unlockAmount)) {
            released += unlockAmount;
            currentReleaseSlot++;
            nextUnlockTime = startTime + (currentReleaseSlot * UNLOCK_TIME_SLOT);
        }
    }

    function _getUnlockAmount(uint _balance) internal returns (uint) {
        // Class A investor withdraws 1/3 of token balance after 12 months.
        if (released == 0 && currentReleaseSlot == 0) {

            uint _unlockAmount = _balance / 3;

            // 1/24 of remaining amount per each withdraw
            releaseAmountPerSlot = ((_balance - _unlockAmount) * 41666666666666664)  / 1e18;

            return _unlockAmount;
        }

        // If the FULL vesting period has elapsed, Class A investor withdraws 100% of balance.
        if (block.timestamp >= (startTime + (UNLOCK_TIME_SLOT * 24))) {
            return _balance;
        }

        return releaseAmountPerSlot;
    }

    // --- 'require' functions ---

    function _requireCallerIsBeneficiary() internal view {
        require(msg.sender == beneficiary, "LockupContract: caller is not the beneficiary");
    }

    function _requireBeneficiaryAddressIsValid(address _beneficiary) internal pure {
        require(_beneficiary != address(0), "LockupContract: Beneficiary address is 0");
    }

    function _requireLockupDurationHasPassed() internal view {
        require(block.timestamp >= nextUnlockTime, "LockupContract: The lockup duration must have passed");
    }

    function _requireStartTimeIsAtLeastOneYear(uint _startTime) internal view {
        uint systemDeploymentTime = loanToken.getDeploymentStartTime();
        require(_startTime >= systemDeploymentTime.add(UNLOCK_TIME_START), "LockupContract: unlock time must be at least one year after system deployment");
    }
}
// 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/LockupContractCreator.sol":"LockupContractCreator"}}
              

Contract ABI

[{"type":"event","name":"LockupContractCreatorParamsSet","inputs":[{"type":"address","name":"_teamLockA","internalType":"address","indexed":false},{"type":"address","name":"_teamLockB","internalType":"address","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":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"NAME","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}],"name":"getContracts","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setParamsAndDeployLockupContract","inputs":[{"type":"address","name":"_loanTokenAddress","internalType":"address"},{"type":"address","name":"_lockupFactoryAddress","internalType":"address"},{"type":"address","name":"_beneficiaryA","internalType":"address"},{"type":"address","name":"_beneficiaryB","internalType":"address"}]}]
              

Contract Creation Code

0x608060405269d3c21bcecceda10000006003556b033b2e3c9fd0803ce800000060045561006d6100406102ee6003546100fc60201b6105501790919060201c565b61005b6103b46004546100fc60201b6105501790919060201c565b61015e60201b6105b21790919060201c565b6005556100a861008e6102ee6003546100fc60201b6105501790919060201c565b61005b600d6004546100fc60201b6105501790919060201c565b6006553480156100b757600080fd5b50600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36101b8565b60008261010b57506000610158565b8282028284828161011857fe5b04146101555760405162461bcd60e51b81526004018080602001828103825260218152602001806109276021913960400191505060405180910390fd5b90505b92915050565b600082820183811015610155576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b610760806101c76000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80638da5cb5b1461005c5780638f32d59b146100805780639fd4ab4b1461009c578063a3f4df7e146100dc578063c3a2a93a14610159575b600080fd5b610064610187565b604080516001600160a01b039092168252519081900360200190f35b610088610196565b604080519115158252519081900360200190f35b6100da600480360360808110156100b257600080fd5b506001600160a01b0381358116916020810135821691604082013581169160600135166101a7565b005b6100e4610508565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011e578181015183820152602001610106565b50505050905090810190601f16801561014b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610161610539565b604080516001600160a01b03938416815291909216602082015281519081900390910190f35b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6101af610196565b610200576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6102098461060c565b6102128361060c565b600180546001600160a01b038087166001600160a01b0319928316179092556002805492861692909116919091179055610256426301e1338063ffffffff6105b216565b6009819055600254604051636b99048d60e11b81526001600160a01b03858116600483019081526024830185905292169263d732091a928692600091906044018260ff1681526020019350505050602060405180830381600087803b1580156102be57600080fd5b505af11580156102d2573d6000803e3d6000fd5b505050506040513d60208110156102e857600080fd5b5051600780546001600160a01b0319166001600160a01b0392831617905560025460095460408051636b99048d60e11b8152858516600482015260248101929092526001604483015251919092169163d732091a9160648083019260209291908290030181600087803b15801561035e57600080fd5b505af1158015610372573d6000803e3d6000fd5b505050506040513d602081101561038857600080fd5b5051600880546001600160a01b0319166001600160a01b039283161790556001546007546005546040805163a9059cbb60e01b81529285166004840152602483019190915251919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103fa57600080fd5b505af115801561040e573d6000803e3d6000fd5b505050506040513d602081101561042457600080fd5b50506001546008546006546040805163a9059cbb60e01b81526001600160a01b039384166004820152602481019290925251919092169163a9059cbb9160448083019260209291908290030181600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050506040513d60208110156104ac57600080fd5b5050600754600854604080516001600160a01b03938416815292909116602083015280517fa1c7dece6de09fa8d49fcb96fbd4e881f714f171d16d2d68b5c9eacc0dc45d3a9281900390910190a16105026106bf565b50505050565b604051806040016040528060158152602001742637b1b5bab821b7b73a3930b1ba21b932b0ba37b960591b81525081565b6007546008546001600160a01b0391821691169091565b60008261055f575060006105ac565b8282028284828161056c57fe5b04146105a95760405162461bcd60e51b815260040180806020018281038252602181526020018061070a6021913960400191505060405180910390fd5b90505b92915050565b6000828201838110156105a9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038116610667576040805162461bcd60e51b815260206004820152601e60248201527f4163636f756e742063616e6e6f74206265207a65726f20616464726573730000604482015290519081900360640190fd5b803b806106bb576040805162461bcd60e51b815260206004820181905260248201527f4163636f756e7420636f64652073697a652063616e6e6f74206265207a65726f604482015290519081900360640190fd5b5050565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b031916905556fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212205a3c33a80ab8100b8d7f72b95fc16f24469d4d85029bad1115ee36d7ab7a0fa164736f6c634300060b0033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c80638da5cb5b1461005c5780638f32d59b146100805780639fd4ab4b1461009c578063a3f4df7e146100dc578063c3a2a93a14610159575b600080fd5b610064610187565b604080516001600160a01b039092168252519081900360200190f35b610088610196565b604080519115158252519081900360200190f35b6100da600480360360808110156100b257600080fd5b506001600160a01b0381358116916020810135821691604082013581169160600135166101a7565b005b6100e4610508565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561011e578181015183820152602001610106565b50505050905090810190601f16801561014b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610161610539565b604080516001600160a01b03938416815291909216602082015281519081900390910190f35b6000546001600160a01b031690565b6000546001600160a01b0316331490565b6101af610196565b610200576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6102098461060c565b6102128361060c565b600180546001600160a01b038087166001600160a01b0319928316179092556002805492861692909116919091179055610256426301e1338063ffffffff6105b216565b6009819055600254604051636b99048d60e11b81526001600160a01b03858116600483019081526024830185905292169263d732091a928692600091906044018260ff1681526020019350505050602060405180830381600087803b1580156102be57600080fd5b505af11580156102d2573d6000803e3d6000fd5b505050506040513d60208110156102e857600080fd5b5051600780546001600160a01b0319166001600160a01b0392831617905560025460095460408051636b99048d60e11b8152858516600482015260248101929092526001604483015251919092169163d732091a9160648083019260209291908290030181600087803b15801561035e57600080fd5b505af1158015610372573d6000803e3d6000fd5b505050506040513d602081101561038857600080fd5b5051600880546001600160a01b0319166001600160a01b039283161790556001546007546005546040805163a9059cbb60e01b81529285166004840152602483019190915251919092169163a9059cbb9160448083019260209291908290030181600087803b1580156103fa57600080fd5b505af115801561040e573d6000803e3d6000fd5b505050506040513d602081101561042457600080fd5b50506001546008546006546040805163a9059cbb60e01b81526001600160a01b039384166004820152602481019290925251919092169163a9059cbb9160448083019260209291908290030181600087803b15801561048257600080fd5b505af1158015610496573d6000803e3d6000fd5b505050506040513d60208110156104ac57600080fd5b5050600754600854604080516001600160a01b03938416815292909116602083015280517fa1c7dece6de09fa8d49fcb96fbd4e881f714f171d16d2d68b5c9eacc0dc45d3a9281900390910190a16105026106bf565b50505050565b604051806040016040528060158152602001742637b1b5bab821b7b73a3930b1ba21b932b0ba37b960591b81525081565b6007546008546001600160a01b0391821691169091565b60008261055f575060006105ac565b8282028284828161056c57fe5b04146105a95760405162461bcd60e51b815260040180806020018281038252602181526020018061070a6021913960400191505060405180910390fd5b90505b92915050565b6000828201838110156105a9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b038116610667576040805162461bcd60e51b815260206004820152601e60248201527f4163636f756e742063616e6e6f74206265207a65726f20616464726573730000604482015290519081900360640190fd5b803b806106bb576040805162461bcd60e51b815260206004820181905260248201527f4163636f756e7420636f64652073697a652063616e6e6f74206265207a65726f604482015290519081900360640190fd5b5050565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b031916905556fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212205a3c33a80ab8100b8d7f72b95fc16f24469d4d85029bad1115ee36d7ab7a0fa164736f6c634300060b0033