false
true
0

Contract Address Details

0x003b3012ea7DEC7A539fD1617D7BF3138928dF19

Contract Name
TokenSale
Creator
0x01a8cd–e6a7ee at 0xf932f4–b75807
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
26349372
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:
TokenSale




Optimization enabled
true
Compiler version
v0.8.17+commit.8df45f5f




Optimization runs
200
EVM Version
london




Verified at
2026-04-22T03:09:23.798032Z

Constructor Arguments

000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000c685fa11e01ec6f0000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000f1bd8e12c392d835c18dc1c0ec41f67c2c754be70000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000017d78400000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000506b80000000000000000000000000000000000000000000000000000000000028de80000000000000000000000000000000000000000000000000000000000024ea0000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000009c40000000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000000000000000000000000000000000000011170000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000636045600000000000000000000000000000000000000000000000000000000063b9eb600000000000000000000000000000000000000000000000000000000063ec04600000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Arg [0] (uint256[]) : [70, 60, 30]
Arg [1] (uint256[]) : [10000000, 25000000, 100000000]
Arg [2] (uint256[]) : [5270400, 2678400, 2419200]
Arg [3] (uint256[]) : [40000, 50000, 70000]
Arg [4] (uint256[]) : [1667253600, 1673128800, 1676412000]
Arg [5] (bool[]) : [true, true, false]
Arg [6] (uint256) : 240000000000000000000000000
Arg [7] (address) : 0xdac17f958d2ee523a2206206994597c13d831ec7
Arg [8] (address) : 0xf1bd8e12c392d835c18dc1c0ec41f67c2c754be7
Arg [9] (address) : 0x7a250d5630b4cf539739df2c5dacb4c659f2488d

              

contracts/TokenSale.sol

// SPDX-License-Identifier: MIT

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./helpers/Whitelist.sol";
import "./interfaces/IUniswapRouterV2.sol";

pragma solidity 0.8.17;

contract TokenSale is Ownable, Whitelist {
    using SafeERC20 for IERC20;
    using Address for address;

    IUniswapV2Router public swapRouter; // swap router

    struct TokenSaleRound {
        uint256 startTime; // tokenSale round start time timestamp
        uint256 endTime; // tokenSale round end time timestamp
        uint256 duration; // tokenSale round duration
        uint256 minAmount; // min purchase amount
        uint256 purchasePrice; // purchase price
        uint256 tokensSold; // number of tokens sold
        uint256 totalPurchaseAmount; // number of tokens on sale
        uint256 tokenSaleType; // 0 - pre_sale; 1 - main_sale; 2 - private_sale
        bool isPublic; // if true then round is public, else is private
        bool isEnded; // active tokenSale if true, if false vesting is end
    }

    address public usdtToken; // usdt or busd token address
    address[] public path; // path for get price eth or bnb
    address public treasury; // treasury address
    uint256 public roundsCounter; // quantity of tokeSale rounds
    uint256 public immutable PRECISSION = 1000; // 10000; // precission for math operation

    mapping(uint256 => TokenSaleRound) public rounds; // 0 pre_sale; 1 main_sale; 2 private_sale;
    mapping(address => mapping(uint256 => uint256)) public userBalance; // return user balance of planetex token
    mapping(address => mapping(uint256 => uint256)) public userSpentFunds; // return user spent funds in token sale

    //// @errors

    //// @dev - unequal length of arrays
    error InvalidArrayLengths(string err);
    /// @dev - address to the zero;
    error ZeroAddress(string err);
    /// @dev - user not in the whitelist
    error NotInTheWhitelist(string err);
    /// @dev - round not started
    error RoundNotStarted(string err);
    /// @dev - round is started
    error RoundIsStarted(string err);
    /// @dev - amount more or less than min or max
    error MinMaxPurchase(string err);
    /// @dev - tokens not enough
    error TokensNotEnough(string err);
    /// @dev - msg.value cannot be zero
    error ZeroMsgValue(string err);
    /// @dev - round with rhis id not found
    error RoundNotFound(string err);
    /// @dev - round is ended
    error RoundNotEnd(string err);

    ////@notice emitted when the user purchase token
    event PurchasePlanetexToken(
        address user,
        uint256 spentAmount,
        uint256 receivedAmount
    );
    ////@notice emitted when the owner withdraw unsold tokens
    event WithdrawUnsoldTokens(
        uint256 roundId,
        address recipient,
        uint256 amount
    );
    ////@notice emitted when the owner update round start time
    event UpdateRoundStartTime(
        uint256 roundId,
        uint256 startTime,
        uint256 endTime
    );

    constructor(
        uint256[] memory _purchasePercents, // array of round purchase percents
        uint256[] memory _minAmounts, // array of round min purchase amounts
        uint256[] memory _durations, // array of round durations in seconds
        uint256[] memory _purchasePrices, // array of round purchase prices
        uint256[] memory _startTimes, // array of round start time timestamps
        bool[] memory _isPublic, // array of isPublic bool indicators
        uint256 _planetexTokenTotalSupply, // planetex token total supply
        address _usdtToken, // usdt token address
        address _treasury, // treasury address
        address _unirouter // swap router address
    ) {
        if (
            _purchasePercents.length != _minAmounts.length ||
            _purchasePercents.length != _durations.length ||
            _purchasePercents.length != _purchasePrices.length ||
            _purchasePercents.length != _isPublic.length ||
            _purchasePercents.length != _startTimes.length
        ) {
            revert InvalidArrayLengths("TokenSale: Invalid array lengths");
        }
        if (
            _usdtToken == address(0) ||
            _treasury == address(0) ||
            _unirouter == address(0)
        ) {
            revert ZeroAddress("TokenSale: Zero Address");
        }

        for (uint256 i; i <= _purchasePercents.length - 1; i++) {
            TokenSaleRound storage tokenSaleRound = rounds[i];
            tokenSaleRound.duration = _durations[i];
            tokenSaleRound.startTime = _startTimes[i];
            tokenSaleRound.endTime = _startTimes[i] + _durations[i];
            tokenSaleRound.minAmount = _minAmounts[i];
            tokenSaleRound.purchasePrice = _purchasePrices[i];
            tokenSaleRound.tokensSold = 0;
            tokenSaleRound.totalPurchaseAmount =
                (_planetexTokenTotalSupply * _purchasePercents[i]) /
                PRECISSION;
            tokenSaleRound.isPublic = _isPublic[i];
            tokenSaleRound.isEnded = false;
            tokenSaleRound.tokenSaleType = i;
        }
        roundsCounter = _purchasePercents.length - 1;
        usdtToken = _usdtToken;
        treasury = _treasury;
        swapRouter = IUniswapV2Router(_unirouter);
        address[] memory _path = new address[](2);
        _path[0] = IUniswapV2Router(_unirouter).WETH();
        _path[1] = _usdtToken;
        path = _path;
    }

    /**
    @dev The modifier checks whether the tokenSale round has not expired.
    @param roundId tokenSale round id.
    */
    modifier isEnded(uint256 roundId) {
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        require(
            tokenSaleRound.endTime > block.timestamp,
            "TokenSale: Round is ended"
        );
        _;
    }

    //// External functions

    receive() external payable {}

    /**
    @dev The function performs the purchase of tokens for usdt or busd tokens
    @param roundId tokeSale round id.
    @param amount usdt or busd amount.
    */
    function buyForErc20(uint256 roundId, uint256 amount)
        external
        isEnded(roundId)
    {
        TokenSaleRound storage tokenSaleRound = rounds[roundId];

        if (!tokenSaleRound.isPublic) {
            if (!whitelist[msg.sender]) {
                revert NotInTheWhitelist("TokenSale: Not in the whitelist");
            }
        }

        if (!isRoundStared(roundId)) {
            revert RoundNotStarted("TokenSale: Round is not started");
        }

        if (amount < tokenSaleRound.minAmount) {
            revert MinMaxPurchase("TokenSale: Amount not allowed");
        }

        uint256 tokenAmount = _calcPurchaseAmount(
            amount,
            tokenSaleRound.purchasePrice
        );

        if (
            tokenSaleRound.tokensSold + tokenAmount >
            tokenSaleRound.totalPurchaseAmount
        ) {
            revert TokensNotEnough("TokenSale: Tokens not enough");
        }

        tokenSaleRound.tokensSold += tokenAmount;
        userSpentFunds[msg.sender][roundId] += amount;

        IERC20(usdtToken).safeTransferFrom(msg.sender, treasury, amount);

        userBalance[msg.sender][roundId] += tokenAmount;

        _endSoldOutRound(roundId);
        emit PurchasePlanetexToken(msg.sender, amount, tokenAmount);
    }

    /**
    @dev The function performs the purchase of tokens for eth or bnb tokens
    @param roundId tokeSale round id.
    */
    function buyForEth(uint256 roundId) external payable isEnded(roundId) {
        if (msg.value == 0) {
            revert ZeroMsgValue("TokenSale: Zero msg.value");
        }

        TokenSaleRound storage tokenSaleRound = rounds[roundId];

        if (!tokenSaleRound.isPublic) {
            if (!whitelist[msg.sender]) {
                revert NotInTheWhitelist("TokenSale: Not in the whitelist");
            }
        }

        if (!isRoundStared(roundId)) {
            revert RoundNotStarted("TokenSale: Round is not started");
        }

        uint256[] memory amounts = swapRouter.getAmountsOut(msg.value, path);

        if (amounts[1] < tokenSaleRound.minAmount) {
            revert MinMaxPurchase("TokenSale: Amount not allowed");
        }

        uint256 tokenAmount = _calcPurchaseAmount(
            amounts[1],
            tokenSaleRound.purchasePrice
        );

        if (
            tokenSaleRound.tokensSold + tokenAmount >
            tokenSaleRound.totalPurchaseAmount
        ) {
            revert TokensNotEnough("TokenSale: Tokens not enough");
        }

        tokenSaleRound.tokensSold += tokenAmount;
        userSpentFunds[msg.sender][roundId] += amounts[1];

        userBalance[msg.sender][roundId] += tokenAmount;

        _endSoldOutRound(roundId);

        (bool sent, ) = treasury.call{value: msg.value}("");
        require(sent, "Failed to send Ether");
        emit PurchasePlanetexToken(msg.sender, amounts[1], tokenAmount);
    }

    /**
    @dev The function withdraws tokens that were not sold and writes 
    them to the balance of the specified wallet.Only owner can call it. 
    Only if round is end.
    @param roundId tokeSale round id.
    @param recipient recipient wallet address
    */
    function withdrawUnsoldTokens(uint256 roundId, address recipient)
        external
        onlyOwner
    {
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        if (tokenSaleRound.endTime > block.timestamp) {
            revert RoundNotEnd("TokenSale: Round not end");
        }
        if (tokenSaleRound.totalPurchaseAmount > tokenSaleRound.tokensSold) {
            uint256 unsoldTokens = tokenSaleRound.totalPurchaseAmount -
                tokenSaleRound.tokensSold;
            tokenSaleRound.tokensSold = tokenSaleRound.totalPurchaseAmount;
            userBalance[recipient][roundId] += unsoldTokens;
            emit WithdrawUnsoldTokens(roundId, recipient, unsoldTokens);
        } else {
            revert TokensNotEnough("TokenSale: Sold out");
        }

        tokenSaleRound.isEnded = true;
    }

    /**
    @dev The function update token sale round start time.Only owner can call it. 
    Only if round is not started.
    @param roundId tokeSale round id.
    @param newStartTime new start time timestamp
    */
    function updateStartTime(uint256 roundId, uint256 newStartTime)
        external
        onlyOwner
    {
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        if (tokenSaleRound.startTime < block.timestamp) {
            revert RoundIsStarted("TokenSale: Round is started");
        }

        tokenSaleRound.startTime = newStartTime;
        tokenSaleRound.endTime = newStartTime + tokenSaleRound.duration;
        emit UpdateRoundStartTime(
            roundId,
            tokenSaleRound.startTime,
            tokenSaleRound.endTime
        );
    }

    //// Public Functions

    function convertToStable(uint256 amount, uint256 roundId)
        public
        view
        returns (
            uint256 ethAmount,
            uint256 usdtAmount,
            uint256 planetexAmount
        )
    {
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        if (amount > 0) {
            uint256[] memory amounts = swapRouter.getAmountsOut(amount, path);
            ethAmount = amounts[0];
            usdtAmount = amounts[1];
            planetexAmount = _calcPurchaseAmount(
                usdtAmount,
                tokenSaleRound.purchasePrice
            );
        } else {
            ethAmount = 0;
            usdtAmount = 0;
            planetexAmount = 0;
        }
    }

    function convertUsdtToPltx(uint256 roundId, uint256 amount)
        public
        view
        returns (uint256)
    {
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        uint256 tokenAmount = _calcPurchaseAmount(
            amount,
            tokenSaleRound.purchasePrice
        );
        return tokenAmount;
    }

    /**
    @dev The function shows whether the round has started. Returns true if yes, false if not
    @param roundId tokeSale round id.
    */
    function isRoundStared(uint256 roundId) public view returns (bool) {
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        return (block.timestamp >= tokenSaleRound.startTime &&
            block.timestamp <= tokenSaleRound.endTime);
    }

    /**
    @dev The function returns the timestamp of the end of the tokenSale round
    @param roundId tokeSale round id.
    */
    function getRoundEndTime(uint256 roundId) public view returns (uint256) {
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        return tokenSaleRound.endTime;
    }

    /**
    @dev The function returns the timestamp of the start of the tokenSale round
    @param roundId tokeSale round id.
    */
    function getRoundStartTime(uint256 roundId) public view returns (uint256) {
        if (roundId > roundsCounter) {
            revert RoundNotFound("TokenSale: Round not found");
        }
        TokenSaleRound storage tokenSaleRound = rounds[roundId];
        return tokenSaleRound.startTime;
    }

    //// Internal Functions

    /**
    @dev The function ends the round if all tokens are sold out
    @param roundId tokeSale round id.
    */
    function _endSoldOutRound(uint256 roundId) internal {
        TokenSaleRound storage tokenSaleRound = rounds[roundId];

        if (tokenSaleRound.tokensSold == tokenSaleRound.totalPurchaseAmount) {
            tokenSaleRound.isEnded = true;
        }
    }

    /**
    @dev The function calculates the number of tokens to be received by the user
    @param amount usdt or busd token amount.
    @param price purchase price
    */
    function _calcPurchaseAmount(uint256 amount, uint256 price)
        internal
        pure
        returns (uint256 tokenAmount)
    {
        tokenAmount = (amount / price) * 1e18;
    }
}
        

/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - 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. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
          

/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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.
 *
 * 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.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
          

/

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
          

/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

interface IUniswapV2Router {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}
          

/

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @title Whitelist
 * @dev The Whitelist contract has a whitelist of addresses, and provides basic authorization control functions.
 * @dev This simplifies the implementation of "user permissions".
 */
contract Whitelist is Ownable {
    mapping(address => bool) public whitelist;

    event WhitelistedAddressAdded(address addr);
    event WhitelistedAddressRemoved(address addr);

    /**
     * @dev add an address to the whitelist
     * @param addr address
     * @return success if the address was added to the whitelist, false if the address was already in the whitelist
     */
    function addAddressToWhitelist(address addr)
        public
        onlyOwner
        returns (bool success)
    {
        if (!whitelist[addr]) {
            whitelist[addr] = true;
            emit WhitelistedAddressAdded(addr);
            success = true;
        }
    }

    /**
     * @dev add addresses to the whitelist
     * @param addrs addresses
     * @return success if at least one address was added to the whitelist,
     * false if all addresses were already in the whitelist
     */
    function addAddressesToWhitelist(address[] memory addrs)
        public
        onlyOwner
        returns (bool success)
    {
        for (uint256 i = 0; i < addrs.length; i++) {
            if (addAddressToWhitelist(addrs[i])) {
                success = true;
            }
        }
    }

    /**
     * @dev remove an address from the whitelist
     * @param addr address
     * @return success if the address was removed from the whitelist,
     * false if the address wasn't in the whitelist in the first place
     */
    function removeAddressFromWhitelist(address addr)
        public
        onlyOwner
        returns (bool success)
    {
        if (whitelist[addr]) {
            whitelist[addr] = false;
            emit WhitelistedAddressRemoved(addr);
            success = true;
        }
    }

    /**
     * @dev remove addresses from the whitelist
     * @param addrs addresses
     * @return success if at least one address was removed from the whitelist,
     * false if all addresses weren't in the whitelist in the first place
     */
    function removeAddressesFromWhitelist(address[] memory addrs)
        public
        onlyOwner
        returns (bool success)
    {
        for (uint256 i = 0; i < addrs.length; i++) {
            if (removeAddressFromWhitelist(addrs[i])) {
                success = true;
            }
        }
    }
}
          

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"london","compilationTarget":{"contracts/TokenSale.sol":"TokenSale"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"uint256[]","name":"_purchasePercents","internalType":"uint256[]"},{"type":"uint256[]","name":"_minAmounts","internalType":"uint256[]"},{"type":"uint256[]","name":"_durations","internalType":"uint256[]"},{"type":"uint256[]","name":"_purchasePrices","internalType":"uint256[]"},{"type":"uint256[]","name":"_startTimes","internalType":"uint256[]"},{"type":"bool[]","name":"_isPublic","internalType":"bool[]"},{"type":"uint256","name":"_planetexTokenTotalSupply","internalType":"uint256"},{"type":"address","name":"_usdtToken","internalType":"address"},{"type":"address","name":"_treasury","internalType":"address"},{"type":"address","name":"_unirouter","internalType":"address"}]},{"type":"error","name":"InvalidArrayLengths","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"MinMaxPurchase","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"NotInTheWhitelist","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"RoundIsStarted","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"RoundNotEnd","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"RoundNotFound","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"RoundNotStarted","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"TokensNotEnough","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"ZeroAddress","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"type":"error","name":"ZeroMsgValue","inputs":[{"type":"string","name":"err","internalType":"string"}]},{"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":"PurchasePlanetexToken","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"spentAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"receivedAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"UpdateRoundStartTime","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256","indexed":false},{"type":"uint256","name":"startTime","internalType":"uint256","indexed":false},{"type":"uint256","name":"endTime","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"WhitelistedAddressAdded","inputs":[{"type":"address","name":"addr","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"WhitelistedAddressRemoved","inputs":[{"type":"address","name":"addr","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"WithdrawUnsoldTokens","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256","indexed":false},{"type":"address","name":"recipient","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PRECISSION","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"addAddressToWhitelist","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"addAddressesToWhitelist","inputs":[{"type":"address[]","name":"addrs","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"buyForErc20","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"buyForEth","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"ethAmount","internalType":"uint256"},{"type":"uint256","name":"usdtAmount","internalType":"uint256"},{"type":"uint256","name":"planetexAmount","internalType":"uint256"}],"name":"convertToStable","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"roundId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"convertUsdtToPltx","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRoundEndTime","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRoundStartTime","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isRoundStared","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"path","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"removeAddressFromWhitelist","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"removeAddressesFromWhitelist","inputs":[{"type":"address[]","name":"addrs","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"startTime","internalType":"uint256"},{"type":"uint256","name":"endTime","internalType":"uint256"},{"type":"uint256","name":"duration","internalType":"uint256"},{"type":"uint256","name":"minAmount","internalType":"uint256"},{"type":"uint256","name":"purchasePrice","internalType":"uint256"},{"type":"uint256","name":"tokensSold","internalType":"uint256"},{"type":"uint256","name":"totalPurchaseAmount","internalType":"uint256"},{"type":"uint256","name":"tokenSaleType","internalType":"uint256"},{"type":"bool","name":"isPublic","internalType":"bool"},{"type":"bool","name":"isEnded","internalType":"bool"}],"name":"rounds","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"roundsCounter","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Router"}],"name":"swapRouter","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateStartTime","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"},{"type":"uint256","name":"newStartTime","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"usdtToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userBalance","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userSpentFunds","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"whitelist","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawUnsoldTokens","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"},{"type":"address","name":"recipient","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x60a06040526103e86080523480156200001757600080fd5b506040516200269a3803806200269a8339810160408190526200003a91620006a4565b620000453362000462565b88518a5114158062000059575087518a5114155b8062000067575086518a5114155b8062000075575084518a5114155b8062000083575085518a5114155b15620000d757604051630552c5f160e11b815260206004820181905260248201527f546f6b656e53616c653a20496e76616c6964206172726179206c656e6774687360448201526064015b60405180910390fd5b6001600160a01b0383161580620000f557506001600160a01b038216155b806200010857506001600160a01b038116155b15620001585760405163eac0d38960e01b815260206004820152601760248201527f546f6b656e53616c653a205a65726f20416464726573730000000000000000006044820152606401620000ce565b60005b60018b516200016b919062000806565b81116200030157600081815260076020526040902089518a908390811062000197576200019762000822565b60200260200101518160020181905550878281518110620001bc57620001bc62000822565b60200260200101518160000181905550898281518110620001e157620001e162000822565b6020026020010151888381518110620001fe57620001fe62000822565b602002602001015162000212919062000838565b60018201558a518b90839081106200022e576200022e62000822565b6020026020010151816003018190555088828151811062000253576200025362000822565b60200260200101518160040181905550600081600501819055506080518c838151811062000285576200028562000822565b6020026020010151876200029a91906200084e565b620002a6919062000868565b60068201558651879083908110620002c257620002c262000822565b602090810291909101015160088201805461ffff191691151561ff00191691909117905560070181905580620002f8816200088b565b9150506200015b565b5060018a5162000312919062000806565b600655600380546001600160a01b038581166001600160a01b031992831617909255600580548584169083161790556002805492841692909116919091178155604080518281526060810182526000929091602083019080368337019050509050816001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015620003b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003d89190620008a7565b81600081518110620003ee57620003ee62000822565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811062000425576200042562000822565b6001600160a01b039092166020928302919091018201528151620004509160049190840190620004b2565b505050505050505050505050620008cc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280548282559060005260206000209081019282156200050a579160200282015b828111156200050a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004d3565b50620005189291506200051c565b5090565b5b808211156200051857600081556001016200051d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000574576200057462000533565b604052919050565b60006001600160401b0382111562000598576200059862000533565b5060051b60200190565b600082601f830112620005b457600080fd5b81516020620005cd620005c7836200057c565b62000549565b82815260059290921b84018101918181019086841115620005ed57600080fd5b8286015b848110156200060a5780518352918301918301620005f1565b509695505050505050565b600082601f8301126200062757600080fd5b815160206200063a620005c7836200057c565b82815260059290921b840181019181810190868411156200065a57600080fd5b8286015b848110156200060a5780518015158114620006795760008081fd5b83529183019183016200065e565b80516001600160a01b03811681146200069f57600080fd5b919050565b6000806000806000806000806000806101408b8d031215620006c557600080fd5b8a516001600160401b0380821115620006dd57600080fd5b620006eb8e838f01620005a2565b9b5060208d01519150808211156200070257600080fd5b620007108e838f01620005a2565b9a5060408d01519150808211156200072757600080fd5b620007358e838f01620005a2565b995060608d01519150808211156200074c57600080fd5b6200075a8e838f01620005a2565b985060808d01519150808211156200077157600080fd5b6200077f8e838f01620005a2565b975060a08d01519150808211156200079657600080fd5b50620007a58d828e0162000615565b95505060c08b01519350620007bd60e08c0162000687565b9250620007ce6101008c0162000687565b9150620007df6101208c0162000687565b90509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b818103818111156200081c576200081c620007f0565b92915050565b634e487b7160e01b600052603260045260246000fd5b808201808211156200081c576200081c620007f0565b80820281158282048414176200081c576200081c620007f0565b6000826200088657634e487b7160e01b600052601260045260246000fd5b500490565b600060018201620008a057620008a0620007f0565b5060010190565b600060208284031215620008ba57600080fd5b620008c58262000687565b9392505050565b608051611db2620008e860003960006103e00152611db26000f3fe6080604052600436106101855760003560e01c8063a98ad46c116100d1578063cdb0d4b41161008a578063e2ec6ec311610064578063e2ec6ec31461056a578063e35bed031461058a578063ece810061461059d578063f2fde38b146105d857600080fd5b8063cdb0d4b41461050a578063ddc6ac231461052a578063df4c44fa1461054a57600080fd5b8063a98ad46c14610432578063af6d1fe414610452578063b023a1ca14610472578063c0144d4c14610492578063c31c9c07146104ca578063c8cae211146104ea57600080fd5b806361d027b31161013e5780638c65c81f116101185780638c65c81f146102f15780638da5cb5b146103b05780638deca9e9146103ce5780639b19251a1461040257600080fd5b806361d027b314610282578063715018a6146102ba5780637b9417c8146102d157600080fd5b8063034420c41461019157806312b19a13146101ba57806324953eaa146101da578063286dd3f51461020a57806344c819491461022a5780636141386a1461024a57600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a760065481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b506101a76101d5366004611935565b6105f8565b3480156101e657600080fd5b506101fa6101f53660046119d0565b61063c565b60405190151581526020016101b1565b34801561021657600080fd5b506101fa610225366004611a62565b6106b7565b34801561023657600080fd5b506101fa610245366004611935565b610761565b34801561025657600080fd5b506101a7610265366004611a7d565b600860209081526000928352604080842090915290825290205481565b34801561028e57600080fd5b506005546102a2906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b3480156102c657600080fd5b506102cf6107b0565b005b3480156102dd57600080fd5b506101fa6102ec366004611a62565b6107e6565b3480156102fd57600080fd5b5061036261030c366004611935565b600760208190526000918252604090912080546001820154600283015460038401546004850154600586015460068701549787015460089097015495979496939592949193909260ff808216916101009004168a565b604080519a8b5260208b0199909952978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140016101b1565b3480156103bc57600080fd5b506000546001600160a01b03166102a2565b3480156103da57600080fd5b506101a77f000000000000000000000000000000000000000000000000000000000000000081565b34801561040e57600080fd5b506101fa61041d366004611a62565b60016020526000908152604090205460ff1681565b34801561043e57600080fd5b506003546102a2906001600160a01b031681565b34801561045e57600080fd5b506102a261046d366004611935565b610886565b34801561047e57600080fd5b506102cf61048d366004611aa7565b6108b0565b34801561049e57600080fd5b506101a76104ad366004611a7d565b600960209081526000928352604080842090915290825290205481565b3480156104d657600080fd5b506002546102a2906001600160a01b031681565b3480156104f657600080fd5b506102cf610505366004611ac9565b6109bf565b34801561051657600080fd5b506101a7610525366004611aa7565b610b7e565b34801561053657600080fd5b506101a7610545366004611935565b610bcf565b34801561055657600080fd5b506102cf610565366004611aa7565b610c07565b34801561057657600080fd5b506101fa6105853660046119d0565b610f0e565b6102cf610598366004611935565b610f83565b3480156105a957600080fd5b506105bd6105b8366004611aa7565b61144a565b604080519384526020840192909252908201526060016101b1565b3480156105e457600080fd5b506102cf6105f3366004611a62565b611541565b60006006548211156106265760405163c089dc7f60e01b815260040161061d90611af5565b60405180910390fd5b5060009081526007602052604090206001015490565b600080546001600160a01b031633146106675760405162461bcd60e51b815260040161061d90611b2c565b60005b82518110156106b15761069583828151811061068857610688611b61565b60200260200101516106b7565b1561069f57600191505b806106a981611b8d565b91505061066a565b50919050565b600080546001600160a01b031633146106e25760405162461bcd60e51b815260040161061d90611b2c565b6001600160a01b03821660009081526001602052604090205460ff161561075c576001600160a01b038216600081815260016020908152604091829020805460ff1916905590519182527ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a91015b60405180910390a15060015b919050565b60006006548211156107865760405163c089dc7f60e01b815260040161061d90611af5565b6000828152600760205260409020805442108015906107a9575080600101544211155b9392505050565b6000546001600160a01b031633146107da5760405162461bcd60e51b815260040161061d90611b2c565b6107e460006115dc565b565b600080546001600160a01b031633146108115760405162461bcd60e51b815260040161061d90611b2c565b6001600160a01b03821660009081526001602052604090205460ff1661075c576001600160a01b038216600081815260016020818152604092839020805460ff191690921790915590519182527fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f9101610750565b6004818154811061089657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146108da5760405162461bcd60e51b815260040161061d90611b2c565b6006548211156108fd5760405163c089dc7f60e01b815260040161061d90611af5565b6000828152600760205260409020805442111561095d576040516343d2cc2d60e11b815260206004820152601b60248201527f546f6b656e53616c653a20526f756e6420697320737461727465640000000000604482015260640161061d565b818155600281015461096f9083611ba6565b6001820181905581546040805186815260208101929092528101919091527f0528436cb8cba813c3c51c630e33feaae5702ec9756ca177a74b0bb347e3ec7a9060600160405180910390a1505050565b6000546001600160a01b031633146109e95760405162461bcd60e51b815260040161061d90611b2c565b600654821115610a0c5760405163c089dc7f60e01b815260040161061d90611af5565b60008281526007602052604090206001810154421015610a6f576040516378d27a3f60e01b815260206004820152601860248201527f546f6b656e53616c653a20526f756e64206e6f7420656e640000000000000000604482015260640161061d565b806005015481600601541115610b2b57600081600501548260060154610a959190611bb9565b600683015460058401556001600160a01b0384166000908152600860209081526040808320888452909152812080549293508392909190610ad7908490611ba6565b9091555050604080518581526001600160a01b03851660208201529081018290527fa55004e65728ad609a6a58ed7847f4161a00ff095a35db4cbb3114d5408ff11a9060600160405180910390a150610b6a565b60405163075cb29960e21b8152602060048201526013602482015272151bdad95b94d85b194e8814dbdb19081bdd5d606a1b604482015260640161061d565b600801805461ff0019166101001790555050565b6000600654831115610ba35760405163c089dc7f60e01b815260040161061d90611af5565b60008381526007602052604081206004810154909190610bc490859061162c565b925050505b92915050565b6000600654821115610bf45760405163c089dc7f60e01b815260040161061d90611af5565b5060009081526007602052604090205490565b6000828152600760205260409020600654839190821115610c3b5760405163c089dc7f60e01b815260040161061d90611af5565b42816001015411610c8a5760405162461bcd60e51b8152602060048201526019602482015278151bdad95b94d85b194e88149bdd5b99081a5cc8195b991959603a1b604482015260640161061d565b6000848152600760205260409020600881015460ff16610d04573360009081526001602052604090205460ff16610d045760405163528d8af960e11b815260206004820152601f60248201527f546f6b656e53616c653a204e6f7420696e207468652077686974656c69737400604482015260640161061d565b610d0d85610761565b610d5a57604051632560586f60e01b815260206004820152601f60248201527f546f6b656e53616c653a20526f756e64206973206e6f74207374617274656400604482015260640161061d565b8060030154841015610daf57604051638d055fd360e01b815260206004820152601d60248201527f546f6b656e53616c653a20416d6f756e74206e6f7420616c6c6f776564000000604482015260640161061d565b6000610dbf85836004015461162c565b90508160060154818360050154610dd69190611ba6565b1115610e255760405163075cb29960e21b815260206004820152601c60248201527f546f6b656e53616c653a20546f6b656e73206e6f7420656e6f75676800000000604482015260640161061d565b80826005016000828254610e399190611ba6565b909155505033600090815260096020908152604080832089845290915281208054879290610e68908490611ba6565b9091555050600554600354610e8c916001600160a01b03918216913391168861164a565b33600090815260086020908152604080832089845290915281208054839290610eb6908490611ba6565b90915550610ec59050866116aa565b60408051338152602081018790529081018290527f1f6e6a2da489b70ce7dcf73e15c66910eeea76956867fa11ca294d108d6d0c139060600160405180910390a1505050505050565b600080546001600160a01b03163314610f395760405162461bcd60e51b815260040161061d90611b2c565b60005b82518110156106b157610f67838281518110610f5a57610f5a611b61565b60200260200101516107e6565b15610f7157600191505b80610f7b81611b8d565b915050610f3c565b6000818152600760205260409020600654829190821115610fb75760405163c089dc7f60e01b815260040161061d90611af5565b428160010154116110065760405162461bcd60e51b8152602060048201526019602482015278151bdad95b94d85b194e88149bdd5b99081a5cc8195b991959603a1b604482015260640161061d565b3460000361105757604051632453723560e21b815260206004820152601960248201527f546f6b656e53616c653a205a65726f206d73672e76616c756500000000000000604482015260640161061d565b6000838152600760205260409020600881015460ff166110d1573360009081526001602052604090205460ff166110d15760405163528d8af960e11b815260206004820152601f60248201527f546f6b656e53616c653a204e6f7420696e207468652077686974656c69737400604482015260640161061d565b6110da84610761565b61112757604051632560586f60e01b815260206004820152601f60248201527f546f6b656e53616c653a20526f756e64206973206e6f74207374617274656400604482015260640161061d565b60025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f9061115a9034906004908101611bcc565b600060405180830381865afa158015611177573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261119f9190810190611c28565b90508160030154816001815181106111b9576111b9611b61565b6020026020010151101561121057604051638d055fd360e01b815260206004820152601d60248201527f546f6b656e53616c653a20416d6f756e74206e6f7420616c6c6f776564000000604482015260640161061d565b600061123a8260018151811061122857611228611b61565b6020026020010151846004015461162c565b905082600601548184600501546112519190611ba6565b11156112a05760405163075cb29960e21b815260206004820152601c60248201527f546f6b656e53616c653a20546f6b656e73206e6f7420656e6f75676800000000604482015260640161061d565b808360050160008282546112b49190611ba6565b92505081905550816001815181106112ce576112ce611b61565b6020908102919091018101513360009081526009835260408082208a8352909352918220805491929091611303908490611ba6565b909155505033600090815260086020908152604080832089845290915281208054839290611332908490611ba6565b909155506113419050866116aa565b6005546040516000916001600160a01b03169034908381818185875af1925050503d806000811461138e576040519150601f19603f3d011682016040523d82523d6000602084013e611393565b606091505b50509050806113db5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161061d565b7f1f6e6a2da489b70ce7dcf73e15c66910eeea76956867fa11ca294d108d6d0c13338460018151811061141057611410611b61565b602090810291909101810151604080516001600160a01b03909416845291830152810184905260600160405180910390a150505050505050565b600081815260076020526040812081908190851561152c5760025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f90611495908a906004908101611bcc565b600060405180830381865afa1580156114b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114da9190810190611c28565b9050806000815181106114ef576114ef611b61565b602002602001015194508060018151811061150c5761150c611b61565b6020026020010151935061152484836004015461162c565b925050611539565b6000935060009250600091505b509250925092565b6000546001600160a01b0316331461156b5760405162461bcd60e51b815260040161061d90611b2c565b6001600160a01b0381166115d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061d565b6115d9816115dc565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006116388284611cae565b6107a990670de0b6b3a7640000611cd0565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526116a49085906116dd565b50505050565b600081815260076020526040902060068101546005820154036116d95760088101805461ff0019166101001790555b5050565b6000611732826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117b49092919063ffffffff16565b8051909150156117af57808060200190518101906117509190611ce7565b6117af5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061d565b505050565b60606117c384846000856117cb565b949350505050565b60608247101561182c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061d565b6001600160a01b0385163b6118835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061d565b600080866001600160a01b0316858760405161189f9190611d2d565b60006040518083038185875af1925050503d80600081146118dc576040519150601f19603f3d011682016040523d82523d6000602084013e6118e1565b606091505b50915091506118f18282866118fc565b979650505050505050565b6060831561190b5750816107a9565b82511561191b5782518084602001fd5b8160405162461bcd60e51b815260040161061d9190611d49565b60006020828403121561194757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561198d5761198d61194e565b604052919050565b600067ffffffffffffffff8211156119af576119af61194e565b5060051b60200190565b80356001600160a01b038116811461075c57600080fd5b600060208083850312156119e357600080fd5b823567ffffffffffffffff8111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1e611a1982611995565b611964565b81815260059190911b82018301908381019087831115611a3d57600080fd5b928401925b828410156118f157611a53846119b9565b82529284019290840190611a42565b600060208284031215611a7457600080fd5b6107a9826119b9565b60008060408385031215611a9057600080fd5b611a99836119b9565b946020939093013593505050565b60008060408385031215611aba57600080fd5b50508035926020909101359150565b60008060408385031215611adc57600080fd5b82359150611aec602084016119b9565b90509250929050565b6020808252601a908201527f546f6b656e53616c653a20526f756e64206e6f7420666f756e64000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b9f57611b9f611b77565b5060010190565b80820180821115610bc957610bc9611b77565b81810381811115610bc957610bc9611b77565b60006040820184835260206040818501528185548084526060860191508660005282600020935060005b81811015611c1b5784546001600160a01b031683526001948501949284019201611bf6565b5090979650505050505050565b60006020808385031215611c3b57600080fd5b825167ffffffffffffffff811115611c5257600080fd5b8301601f81018513611c6357600080fd5b8051611c71611a1982611995565b81815260059190911b82018301908381019087831115611c9057600080fd5b928401925b828410156118f157835182529284019290840190611c95565b600082611ccb57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610bc957610bc9611b77565b600060208284031215611cf957600080fd5b815180151581146107a957600080fd5b60005b83811015611d24578181015183820152602001611d0c565b50506000910152565b60008251611d3f818460208701611d09565b9190910192915050565b6020815260008251806020840152611d68816040850160208701611d09565b601f01601f1916919091016040019291505056fea26469706673582212207f7b501f318d8f7379cd2b5073ce229d6c181644b265c394df7f9d7c029914f864736f6c63430008110033000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000034000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000c685fa11e01ec6f0000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000f1bd8e12c392d835c18dc1c0ec41f67c2c754be70000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000017d78400000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000506b80000000000000000000000000000000000000000000000000000000000028de80000000000000000000000000000000000000000000000000000000000024ea0000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000009c40000000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000000000000000000000000000000000000011170000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000636045600000000000000000000000000000000000000000000000000000000063b9eb600000000000000000000000000000000000000000000000000000000063ec04600000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode

0x6080604052600436106101855760003560e01c8063a98ad46c116100d1578063cdb0d4b41161008a578063e2ec6ec311610064578063e2ec6ec31461056a578063e35bed031461058a578063ece810061461059d578063f2fde38b146105d857600080fd5b8063cdb0d4b41461050a578063ddc6ac231461052a578063df4c44fa1461054a57600080fd5b8063a98ad46c14610432578063af6d1fe414610452578063b023a1ca14610472578063c0144d4c14610492578063c31c9c07146104ca578063c8cae211146104ea57600080fd5b806361d027b31161013e5780638c65c81f116101185780638c65c81f146102f15780638da5cb5b146103b05780638deca9e9146103ce5780639b19251a1461040257600080fd5b806361d027b314610282578063715018a6146102ba5780637b9417c8146102d157600080fd5b8063034420c41461019157806312b19a13146101ba57806324953eaa146101da578063286dd3f51461020a57806344c819491461022a5780636141386a1461024a57600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506101a760065481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b506101a76101d5366004611935565b6105f8565b3480156101e657600080fd5b506101fa6101f53660046119d0565b61063c565b60405190151581526020016101b1565b34801561021657600080fd5b506101fa610225366004611a62565b6106b7565b34801561023657600080fd5b506101fa610245366004611935565b610761565b34801561025657600080fd5b506101a7610265366004611a7d565b600860209081526000928352604080842090915290825290205481565b34801561028e57600080fd5b506005546102a2906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b3480156102c657600080fd5b506102cf6107b0565b005b3480156102dd57600080fd5b506101fa6102ec366004611a62565b6107e6565b3480156102fd57600080fd5b5061036261030c366004611935565b600760208190526000918252604090912080546001820154600283015460038401546004850154600586015460068701549787015460089097015495979496939592949193909260ff808216916101009004168a565b604080519a8b5260208b0199909952978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140016101b1565b3480156103bc57600080fd5b506000546001600160a01b03166102a2565b3480156103da57600080fd5b506101a77f00000000000000000000000000000000000000000000000000000000000003e881565b34801561040e57600080fd5b506101fa61041d366004611a62565b60016020526000908152604090205460ff1681565b34801561043e57600080fd5b506003546102a2906001600160a01b031681565b34801561045e57600080fd5b506102a261046d366004611935565b610886565b34801561047e57600080fd5b506102cf61048d366004611aa7565b6108b0565b34801561049e57600080fd5b506101a76104ad366004611a7d565b600960209081526000928352604080842090915290825290205481565b3480156104d657600080fd5b506002546102a2906001600160a01b031681565b3480156104f657600080fd5b506102cf610505366004611ac9565b6109bf565b34801561051657600080fd5b506101a7610525366004611aa7565b610b7e565b34801561053657600080fd5b506101a7610545366004611935565b610bcf565b34801561055657600080fd5b506102cf610565366004611aa7565b610c07565b34801561057657600080fd5b506101fa6105853660046119d0565b610f0e565b6102cf610598366004611935565b610f83565b3480156105a957600080fd5b506105bd6105b8366004611aa7565b61144a565b604080519384526020840192909252908201526060016101b1565b3480156105e457600080fd5b506102cf6105f3366004611a62565b611541565b60006006548211156106265760405163c089dc7f60e01b815260040161061d90611af5565b60405180910390fd5b5060009081526007602052604090206001015490565b600080546001600160a01b031633146106675760405162461bcd60e51b815260040161061d90611b2c565b60005b82518110156106b15761069583828151811061068857610688611b61565b60200260200101516106b7565b1561069f57600191505b806106a981611b8d565b91505061066a565b50919050565b600080546001600160a01b031633146106e25760405162461bcd60e51b815260040161061d90611b2c565b6001600160a01b03821660009081526001602052604090205460ff161561075c576001600160a01b038216600081815260016020908152604091829020805460ff1916905590519182527ff1abf01a1043b7c244d128e8595cf0c1d10743b022b03a02dffd8ca3bf729f5a91015b60405180910390a15060015b919050565b60006006548211156107865760405163c089dc7f60e01b815260040161061d90611af5565b6000828152600760205260409020805442108015906107a9575080600101544211155b9392505050565b6000546001600160a01b031633146107da5760405162461bcd60e51b815260040161061d90611b2c565b6107e460006115dc565b565b600080546001600160a01b031633146108115760405162461bcd60e51b815260040161061d90611b2c565b6001600160a01b03821660009081526001602052604090205460ff1661075c576001600160a01b038216600081815260016020818152604092839020805460ff191690921790915590519182527fd1bba68c128cc3f427e5831b3c6f99f480b6efa6b9e80c757768f6124158cc3f9101610750565b6004818154811061089657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031633146108da5760405162461bcd60e51b815260040161061d90611b2c565b6006548211156108fd5760405163c089dc7f60e01b815260040161061d90611af5565b6000828152600760205260409020805442111561095d576040516343d2cc2d60e11b815260206004820152601b60248201527f546f6b656e53616c653a20526f756e6420697320737461727465640000000000604482015260640161061d565b818155600281015461096f9083611ba6565b6001820181905581546040805186815260208101929092528101919091527f0528436cb8cba813c3c51c630e33feaae5702ec9756ca177a74b0bb347e3ec7a9060600160405180910390a1505050565b6000546001600160a01b031633146109e95760405162461bcd60e51b815260040161061d90611b2c565b600654821115610a0c5760405163c089dc7f60e01b815260040161061d90611af5565b60008281526007602052604090206001810154421015610a6f576040516378d27a3f60e01b815260206004820152601860248201527f546f6b656e53616c653a20526f756e64206e6f7420656e640000000000000000604482015260640161061d565b806005015481600601541115610b2b57600081600501548260060154610a959190611bb9565b600683015460058401556001600160a01b0384166000908152600860209081526040808320888452909152812080549293508392909190610ad7908490611ba6565b9091555050604080518581526001600160a01b03851660208201529081018290527fa55004e65728ad609a6a58ed7847f4161a00ff095a35db4cbb3114d5408ff11a9060600160405180910390a150610b6a565b60405163075cb29960e21b8152602060048201526013602482015272151bdad95b94d85b194e8814dbdb19081bdd5d606a1b604482015260640161061d565b600801805461ff0019166101001790555050565b6000600654831115610ba35760405163c089dc7f60e01b815260040161061d90611af5565b60008381526007602052604081206004810154909190610bc490859061162c565b925050505b92915050565b6000600654821115610bf45760405163c089dc7f60e01b815260040161061d90611af5565b5060009081526007602052604090205490565b6000828152600760205260409020600654839190821115610c3b5760405163c089dc7f60e01b815260040161061d90611af5565b42816001015411610c8a5760405162461bcd60e51b8152602060048201526019602482015278151bdad95b94d85b194e88149bdd5b99081a5cc8195b991959603a1b604482015260640161061d565b6000848152600760205260409020600881015460ff16610d04573360009081526001602052604090205460ff16610d045760405163528d8af960e11b815260206004820152601f60248201527f546f6b656e53616c653a204e6f7420696e207468652077686974656c69737400604482015260640161061d565b610d0d85610761565b610d5a57604051632560586f60e01b815260206004820152601f60248201527f546f6b656e53616c653a20526f756e64206973206e6f74207374617274656400604482015260640161061d565b8060030154841015610daf57604051638d055fd360e01b815260206004820152601d60248201527f546f6b656e53616c653a20416d6f756e74206e6f7420616c6c6f776564000000604482015260640161061d565b6000610dbf85836004015461162c565b90508160060154818360050154610dd69190611ba6565b1115610e255760405163075cb29960e21b815260206004820152601c60248201527f546f6b656e53616c653a20546f6b656e73206e6f7420656e6f75676800000000604482015260640161061d565b80826005016000828254610e399190611ba6565b909155505033600090815260096020908152604080832089845290915281208054879290610e68908490611ba6565b9091555050600554600354610e8c916001600160a01b03918216913391168861164a565b33600090815260086020908152604080832089845290915281208054839290610eb6908490611ba6565b90915550610ec59050866116aa565b60408051338152602081018790529081018290527f1f6e6a2da489b70ce7dcf73e15c66910eeea76956867fa11ca294d108d6d0c139060600160405180910390a1505050505050565b600080546001600160a01b03163314610f395760405162461bcd60e51b815260040161061d90611b2c565b60005b82518110156106b157610f67838281518110610f5a57610f5a611b61565b60200260200101516107e6565b15610f7157600191505b80610f7b81611b8d565b915050610f3c565b6000818152600760205260409020600654829190821115610fb75760405163c089dc7f60e01b815260040161061d90611af5565b428160010154116110065760405162461bcd60e51b8152602060048201526019602482015278151bdad95b94d85b194e88149bdd5b99081a5cc8195b991959603a1b604482015260640161061d565b3460000361105757604051632453723560e21b815260206004820152601960248201527f546f6b656e53616c653a205a65726f206d73672e76616c756500000000000000604482015260640161061d565b6000838152600760205260409020600881015460ff166110d1573360009081526001602052604090205460ff166110d15760405163528d8af960e11b815260206004820152601f60248201527f546f6b656e53616c653a204e6f7420696e207468652077686974656c69737400604482015260640161061d565b6110da84610761565b61112757604051632560586f60e01b815260206004820152601f60248201527f546f6b656e53616c653a20526f756e64206973206e6f74207374617274656400604482015260640161061d565b60025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f9061115a9034906004908101611bcc565b600060405180830381865afa158015611177573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261119f9190810190611c28565b90508160030154816001815181106111b9576111b9611b61565b6020026020010151101561121057604051638d055fd360e01b815260206004820152601d60248201527f546f6b656e53616c653a20416d6f756e74206e6f7420616c6c6f776564000000604482015260640161061d565b600061123a8260018151811061122857611228611b61565b6020026020010151846004015461162c565b905082600601548184600501546112519190611ba6565b11156112a05760405163075cb29960e21b815260206004820152601c60248201527f546f6b656e53616c653a20546f6b656e73206e6f7420656e6f75676800000000604482015260640161061d565b808360050160008282546112b49190611ba6565b92505081905550816001815181106112ce576112ce611b61565b6020908102919091018101513360009081526009835260408082208a8352909352918220805491929091611303908490611ba6565b909155505033600090815260086020908152604080832089845290915281208054839290611332908490611ba6565b909155506113419050866116aa565b6005546040516000916001600160a01b03169034908381818185875af1925050503d806000811461138e576040519150601f19603f3d011682016040523d82523d6000602084013e611393565b606091505b50509050806113db5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161061d565b7f1f6e6a2da489b70ce7dcf73e15c66910eeea76956867fa11ca294d108d6d0c13338460018151811061141057611410611b61565b602090810291909101810151604080516001600160a01b03909416845291830152810184905260600160405180910390a150505050505050565b600081815260076020526040812081908190851561152c5760025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f90611495908a906004908101611bcc565b600060405180830381865afa1580156114b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114da9190810190611c28565b9050806000815181106114ef576114ef611b61565b602002602001015194508060018151811061150c5761150c611b61565b6020026020010151935061152484836004015461162c565b925050611539565b6000935060009250600091505b509250925092565b6000546001600160a01b0316331461156b5760405162461bcd60e51b815260040161061d90611b2c565b6001600160a01b0381166115d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061d565b6115d9816115dc565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006116388284611cae565b6107a990670de0b6b3a7640000611cd0565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526116a49085906116dd565b50505050565b600081815260076020526040902060068101546005820154036116d95760088101805461ff0019166101001790555b5050565b6000611732826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117b49092919063ffffffff16565b8051909150156117af57808060200190518101906117509190611ce7565b6117af5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061d565b505050565b60606117c384846000856117cb565b949350505050565b60608247101561182c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061d565b6001600160a01b0385163b6118835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061d565b600080866001600160a01b0316858760405161189f9190611d2d565b60006040518083038185875af1925050503d80600081146118dc576040519150601f19603f3d011682016040523d82523d6000602084013e6118e1565b606091505b50915091506118f18282866118fc565b979650505050505050565b6060831561190b5750816107a9565b82511561191b5782518084602001fd5b8160405162461bcd60e51b815260040161061d9190611d49565b60006020828403121561194757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561198d5761198d61194e565b604052919050565b600067ffffffffffffffff8211156119af576119af61194e565b5060051b60200190565b80356001600160a01b038116811461075c57600080fd5b600060208083850312156119e357600080fd5b823567ffffffffffffffff8111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1e611a1982611995565b611964565b81815260059190911b82018301908381019087831115611a3d57600080fd5b928401925b828410156118f157611a53846119b9565b82529284019290840190611a42565b600060208284031215611a7457600080fd5b6107a9826119b9565b60008060408385031215611a9057600080fd5b611a99836119b9565b946020939093013593505050565b60008060408385031215611aba57600080fd5b50508035926020909101359150565b60008060408385031215611adc57600080fd5b82359150611aec602084016119b9565b90509250929050565b6020808252601a908201527f546f6b656e53616c653a20526f756e64206e6f7420666f756e64000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b9f57611b9f611b77565b5060010190565b80820180821115610bc957610bc9611b77565b81810381811115610bc957610bc9611b77565b60006040820184835260206040818501528185548084526060860191508660005282600020935060005b81811015611c1b5784546001600160a01b031683526001948501949284019201611bf6565b5090979650505050505050565b60006020808385031215611c3b57600080fd5b825167ffffffffffffffff811115611c5257600080fd5b8301601f81018513611c6357600080fd5b8051611c71611a1982611995565b81815260059190911b82018301908381019087831115611c9057600080fd5b928401925b828410156118f157835182529284019290840190611c95565b600082611ccb57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610bc957610bc9611b77565b600060208284031215611cf957600080fd5b815180151581146107a957600080fd5b60005b83811015611d24578181015183820152602001611d0c565b50506000910152565b60008251611d3f818460208701611d09565b9190910192915050565b6020815260008251806020840152611d68816040850160208701611d09565b601f01601f1916919091016040019291505056fea26469706673582212207f7b501f318d8f7379cd2b5073ce229d6c181644b265c394df7f9d7c029914f864736f6c63430008110033