Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
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:14.460755Z
Constructor Arguments
0x000000000000000000000000e1a77164e5c6d9e0fc0b23d11e0874de6b328e68000000000000000000000000998e30f94eb06883d6bb7d7a6ffcff37c5a0e562
Arg [0] (address) : 0xe1a77164e5c6d9e0fc0b23d11e0874de6b328e68
Arg [1] (address) : 0x998e30f94eb06883d6bb7d7a6ffcff37c5a0e562
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 of initially unlocked token uint256 finishVesting, // Timestamp (unix time) when starts vesting. First vesting will be at this time uint256 cliffPercentage, // percentage of tokens will be unlocked every interval (i.e. 10% per 30 days) uint256 cliffInterval // 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 = 0x7873d09AF3d6965988831C60c7D38DBbd2eAEAB0; // test4 address public paymentToken = 0xbf6c50889d3a620eb42C0F188b65aDe90De958c4; //BUSDT uint256 public unlockPercentage = 5; // percentage of initially unlocked token uint256 public vestingPeriod = 60 minutes;//180 days; // vesting period (in seconds) uint256 public cliffPercentage = 5; // percentage of locked tokens will be unlocked every interval (i.e. 10% per 30 days) uint256 public cliffInterval = 30 minutes; //30 days; // interval (in seconds) of vesting (i.e. 30 days) uint256 public startDate = 1707483000; 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; uint256 public currentRound; bool public isPause; event BuyToken(uint256 round, uint256 amountToPay, uint256 amountToBuy); event RoundEnds(uint256 round, uint256 starTime, uint256 endTime, uint256 lastSoldAmount); 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); // set vesting uint256 finishVesting = block.timestamp + vestingPeriod; uint256 unlockedAmount = amountToBuy * unlockPercentage / 100; uint256 lockedAmount = amountToBuy - unlockedAmount; if (lockedAmount != 0) { //safeTransfer(ICOtoken, vestingContract, lockedAmount); IVesting(vestingContract).allocateTokens(buyer, lockedAmount, 0, finishVesting, cliffPercentage, cliffInterval); } safeTransfer(ICOtoken, buyer, unlockedAmount); emit BuyToken(_currentRound, amountToPay, amountToBuy); } 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 > 0 && roundId < rounds.length, "wrong round id"); rounds[roundId].amount = amount; rounds[roundId].price = price; } function getRoundsNumber() external view returns(uint256 roundsNumber) { return rounds.length; } 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 _vestingPeriod, // vesting period (in seconds) uint256 _cliffPercentage, // percentage of locked tokens will be unlocked every interval (i.e. 10% per 30 days) uint256 _cliffInterval // 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; vestingPeriod = _vestingPeriod; cliffPercentage = _cliffPercentage; cliffInterval = _cliffInterval; } // 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":"uint256","name":"round","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountToPay","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountToBuy","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":"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":"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":"cliffInterval","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cliffPercentage","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":"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":"_vestingPeriod","internalType":"uint256"},{"type":"uint256","name":"_cliffPercentage","internalType":"uint256"},{"type":"uint256","name":"_cliffInterval","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":"vestingPeriod","inputs":[]}]
Contract Creation Code
0x6080604052600380546001600160a01b03191673bf6c50889d3a620eb42c0f188b65ade90de958c417905560056004819055610e1081556006556107086007556365c61f786008553480156200005457600080fd5b50604051620017c1380380620017c1833981016040819052620000779162000178565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3600180546001600160a01b038481166001600160a01b031992831681179093556002805491851691909216811790915560405163095ea7b360e01b81526004810191909152600019602482015263095ea7b3906044016020604051808303816000875af11580156200012c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001529190620001b0565b505050620001db565b80516001600160a01b03811681146200017357600080fd5b919050565b600080604083850312156200018c57600080fd5b62000197836200015b565b9150620001a7602084016200015b565b90509250929050565b600060208284031215620001c357600080fd5b81518015158114620001d457600080fd5b9392505050565b6115d680620001eb6000396000f3fe608060405234801561001057600080fd5b506004361061014c5760003560e01c806382d95df5116100c357806396f03a431161007c57806396f03a43146102cf578063a32bf597146102e2578063bedb86fb1461033b578063f2fde38b1461034e578063ff0938a714610361578063ff55d6f61461037e57600080fd5b806382d95df5146102125780638943ec02146102255780638a19c8bc1461025b5780638c65c81f146102645780638da5cb5b146102ab5780639134709e146102bc57600080fd5b80633b3fba16116101155780633b3fba16146101c95780633c21e595146101d257806346ff80ee146101db5780635e6f6045146101ee5780636de2fa95146102015780637313ee5a1461020957600080fd5b8062ae3bf8146101515780630b97bc861461016657806319496ca3146101825780632a2eddde1461018b5780633013ce291461019e575b600080fd5b61016461015f366004611235565b610391565b005b61016f60085481565b6040519081526020015b60405180910390f35b61016f60075481565b610164610199366004611257565b6104af565b6003546101b1906001600160a01b031681565b6040516001600160a01b039091168152602001610179565b61016f60045481565b61016f60065481565b6001546101b1906001600160a01b031681565b6002546101b1906001600160a01b031681565b60095461016f565b61016f60055481565b610164610220366004611299565b610637565b6102426102333660046112c8565b6344a1f60160e11b9392505050565b6040516001600160e01b03199091168152602001610179565b61016f600a5481565b610277610272366004611299565b610675565b604080519586526001600160801b03948516602087015292909316918401919091526060830152608082015260a001610179565b6000546001600160a01b03166101b1565b6101646102ca366004611393565b6106c3565b6101646102dd3660046113d6565b610aca565b6102ea610bf7565b6040516101799190600060a0820190508251825260208301516001600160801b0380821660208501528060408601511660408501525050606083015160608301526080830151608083015292915050565b61016461034936600461140a565b610cbd565b61016461035c366004611235565b610d09565b600b5461036e9060ff1681565b6040519015158152602001610179565b61016461038c366004611427565b610e02565b336103a46000546001600160a01b031690565b6001600160a01b0316146103d35760405162461bcd60e51b81526004016103ca9061145c565b60405180910390fd5b60006001600160a01b0382166103f45750476103ef3382610f00565b610469565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c9190611491565b9050610469823383610fce565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b336104c26000546001600160a01b031690565b6001600160a01b0316146104e85760405162461bcd60e51b81526004016103ca9061145c565b6002546001600160a01b0386811691161480159061050e57506001600160a01b03851615155b156106225760015460025460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291169063095ea7b3906044016020604051808303816000875af1158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c91906114aa565b5060015460405163095ea7b360e01b81526001600160a01b03878116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af11580156105e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060591906114aa565b50600280546001600160a01b0319166001600160a01b0387161790555b60049390935560059190915560065560075550565b3361064a6000546001600160a01b031690565b6001600160a01b0316146106705760405162461bcd60e51b81526004016103ca9061145c565b600855565b6009818154811061068557600080fd5b600091825260209091206004909102018054600182015460028301546003909301549193506001600160801b0380821693600160801b909204169185565b600954600a54106107055760405162461bcd60e51b815260206004820152600c60248201526b1250d3c8199a5b9a5cda195960a21b60448201526064016103ca565b6008544210156107505760405162461bcd60e51b81526020600482015260166024820152751250d3c81a5cc81b9bdd081cdd185c9d1959081e595d60521b60448201526064016103ca565b600b5460ff16156107935760405162461bcd60e51b815260206004820152600d60248201526c1250d3c81a5cc81c185d5cd959609a1b60448201526064016103ca565b6001600160a01b0381166107db5760405162461bcd60e51b815260206004820152600f60248201526e24b731b7b93932b1ba10313abcb2b960891b60448201526064016103ca565b6000600a5490506000600982815481106107f7576107f76114c7565b600091825260208220600491909102016001810154909250600160801b90046001600160801b031690036108715781600003610854576008546001820180546001600160801b03928316600160801b029216919091179055610871565b6001810180546001600160801b03428116600160801b0291161790555b805460028201546108839086906114f3565b1061090c5760028101548154610899919061150c565b600a805491955060006108ab8361151f565b9091555050600181015460408051848152600160801b9092046001600160801b031660208301524290820152606081018590527fd973376a4b0ebcb1d15c59c5c42583e7edb997119e5246d6888e26c5d0229ad99060800160405180910390a15b6001810154600090670de0b6b3a764000090610931906001600160801b031687611538565b61093b919061154f565b90508482600201600082825461095191906114f3565b925050819055508082600301600082825461096c91906114f3565b909155505060035461099a906001600160a01b0316336109946000546001600160a01b031690565b846110e9565b6000600554426109aa91906114f3565b905060006064600454886109be9190611538565b6109c8919061154f565b905060006109d6828961150c565b90508015610a68576002546006546007546040516335ebd4bd60e11b81526001600160a01b038b81166004830152602482018690526000604483015260648201889052608482019390935260a4810191909152911690636bd7a97a9060c401600060405180830381600087803b158015610a4f57600080fd5b505af1158015610a63573d6000803e3d6000fd5b505050505b600154610a7f906001600160a01b03168884610fce565b60408051878152602081018690529081018990527f7d4509d62a9a0bfa9f909361919a4b05ea355e5c7d2e87328e97139d415e34f99060600160405180910390a15050505050505050565b33610add6000546001600160a01b031690565b6001600160a01b031614610b035760405162461bcd60e51b81526004016103ca9061145c565b6040805160a0810182529283526001600160801b039182166020840190815260009184018281526060850183815260808601848152600980546001810182559552955160049094027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af810194909455915190518416600160801b029316929092177f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b082015590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b182015590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b290910155565b610c3b6040518060a001604052806000815260200160006001600160801b0316815260200160006001600160801b0316815260200160008152602001600081525090565b600954600a541015610cba576009600a5481548110610c5c57610c5c6114c7565b60009182526020918290206040805160a08101825260049093029091018054835260018101546001600160801b0380821695850195909552600160801b90049093169082015260028201546060820152600390910154608082015290505b90565b33610cd06000546001600160a01b031690565b6001600160a01b031614610cf65760405162461bcd60e51b81526004016103ca9061145c565b600b805460ff1916911515919091179055565b33610d1c6000546001600160a01b031690565b6001600160a01b031614610d425760405162461bcd60e51b81526004016103ca9061145c565b6001600160a01b038116610da75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103ca565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610e156000546001600160a01b031690565b6001600160a01b031614610e3b5760405162461bcd60e51b81526004016103ca9061145c565b600083118015610e4c575060095483105b610e895760405162461bcd60e51b815260206004820152600e60248201526d1ddc9bdb99c81c9bdd5b99081a5960921b60448201526064016103ca565b8160098481548110610e9d57610e9d6114c7565b9060005260206000209060040201600001819055508060098481548110610ec657610ec66114c7565b906000526020600020906004020160010160006101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b604080516000808252602082019092526001600160a01b038416908390604051610f2a9190611571565b60006040518083038185875af1925050503d8060008114610f67576040519150601f19603f3d011682016040523d82523d6000602084013e610f6c565b606091505b5050905080610fc95760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b60648201526084016103ca565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161102a9190611571565b6000604051808303816000865af19150503d8060008114611067576040519150601f19603f3d011682016040523d82523d6000602084013e61106c565b606091505b509150915081801561109657508051158061109657508080602001905181019061109691906114aa565b6110e25760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016103ca565b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161114d9190611571565b6000604051808303816000865af19150503d806000811461118a576040519150601f19603f3d011682016040523d82523d6000602084013e61118f565b606091505b50915091508180156111b95750805115806111b95750808060200190518101906111b991906114aa565b6112115760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b60648201526084016103ca565b505050505050565b80356001600160a01b038116811461123057600080fd5b919050565b60006020828403121561124757600080fd5b61125082611219565b9392505050565b600080600080600060a0868803121561126f57600080fd5b61127886611219565b97602087013597506040870135966060810135965060800135945092505050565b6000602082840312156112ab57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156112dd57600080fd5b6112e684611219565b925060208401359150604084013567ffffffffffffffff8082111561130a57600080fd5b818601915086601f83011261131e57600080fd5b813581811115611330576113306112b2565b604051601f8201601f19908116603f01168101908382118183101715611358576113586112b2565b8160405282815289602084870101111561137157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600080604083850312156113a657600080fd5b823591506113b660208401611219565b90509250929050565b80356001600160801b038116811461123057600080fd5b600080604083850312156113e957600080fd5b823591506113b6602084016113bf565b801515811461140757600080fd5b50565b60006020828403121561141c57600080fd5b8135611250816113f9565b60008060006060848603121561143c57600080fd5b8335925060208401359150611453604085016113bf565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156114a357600080fd5b5051919050565b6000602082840312156114bc57600080fd5b8151611250816113f9565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611506576115066114dd565b92915050565b81810381811115611506576115066114dd565b600060018201611531576115316114dd565b5060010190565b8082028115828204841417611506576115066114dd565b60008261156c57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b818110156115925760208186018101518583015201611578565b50600092019182525091905056fea2646970667358221220f5f6b2a41895411e23677bb8eca84479296bcef40a9aca7d541bb073ca65a55064736f6c63430008130033000000000000000000000000e1a77164e5c6d9e0fc0b23d11e0874de6b328e68000000000000000000000000998e30f94eb06883d6bb7d7a6ffcff37c5a0e562
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061014c5760003560e01c806382d95df5116100c357806396f03a431161007c57806396f03a43146102cf578063a32bf597146102e2578063bedb86fb1461033b578063f2fde38b1461034e578063ff0938a714610361578063ff55d6f61461037e57600080fd5b806382d95df5146102125780638943ec02146102255780638a19c8bc1461025b5780638c65c81f146102645780638da5cb5b146102ab5780639134709e146102bc57600080fd5b80633b3fba16116101155780633b3fba16146101c95780633c21e595146101d257806346ff80ee146101db5780635e6f6045146101ee5780636de2fa95146102015780637313ee5a1461020957600080fd5b8062ae3bf8146101515780630b97bc861461016657806319496ca3146101825780632a2eddde1461018b5780633013ce291461019e575b600080fd5b61016461015f366004611235565b610391565b005b61016f60085481565b6040519081526020015b60405180910390f35b61016f60075481565b610164610199366004611257565b6104af565b6003546101b1906001600160a01b031681565b6040516001600160a01b039091168152602001610179565b61016f60045481565b61016f60065481565b6001546101b1906001600160a01b031681565b6002546101b1906001600160a01b031681565b60095461016f565b61016f60055481565b610164610220366004611299565b610637565b6102426102333660046112c8565b6344a1f60160e11b9392505050565b6040516001600160e01b03199091168152602001610179565b61016f600a5481565b610277610272366004611299565b610675565b604080519586526001600160801b03948516602087015292909316918401919091526060830152608082015260a001610179565b6000546001600160a01b03166101b1565b6101646102ca366004611393565b6106c3565b6101646102dd3660046113d6565b610aca565b6102ea610bf7565b6040516101799190600060a0820190508251825260208301516001600160801b0380821660208501528060408601511660408501525050606083015160608301526080830151608083015292915050565b61016461034936600461140a565b610cbd565b61016461035c366004611235565b610d09565b600b5461036e9060ff1681565b6040519015158152602001610179565b61016461038c366004611427565b610e02565b336103a46000546001600160a01b031690565b6001600160a01b0316146103d35760405162461bcd60e51b81526004016103ca9061145c565b60405180910390fd5b60006001600160a01b0382166103f45750476103ef3382610f00565b610469565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045c9190611491565b9050610469823383610fce565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b336104c26000546001600160a01b031690565b6001600160a01b0316146104e85760405162461bcd60e51b81526004016103ca9061145c565b6002546001600160a01b0386811691161480159061050e57506001600160a01b03851615155b156106225760015460025460405163095ea7b360e01b81526001600160a01b0391821660048201526000602482015291169063095ea7b3906044016020604051808303816000875af1158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c91906114aa565b5060015460405163095ea7b360e01b81526001600160a01b03878116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af11580156105e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060591906114aa565b50600280546001600160a01b0319166001600160a01b0387161790555b60049390935560059190915560065560075550565b3361064a6000546001600160a01b031690565b6001600160a01b0316146106705760405162461bcd60e51b81526004016103ca9061145c565b600855565b6009818154811061068557600080fd5b600091825260209091206004909102018054600182015460028301546003909301549193506001600160801b0380821693600160801b909204169185565b600954600a54106107055760405162461bcd60e51b815260206004820152600c60248201526b1250d3c8199a5b9a5cda195960a21b60448201526064016103ca565b6008544210156107505760405162461bcd60e51b81526020600482015260166024820152751250d3c81a5cc81b9bdd081cdd185c9d1959081e595d60521b60448201526064016103ca565b600b5460ff16156107935760405162461bcd60e51b815260206004820152600d60248201526c1250d3c81a5cc81c185d5cd959609a1b60448201526064016103ca565b6001600160a01b0381166107db5760405162461bcd60e51b815260206004820152600f60248201526e24b731b7b93932b1ba10313abcb2b960891b60448201526064016103ca565b6000600a5490506000600982815481106107f7576107f76114c7565b600091825260208220600491909102016001810154909250600160801b90046001600160801b031690036108715781600003610854576008546001820180546001600160801b03928316600160801b029216919091179055610871565b6001810180546001600160801b03428116600160801b0291161790555b805460028201546108839086906114f3565b1061090c5760028101548154610899919061150c565b600a805491955060006108ab8361151f565b9091555050600181015460408051848152600160801b9092046001600160801b031660208301524290820152606081018590527fd973376a4b0ebcb1d15c59c5c42583e7edb997119e5246d6888e26c5d0229ad99060800160405180910390a15b6001810154600090670de0b6b3a764000090610931906001600160801b031687611538565b61093b919061154f565b90508482600201600082825461095191906114f3565b925050819055508082600301600082825461096c91906114f3565b909155505060035461099a906001600160a01b0316336109946000546001600160a01b031690565b846110e9565b6000600554426109aa91906114f3565b905060006064600454886109be9190611538565b6109c8919061154f565b905060006109d6828961150c565b90508015610a68576002546006546007546040516335ebd4bd60e11b81526001600160a01b038b81166004830152602482018690526000604483015260648201889052608482019390935260a4810191909152911690636bd7a97a9060c401600060405180830381600087803b158015610a4f57600080fd5b505af1158015610a63573d6000803e3d6000fd5b505050505b600154610a7f906001600160a01b03168884610fce565b60408051878152602081018690529081018990527f7d4509d62a9a0bfa9f909361919a4b05ea355e5c7d2e87328e97139d415e34f99060600160405180910390a15050505050505050565b33610add6000546001600160a01b031690565b6001600160a01b031614610b035760405162461bcd60e51b81526004016103ca9061145c565b6040805160a0810182529283526001600160801b039182166020840190815260009184018281526060850183815260808601848152600980546001810182559552955160049094027f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af810194909455915190518416600160801b029316929092177f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b082015590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b182015590517f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7b290910155565b610c3b6040518060a001604052806000815260200160006001600160801b0316815260200160006001600160801b0316815260200160008152602001600081525090565b600954600a541015610cba576009600a5481548110610c5c57610c5c6114c7565b60009182526020918290206040805160a08101825260049093029091018054835260018101546001600160801b0380821695850195909552600160801b90049093169082015260028201546060820152600390910154608082015290505b90565b33610cd06000546001600160a01b031690565b6001600160a01b031614610cf65760405162461bcd60e51b81526004016103ca9061145c565b600b805460ff1916911515919091179055565b33610d1c6000546001600160a01b031690565b6001600160a01b031614610d425760405162461bcd60e51b81526004016103ca9061145c565b6001600160a01b038116610da75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103ca565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610e156000546001600160a01b031690565b6001600160a01b031614610e3b5760405162461bcd60e51b81526004016103ca9061145c565b600083118015610e4c575060095483105b610e895760405162461bcd60e51b815260206004820152600e60248201526d1ddc9bdb99c81c9bdd5b99081a5960921b60448201526064016103ca565b8160098481548110610e9d57610e9d6114c7565b9060005260206000209060040201600001819055508060098481548110610ec657610ec66114c7565b906000526020600020906004020160010160006101000a8154816001600160801b0302191690836001600160801b03160217905550505050565b604080516000808252602082019092526001600160a01b038416908390604051610f2a9190611571565b60006040518083038185875af1925050503d8060008114610f67576040519150601f19603f3d011682016040523d82523d6000602084013e610f6c565b606091505b5050905080610fc95760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b60648201526084016103ca565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161102a9190611571565b6000604051808303816000865af19150503d8060008114611067576040519150601f19603f3d011682016040523d82523d6000602084013e61106c565b606091505b509150915081801561109657508051158061109657508080602001905181019061109691906114aa565b6110e25760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016103ca565b5050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b179052915160009283929088169161114d9190611571565b6000604051808303816000865af19150503d806000811461118a576040519150601f19603f3d011682016040523d82523d6000602084013e61118f565b606091505b50915091508180156111b95750805115806111b95750808060200190518101906111b991906114aa565b6112115760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b60648201526084016103ca565b505050505050565b80356001600160a01b038116811461123057600080fd5b919050565b60006020828403121561124757600080fd5b61125082611219565b9392505050565b600080600080600060a0868803121561126f57600080fd5b61127886611219565b97602087013597506040870135966060810135965060800135945092505050565b6000602082840312156112ab57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156112dd57600080fd5b6112e684611219565b925060208401359150604084013567ffffffffffffffff8082111561130a57600080fd5b818601915086601f83011261131e57600080fd5b813581811115611330576113306112b2565b604051601f8201601f19908116603f01168101908382118183101715611358576113586112b2565b8160405282815289602084870101111561137157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600080604083850312156113a657600080fd5b823591506113b660208401611219565b90509250929050565b80356001600160801b038116811461123057600080fd5b600080604083850312156113e957600080fd5b823591506113b6602084016113bf565b801515811461140757600080fd5b50565b60006020828403121561141c57600080fd5b8135611250816113f9565b60008060006060848603121561143c57600080fd5b8335925060208401359150611453604085016113bf565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156114a357600080fd5b5051919050565b6000602082840312156114bc57600080fd5b8151611250816113f9565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115611506576115066114dd565b92915050565b81810381811115611506576115066114dd565b600060018201611531576115316114dd565b5060010190565b8082028115828204841417611506576115066114dd565b60008261156c57634e487b7160e01b600052601260045260246000fd5b500490565b6000825160005b818110156115925760208186018101518583015201611578565b50600092019182525091905056fea2646970667358221220f5f6b2a41895411e23677bb8eca84479296bcef40a9aca7d541bb073ca65a55064736f6c63430008130033