false
false
0

Contract Address Details

0x08b60BC7991EeC46Dae2db4C4f08aD9516659339

Contract Name
ICO
Creator
0x35c4e7–d28c4a at 0x6c6f9b–9d0e6b
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
37 Transactions
Transfers
32 Transfers
Gas Used
3,630,053
Last Balance Update
16286838
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
ICO




Optimization enabled
true
Compiler version
v0.8.19+commit.7dd6d404




Optimization runs
200
EVM Version
default




Verified at
2024-09-26T15:32:03.765321Z

Constructor Arguments

0x000000000000000000000000df4da43dd3e9918f0784f8c92b8aa1b304c43243000000000000000000000000e5a5837b96176d6e47e541f186b2348ded2c0a1d

Arg [0] (address) : 0xdf4da43dd3e9918f0784f8c92b8aa1b304c43243
Arg [1] (address) : 0xe5a5837b96176d6e47e541f186b2348ded2c0a1d

              

Contract source code

// SPDX-License-Identifier: No License (None)
pragma solidity 0.8.19;

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

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

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

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

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

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function decimals() external view returns (uint8);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function approve(address spender, uint256 amount) external returns (bool);
}

interface IVesting {
    function allocateTokens(
        address to, // beneficiary of tokens
        uint256 amount, // amount of token
        uint256 unlockPercentage,   // percentage (with 2 decimals) of initially unlocked token
        uint256 cliffFinish,       // Timestamp (unix time) when starts vesting. First vesting will be at this time
        uint256 vestingPercentage,  // percentage (with 2 decimals) of tokens will be unlocked every interval (i.e. 10% per 30 days)
        uint256 vestingInterval     // interval (in seconds) of vesting (i.e. 30 days)
    ) external;
}

contract ICO is Ownable {
    address public ICOtoken;    // ICO token and receiving token must have 18 decimals
    address public vestingContract; 
    address public paymentToken = 0xbf6c50889d3a620eb42C0F188b65aDe90De958c4; //BUSDT

    uint256 public unlockPercentage = 500; // 5% - percentage (with 2 decimals) of initially unlocked token
    uint256 public cliffPeriod = 180 days;    // cliff period (in seconds)
    uint256 public vestingPercentage = 500;        // 5% - percentage (with 2 decimals) of locked tokens will be unlocked every interval (i.e. 5% per 30 days)
    uint256 public vestingInterval = 30 days;     // interval (in seconds) of vesting (i.e. 30 days)
    uint256 public bonusReserve = 16 * 10**6 * 10**18;  // 16M 
    uint256 public bonusPercentage = 2500;  // 25% (with two decimals)
    uint256 public bonusActivator = 1000;   // 10% (with two decimals) of round amount

    uint256 public startDate = 1708941600; // 26 February 2024, 10:00:00 UTC

    struct Round {
        uint256 amount;     // amount of tokens to sell in this round
        uint128 price;      // price per token (in payTokens value)
        uint128 roundStarts; // timestamp when round starts
        uint256 totalSold;  // amount of tokens sold 
        uint256 totalReceived;  // total payments received in round
    }

    Round[] public rounds;      // return info about arbitrary round
    uint256 public currentRound;
    bool public isPause;

    event BuyToken(address buyer, uint256 round, uint256 amountToPay, uint256 amountToBuy, uint256 bonus);
    event RoundEnds(uint256 round, uint256 starTime, uint256 endTime, uint256 lastSoldAmount);
    event SetBonusData(
        uint256 _bonusReserve,     // amount of bonus reserve
        uint256 _bonusPercentage,  // bonus rewards % (with two decimals)
        uint256 _bonusActivator    // bonus activator % (with two decimals) of round amount
    );

    constructor (address _ICOtoken, address _vestingContract) {
        ICOtoken = _ICOtoken;
        vestingContract = _vestingContract;
        IERC20(_ICOtoken).approve(_vestingContract, type(uint256).max);
    }

    modifier checkRound() {
        require(currentRound < rounds.length, "ICO finished");
        require(block.timestamp >= startDate, "ICO is not started yet");
        require(!isPause, "ICO is paused");
        _;
    }

    // Buy ICO tokens
    function buyToken(
        uint256 amountToBuy,    // amount of token to buy
        address buyer           // buyer address
    ) public checkRound {
        require(buyer != address(0), "Incorrect buyer");
        uint256 _currentRound = currentRound;   // use local variable to save gas
        Round storage r = rounds[_currentRound];
        if(r.roundStarts == 0) {
            if(_currentRound == 0) r.roundStarts = uint128(startDate);
            else r.roundStarts = uint128(block.timestamp);
        }

        if(r.totalSold + amountToBuy >= r.amount) {
            amountToBuy = r.amount - r.totalSold;
            currentRound++;
            emit RoundEnds(_currentRound, r.roundStarts, block.timestamp, amountToBuy);
        }

        uint256 amountToPay = amountToBuy * r.price / 1e18;
        r.totalSold += amountToBuy;
        r.totalReceived += amountToPay;
        safeTransferFrom(paymentToken, msg.sender, owner(), amountToPay);
        uint256 bonus = _getBonus(amountToBuy, r.amount);
        // set vesting
        uint256 finishVesting = block.timestamp + cliffPeriod;
        uint256 unlockedAmount = (amountToBuy + bonus) * unlockPercentage / 10000;
        uint256 lockedAmount = (amountToBuy + bonus) - unlockedAmount;
        if (lockedAmount != 0) {
            //safeTransfer(ICOtoken, vestingContract, lockedAmount);
            IVesting(vestingContract).allocateTokens(buyer, lockedAmount, 0, finishVesting, vestingPercentage, vestingInterval);
        }
        safeTransfer(ICOtoken, buyer, unlockedAmount);
        emit BuyToken(buyer, _currentRound, amountToPay, amountToBuy, bonus);
    }

    function _getBonus(uint256 amountToBuy, uint256 roundAmount) internal returns(uint256 bonus) {
        if (amountToBuy >= roundAmount * bonusActivator / 10000 && bonusReserve != 0) {
            bonus = amountToBuy * bonusPercentage / 10000;
            if (bonus > bonusReserve) bonus = bonusReserve;
            bonusReserve -= bonus;
        }
    }

    function addRound(
        uint256 amount,     // amount of tokens to sell in this round
        uint128 price       // price per token (in USD with 18 decimals)     
    ) external onlyOwner {
        rounds.push(Round(amount, price, 0, 0, 0));
    }

    function changRound(
        uint256 roundId,    // round to change
        uint256 amount,     // amount of tokens to sell in this round
        uint128 price       // price per token (in USD with 18 decimals) 
    ) external onlyOwner {
        require(roundId < rounds.length, "wrong round id");
        rounds[roundId].amount = amount;
        rounds[roundId].price = price;
    }

    function getRoundsNumber() external view returns(uint256 roundsNumber) {
        return rounds.length;
    }

    // return info about current round
    function getCurrentRound() external view returns(Round memory r) {
        if(currentRound < rounds.length) r = rounds[currentRound];
    }
    
    function setPause(bool pause) external onlyOwner {
        isPause = pause;
    }

    function setStartDate(uint256 _startDate) external onlyOwner {
        startDate = _startDate;
    }

    function setVesting(
        address _vestingContract,  // address of vesting contract or address(0) to don't change
        uint256 _unlockPercentage, // percentage of initially unlocked token
        uint256 _cliffPeriod,    // vesting period (in seconds)
        uint256 _vestingPercentage,  // percentage of locked tokens will be unlocked every interval (i.e. 10% per 30 days)
        uint256 _vestingInterval     // interval (in seconds) of vesting (i.e. 30 days)
    ) external onlyOwner {
        if(vestingContract != _vestingContract && _vestingContract != address(0)) {
            IERC20(ICOtoken).approve(vestingContract, 0);
            IERC20(ICOtoken).approve(_vestingContract, type(uint256).max);
            vestingContract = _vestingContract;
        }
        unlockPercentage = _unlockPercentage;
        cliffPeriod = _cliffPeriod;
        vestingPercentage = _vestingPercentage;
        vestingInterval = _vestingInterval;
    }

    function setBonusData(
        uint256 _bonusReserve,     // amount of bonus reserve
        uint256 _bonusPercentage,  // bonus rewards % (with two decimals)
        uint256 _bonusActivator    // bonus activator % (with two decimals) of round amount
    ) external onlyOwner {
        bonusPercentage = _bonusPercentage;
        bonusActivator = _bonusActivator;
        if(_bonusReserve > bonusReserve) {
            uint256 addAmount = _bonusReserve - bonusReserve;
            safeTransferFrom(ICOtoken, msg.sender, address(this), addAmount);
        } else if (_bonusReserve < bonusReserve) {
            uint256 subAmount = bonusReserve - _bonusReserve;
            safeTransfer(ICOtoken, msg.sender, subAmount);
        }
        bonusReserve = _bonusReserve;

        emit SetBonusData(_bonusReserve, _bonusPercentage, _bonusActivator);
    }

    // allow to receive ERC223 tokens
    function tokenReceived(address, uint256, bytes memory) external virtual returns(bytes4) {
        return this.tokenReceived.selector;
    }

    event Rescue(address _token, uint256 _amount);
    function rescueTokens(address _token) onlyOwner external {
        uint256 amount;
        if (_token == address(0)) {
            amount = address(this).balance;
            safeTransferCLO(msg.sender, amount);
        } else {
            amount = IERC20(_token).balanceOf(address(this));
            safeTransfer(_token, msg.sender, amount);
        }
        emit Rescue(_token, amount);
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferCLO(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: CLO_TRANSFER_FAILED');
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_ICOtoken","internalType":"address"},{"type":"address","name":"_vestingContract","internalType":"address"}]},{"type":"event","name":"BuyToken","inputs":[{"type":"address","name":"buyer","internalType":"address","indexed":false},{"type":"uint256","name":"round","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountToPay","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountToBuy","internalType":"uint256","indexed":false},{"type":"uint256","name":"bonus","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Rescue","inputs":[{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"uint256","name":"_amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RoundEnds","inputs":[{"type":"uint256","name":"round","internalType":"uint256","indexed":false},{"type":"uint256","name":"starTime","internalType":"uint256","indexed":false},{"type":"uint256","name":"endTime","internalType":"uint256","indexed":false},{"type":"uint256","name":"lastSoldAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetBonusData","inputs":[{"type":"uint256","name":"_bonusReserve","internalType":"uint256","indexed":false},{"type":"uint256","name":"_bonusPercentage","internalType":"uint256","indexed":false},{"type":"uint256","name":"_bonusActivator","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ICOtoken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addRound","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint128","name":"price","internalType":"uint128"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bonusActivator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bonusPercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bonusReserve","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"buyToken","inputs":[{"type":"uint256","name":"amountToBuy","internalType":"uint256"},{"type":"address","name":"buyer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changRound","inputs":[{"type":"uint256","name":"roundId","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint128","name":"price","internalType":"uint128"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cliffPeriod","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentRound","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"r","internalType":"struct ICO.Round","components":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint128","name":"price","internalType":"uint128"},{"type":"uint128","name":"roundStarts","internalType":"uint128"},{"type":"uint256","name":"totalSold","internalType":"uint256"},{"type":"uint256","name":"totalReceived","internalType":"uint256"}]}],"name":"getCurrentRound","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"roundsNumber","internalType":"uint256"}],"name":"getRoundsNumber","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"paymentToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueTokens","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint128","name":"price","internalType":"uint128"},{"type":"uint128","name":"roundStarts","internalType":"uint128"},{"type":"uint256","name":"totalSold","internalType":"uint256"},{"type":"uint256","name":"totalReceived","internalType":"uint256"}],"name":"rounds","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBonusData","inputs":[{"type":"uint256","name":"_bonusReserve","internalType":"uint256"},{"type":"uint256","name":"_bonusPercentage","internalType":"uint256"},{"type":"uint256","name":"_bonusActivator","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPause","inputs":[{"type":"bool","name":"pause","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStartDate","inputs":[{"type":"uint256","name":"_startDate","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setVesting","inputs":[{"type":"address","name":"_vestingContract","internalType":"address"},{"type":"uint256","name":"_unlockPercentage","internalType":"uint256"},{"type":"uint256","name":"_cliffPeriod","internalType":"uint256"},{"type":"uint256","name":"_vestingPercentage","internalType":"uint256"},{"type":"uint256","name":"_vestingInterval","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startDate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"tokenReceived","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"unlockPercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"vestingContract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"vestingInterval","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"vestingPercentage","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x6080604052600380546001600160a01b03191673bf6c50889d3a620eb42c0f188b65ade90de958c41790556101f4600481905562ed4e0060055560065562278d006007556a0d3c21bcecceda100000006008556109c46009556103e8600a556365dc6120600b553480156200007357600080fd5b5060405162001a4038038062001a40833981016040819052620000969162000197565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600180546001600160a01b038481166001600160a01b031992831681179093556002805491851691909216811790915560405163095ea7b360e01b81526004810191909152600019602482015263095ea7b3906044016020604051808303816000875af11580156200014b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001719190620001cf565b505050620001fa565b80516001600160a01b03811681146200019257600080fd5b919050565b60008060408385031215620001ab57600080fd5b620001b6836200017a565b9150620001c6602084016200017a565b90509250929050565b600060208284031215620001e257600080fd5b81518015158114620001f357600080fd5b9392505050565b611836806200020a6000396000f3fe608060405234801561001057600080fd5b50600436106101a85760003560e01c806382d95df5116100f9578063a32bf59711610097578063bedb86fb11610071578063bedb86fb146103c5578063f2fde38b146103d8578063ff0938a7146103eb578063ff55d6f61461040857600080fd5b8063a32bf5971461035a578063aad83605146103b3578063b8e50cab146103bc57600080fd5b80638c65c81f116100d35780638c65c81f146102dc5780638da5cb5b146103235780639134709e1461033457806396f03a431461034757600080fd5b806382d95df51461028a5780638943ec021461029d5780638a19c8bc146102d357600080fd5b80633b3fba16116101665780635e6f6045116101405780635e6f6045146102535780636de2fa9514610266578063801592a21461026e578063813d6c9a1461028157600080fd5b80633b3fba161461022e5780634651cf611461023757806346ff80ee1461024057600080fd5b8062ae3bf8146101ad5780630b97bc86146101c2578063106f3bbb146101de5780632a2eddde146101e75780632f661946146101fa5780633013ce2914610203575b600080fd5b6101c06101bb36600461146f565b61041b565b005b6101cb600b5481565b6040519081526020015b60405180910390f35b6101cb60065481565b6101c06101f5366004611491565b610539565b6101cb60055481565b600354610216906001600160a01b031681565b6040516001600160a01b0390911681526020016101d5565b6101cb60045481565b6101cb60085481565b600154610216906001600160a01b031681565b600254610216906001600160a01b031681565b600c546101cb565b6101c061027c3660046114d3565b6106c1565b6101cb60095481565b6101c06102983660046114ff565b6107c0565b6102ba6102ab36600461152e565b6344a1f60160e11b9392505050565b6040516001600160e01b031990911681526020016101d5565b6101cb600d5481565b6102ef6102ea3660046114ff565b6107fe565b604080519586526001600160801b03948516602087015292909316918401919091526060830152608082015260a0016101d5565b6000546001600160a01b0316610216565b6101c06103423660046115f9565b61084c565b6101c061035536600461163c565b610c94565b610362610dc1565b6040516101d59190600060a0820190508251825260208301516001600160801b0380821660208501528060408601511660408501525050606083015160608301526080830151608083015292915050565b6101cb600a5481565b6101cb60075481565b6101c06103d3366004611670565b610e87565b6101c06103e636600461146f565b610ed3565b600e546103f89060ff1681565b60405190151581526020016101d5565b6101c061041636600461168d565b610fcc565b3361042e6000546001600160a01b031690565b6001600160a01b03161461045d5760405162461bcd60e51b8152600401610454906116c2565b60405180910390fd5b60006001600160a01b03821661047e57504761047933826110be565b6104f3565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e691906116f7565b90506104f382338361118c565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b3361054c6000546001600160a01b031690565b6001600160a01b0316146105725760405162461bcd60e51b8152600401610454906116c2565b6002546001600160a01b0386811691161480159061059857506001600160a01b03851615155b156106ac5760015460025460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291169063095ea7b3906044016020604051808303816000875af11580156105f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106169190611710565b5060015460405163095ea7b360e01b81526001600160a01b03878116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af115801561066b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068f9190611710565b50600280546001600160a01b0319166001600160a01b0387161790555b60049390935560059190915560065560075550565b336106d46000546001600160a01b031690565b6001600160a01b0316146106fa5760405162461bcd60e51b8152600401610454906116c2565b6009829055600a81905560085483111561073f5760006008548461071e9190611743565b600154909150610739906001600160a01b03163330846112a7565b50610775565b600854831015610775576000836008546107599190611743565b600154909150610773906001600160a01b0316338361118c565b505b600883905560408051848152602081018490529081018290527f875bc5c339954a81b6883aa7764366b13459cdd51112fd608fcfb0a22217fbe79060600160405180910390a1505050565b336107d36000546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b8152600401610454906116c2565b600b55565b600c818154811061080e57600080fd5b600091825260209091206004909102018054600182015460028301546003909301549193506001600160801b0380821693600160801b909204169185565b600c54600d541061088e5760405162461bcd60e51b815260206004820152600c60248201526b1250d3c8199a5b9a5cda195960a21b6044820152606401610454565b600b544210156108d95760405162461bcd60e51b81526020600482015260166024820152751250d3c81a5cc81b9bdd081cdd185c9d1959081e595d60521b6044820152606401610454565b600e5460ff161561091c5760405162461bcd60e51b815260206004820152600d60248201526c1250d3c81a5cc81c185d5cd959609a1b6044820152606401610454565b6001600160a01b0381166109645760405162461bcd60e51b815260206004820152600f60248201526e24b731b7b93932b1ba10313abcb2b960891b6044820152606401610454565b6000600d5490506000600c828154811061098057610980611756565b600091825260208220600491909102016001810154909250600160801b90046001600160801b031690036109fa57816000036109dd57600b546001820180546001600160801b03928316600160801b0292169190911790556109fa565b6001810180546001600160801b03428116600160801b0291161790555b80546002820154610a0c90869061176c565b10610a955760028101548154610a229190611743565b600d80549195506000610a348361177f565b9091555050600181015460408051848152600160801b9092046001600160801b031660208301524290820152606081018590527fd973376a4b0ebcb1d15c59c5c42583e7edb997119e5246d6888e26c5d0229ad99060800160405180910390a15b6001810154600090670de0b6b3a764000090610aba906001600160801b031687611798565b610ac491906117af565b905084826002016000828254610ada919061176c565b9250508190555080826003016000828254610af5919061176c565b9091555050600354610b23906001600160a01b031633610b1d6000546001600160a01b031690565b846112a7565b6000610b338684600001546113d7565b9050600060055442610b45919061176c565b90506000612710600454848a610b5b919061176c565b610b659190611798565b610b6f91906117af565b9050600081610b7e858b61176c565b610b889190611743565b90508015610c1a576002546006546007546040516335ebd4bd60e11b81526001600160a01b038c81166004830152602482018690526000604483015260648201889052608482019390935260a4810191909152911690636bd7a97a9060c401600060405180830381600087803b158015610c0157600080fd5b505af1158015610c15573d6000803e3d6000fd5b505050505b600154610c31906001600160a01b0316898461118c565b604080516001600160a01b038a16815260208101899052908101869052606081018a9052608081018590527f88ec88080cc26f1cd03f72bfe52eb411992bd2c91c32bcdf596693ed20e9d85d9060a00160405180910390a1505050505050505050565b33610ca76000546001600160a01b031690565b6001600160a01b031614610ccd5760405162461bcd60e51b8152600401610454906116c2565b6040805160a0810182529283526001600160801b039182166020840190815260009184018281526060850183815260808601848152600c80546001810182559552955160049094027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7810194909455915190518416600160801b029316929092177fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c882015590517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c982015590517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca90910155565b610e056040518060a001604052806000815260200160006001600160801b0316815260200160006001600160801b0316815260200160008152602001600081525090565b600c54600d541015610e8457600c600d5481548110610e2657610e26611756565b60009182526020918290206040805160a08101825260049093029091018054835260018101546001600160801b0380821695850195909552600160801b90049093169082015260028201546060820152600390910154608082015290505b90565b33610e9a6000546001600160a01b031690565b6001600160a01b031614610ec05760405162461bcd60e51b8152600401610454906116c2565b600e805460ff1916911515919091179055565b33610ee66000546001600160a01b031690565b6001600160a01b031614610f0c5760405162461bcd60e51b8152600401610454906116c2565b6001600160a01b038116610f715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610454565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610fdf6000546001600160a01b031690565b6001600160a01b0316146110055760405162461bcd60e51b8152600401610454906116c2565b600c5483106110475760405162461bcd60e51b815260206004820152600e60248201526d1ddc9bdb99c81c9bdd5b99081a5960921b6044820152606401610454565b81600c848154811061105b5761105b611756565b90600052602060002090600402016000018190555080600c848154811061108457611084611756565b906000526020600020906004020160010160006101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b604080516000808252602082019092526001600160a01b0384169083906040516110e891906117d1565b60006040518083038185875af1925050503d8060008114611125576040519150601f19603f3d011682016040523d82523d6000602084013e61112a565b606091505b50509050806111875760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b6064820152608401610454565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916111e891906117d1565b6000604051808303816000865af19150503d8060008114611225576040519150601f19603f3d011682016040523d82523d6000602084013e61122a565b606091505b50915091508180156112545750805115806112545750808060200190518101906112549190611710565b6112a05760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610454565b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161130b91906117d1565b6000604051808303816000865af19150503d8060008114611348576040519150601f19603f3d011682016040523d82523d6000602084013e61134d565b606091505b50915091508180156113775750805115806113775750808060200190518101906113779190611710565b6113cf5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b6064820152608401610454565b505050505050565b6000612710600a54836113ea9190611798565b6113f491906117af565b8310158015611404575060085415155b1561144d576127106009548461141a9190611798565b61142491906117af565b905060085481111561143557506008545b80600860008282546114479190611743565b90915550505b92915050565b80356001600160a01b038116811461146a57600080fd5b919050565b60006020828403121561148157600080fd5b61148a82611453565b9392505050565b600080600080600060a086880312156114a957600080fd5b6114b286611453565b97602087013597506040870135966060810135965060800135945092505050565b6000806000606084860312156114e857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561151157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561154357600080fd5b61154c84611453565b925060208401359150604084013567ffffffffffffffff8082111561157057600080fd5b818601915086601f83011261158457600080fd5b81358181111561159657611596611518565b604051601f8201601f19908116603f011681019083821181831017156115be576115be611518565b816040528281528960208487010111156115d757600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806040838503121561160c57600080fd5b8235915061161c60208401611453565b90509250929050565b80356001600160801b038116811461146a57600080fd5b6000806040838503121561164f57600080fd5b8235915061161c60208401611625565b801515811461166d57600080fd5b50565b60006020828403121561168257600080fd5b813561148a8161165f565b6000806000606084860312156116a257600080fd5b83359250602084013591506116b960408501611625565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561170957600080fd5b5051919050565b60006020828403121561172257600080fd5b815161148a8161165f565b634e487b7160e01b600052601160045260246000fd5b8181038181111561144d5761144d61172d565b634e487b7160e01b600052603260045260246000fd5b8082018082111561144d5761144d61172d565b6000600182016117915761179161172d565b5060010190565b808202811582820484141761144d5761144d61172d565b6000826117cc57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b818110156117f257602081860181015185830152016117d8565b50600092019182525091905056fea2646970667358221220083e55612f219b2320e78229009c2934b359436c3fff6583a1b83f7ebb6f802b64736f6c63430008130033000000000000000000000000df4da43dd3e9918f0784f8c92b8aa1b304c43243000000000000000000000000e5a5837b96176d6e47e541f186b2348ded2c0a1d

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101a85760003560e01c806382d95df5116100f9578063a32bf59711610097578063bedb86fb11610071578063bedb86fb146103c5578063f2fde38b146103d8578063ff0938a7146103eb578063ff55d6f61461040857600080fd5b8063a32bf5971461035a578063aad83605146103b3578063b8e50cab146103bc57600080fd5b80638c65c81f116100d35780638c65c81f146102dc5780638da5cb5b146103235780639134709e1461033457806396f03a431461034757600080fd5b806382d95df51461028a5780638943ec021461029d5780638a19c8bc146102d357600080fd5b80633b3fba16116101665780635e6f6045116101405780635e6f6045146102535780636de2fa9514610266578063801592a21461026e578063813d6c9a1461028157600080fd5b80633b3fba161461022e5780634651cf611461023757806346ff80ee1461024057600080fd5b8062ae3bf8146101ad5780630b97bc86146101c2578063106f3bbb146101de5780632a2eddde146101e75780632f661946146101fa5780633013ce2914610203575b600080fd5b6101c06101bb36600461146f565b61041b565b005b6101cb600b5481565b6040519081526020015b60405180910390f35b6101cb60065481565b6101c06101f5366004611491565b610539565b6101cb60055481565b600354610216906001600160a01b031681565b6040516001600160a01b0390911681526020016101d5565b6101cb60045481565b6101cb60085481565b600154610216906001600160a01b031681565b600254610216906001600160a01b031681565b600c546101cb565b6101c061027c3660046114d3565b6106c1565b6101cb60095481565b6101c06102983660046114ff565b6107c0565b6102ba6102ab36600461152e565b6344a1f60160e11b9392505050565b6040516001600160e01b031990911681526020016101d5565b6101cb600d5481565b6102ef6102ea3660046114ff565b6107fe565b604080519586526001600160801b03948516602087015292909316918401919091526060830152608082015260a0016101d5565b6000546001600160a01b0316610216565b6101c06103423660046115f9565b61084c565b6101c061035536600461163c565b610c94565b610362610dc1565b6040516101d59190600060a0820190508251825260208301516001600160801b0380821660208501528060408601511660408501525050606083015160608301526080830151608083015292915050565b6101cb600a5481565b6101cb60075481565b6101c06103d3366004611670565b610e87565b6101c06103e636600461146f565b610ed3565b600e546103f89060ff1681565b60405190151581526020016101d5565b6101c061041636600461168d565b610fcc565b3361042e6000546001600160a01b031690565b6001600160a01b03161461045d5760405162461bcd60e51b8152600401610454906116c2565b60405180910390fd5b60006001600160a01b03821661047e57504761047933826110be565b6104f3565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e691906116f7565b90506104f382338361118c565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b3361054c6000546001600160a01b031690565b6001600160a01b0316146105725760405162461bcd60e51b8152600401610454906116c2565b6002546001600160a01b0386811691161480159061059857506001600160a01b03851615155b156106ac5760015460025460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291169063095ea7b3906044016020604051808303816000875af11580156105f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106169190611710565b5060015460405163095ea7b360e01b81526001600160a01b03878116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af115801561066b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068f9190611710565b50600280546001600160a01b0319166001600160a01b0387161790555b60049390935560059190915560065560075550565b336106d46000546001600160a01b031690565b6001600160a01b0316146106fa5760405162461bcd60e51b8152600401610454906116c2565b6009829055600a81905560085483111561073f5760006008548461071e9190611743565b600154909150610739906001600160a01b03163330846112a7565b50610775565b600854831015610775576000836008546107599190611743565b600154909150610773906001600160a01b0316338361118c565b505b600883905560408051848152602081018490529081018290527f875bc5c339954a81b6883aa7764366b13459cdd51112fd608fcfb0a22217fbe79060600160405180910390a1505050565b336107d36000546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b8152600401610454906116c2565b600b55565b600c818154811061080e57600080fd5b600091825260209091206004909102018054600182015460028301546003909301549193506001600160801b0380821693600160801b909204169185565b600c54600d541061088e5760405162461bcd60e51b815260206004820152600c60248201526b1250d3c8199a5b9a5cda195960a21b6044820152606401610454565b600b544210156108d95760405162461bcd60e51b81526020600482015260166024820152751250d3c81a5cc81b9bdd081cdd185c9d1959081e595d60521b6044820152606401610454565b600e5460ff161561091c5760405162461bcd60e51b815260206004820152600d60248201526c1250d3c81a5cc81c185d5cd959609a1b6044820152606401610454565b6001600160a01b0381166109645760405162461bcd60e51b815260206004820152600f60248201526e24b731b7b93932b1ba10313abcb2b960891b6044820152606401610454565b6000600d5490506000600c828154811061098057610980611756565b600091825260208220600491909102016001810154909250600160801b90046001600160801b031690036109fa57816000036109dd57600b546001820180546001600160801b03928316600160801b0292169190911790556109fa565b6001810180546001600160801b03428116600160801b0291161790555b80546002820154610a0c90869061176c565b10610a955760028101548154610a229190611743565b600d80549195506000610a348361177f565b9091555050600181015460408051848152600160801b9092046001600160801b031660208301524290820152606081018590527fd973376a4b0ebcb1d15c59c5c42583e7edb997119e5246d6888e26c5d0229ad99060800160405180910390a15b6001810154600090670de0b6b3a764000090610aba906001600160801b031687611798565b610ac491906117af565b905084826002016000828254610ada919061176c565b9250508190555080826003016000828254610af5919061176c565b9091555050600354610b23906001600160a01b031633610b1d6000546001600160a01b031690565b846112a7565b6000610b338684600001546113d7565b9050600060055442610b45919061176c565b90506000612710600454848a610b5b919061176c565b610b659190611798565b610b6f91906117af565b9050600081610b7e858b61176c565b610b889190611743565b90508015610c1a576002546006546007546040516335ebd4bd60e11b81526001600160a01b038c81166004830152602482018690526000604483015260648201889052608482019390935260a4810191909152911690636bd7a97a9060c401600060405180830381600087803b158015610c0157600080fd5b505af1158015610c15573d6000803e3d6000fd5b505050505b600154610c31906001600160a01b0316898461118c565b604080516001600160a01b038a16815260208101899052908101869052606081018a9052608081018590527f88ec88080cc26f1cd03f72bfe52eb411992bd2c91c32bcdf596693ed20e9d85d9060a00160405180910390a1505050505050505050565b33610ca76000546001600160a01b031690565b6001600160a01b031614610ccd5760405162461bcd60e51b8152600401610454906116c2565b6040805160a0810182529283526001600160801b039182166020840190815260009184018281526060850183815260808601848152600c80546001810182559552955160049094027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7810194909455915190518416600160801b029316929092177fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c882015590517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c982015590517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8ca90910155565b610e056040518060a001604052806000815260200160006001600160801b0316815260200160006001600160801b0316815260200160008152602001600081525090565b600c54600d541015610e8457600c600d5481548110610e2657610e26611756565b60009182526020918290206040805160a08101825260049093029091018054835260018101546001600160801b0380821695850195909552600160801b90049093169082015260028201546060820152600390910154608082015290505b90565b33610e9a6000546001600160a01b031690565b6001600160a01b031614610ec05760405162461bcd60e51b8152600401610454906116c2565b600e805460ff1916911515919091179055565b33610ee66000546001600160a01b031690565b6001600160a01b031614610f0c5760405162461bcd60e51b8152600401610454906116c2565b6001600160a01b038116610f715760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610454565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610fdf6000546001600160a01b031690565b6001600160a01b0316146110055760405162461bcd60e51b8152600401610454906116c2565b600c5483106110475760405162461bcd60e51b815260206004820152600e60248201526d1ddc9bdb99c81c9bdd5b99081a5960921b6044820152606401610454565b81600c848154811061105b5761105b611756565b90600052602060002090600402016000018190555080600c848154811061108457611084611756565b906000526020600020906004020160010160006101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b604080516000808252602082019092526001600160a01b0384169083906040516110e891906117d1565b60006040518083038185875af1925050503d8060008114611125576040519150601f19603f3d011682016040523d82523d6000602084013e61112a565b606091505b50509050806111875760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b6064820152608401610454565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916111e891906117d1565b6000604051808303816000865af19150503d8060008114611225576040519150601f19603f3d011682016040523d82523d6000602084013e61122a565b606091505b50915091508180156112545750805115806112545750808060200190518101906112549190611710565b6112a05760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610454565b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161130b91906117d1565b6000604051808303816000865af19150503d8060008114611348576040519150601f19603f3d011682016040523d82523d6000602084013e61134d565b606091505b50915091508180156113775750805115806113775750808060200190518101906113779190611710565b6113cf5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b6064820152608401610454565b505050505050565b6000612710600a54836113ea9190611798565b6113f491906117af565b8310158015611404575060085415155b1561144d576127106009548461141a9190611798565b61142491906117af565b905060085481111561143557506008545b80600860008282546114479190611743565b90915550505b92915050565b80356001600160a01b038116811461146a57600080fd5b919050565b60006020828403121561148157600080fd5b61148a82611453565b9392505050565b600080600080600060a086880312156114a957600080fd5b6114b286611453565b97602087013597506040870135966060810135965060800135945092505050565b6000806000606084860312156114e857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561151157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561154357600080fd5b61154c84611453565b925060208401359150604084013567ffffffffffffffff8082111561157057600080fd5b818601915086601f83011261158457600080fd5b81358181111561159657611596611518565b604051601f8201601f19908116603f011681019083821181831017156115be576115be611518565b816040528281528960208487010111156115d757600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000806040838503121561160c57600080fd5b8235915061161c60208401611453565b90509250929050565b80356001600160801b038116811461146a57600080fd5b6000806040838503121561164f57600080fd5b8235915061161c60208401611625565b801515811461166d57600080fd5b50565b60006020828403121561168257600080fd5b813561148a8161165f565b6000806000606084860312156116a257600080fd5b83359250602084013591506116b960408501611625565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561170957600080fd5b5051919050565b60006020828403121561172257600080fd5b815161148a8161165f565b634e487b7160e01b600052601160045260246000fd5b8181038181111561144d5761144d61172d565b634e487b7160e01b600052603260045260246000fd5b8082018082111561144d5761144d61172d565b6000600182016117915761179161172d565b5060010190565b808202811582820484141761144d5761144d61172d565b6000826117cc57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b818110156117f257602081860181015185830152016117d8565b50600092019182525091905056fea2646970667358221220083e55612f219b2320e78229009c2934b359436c3fff6583a1b83f7ebb6f802b64736f6c63430008130033