Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- RafflePool
- Optimization enabled
- true
- Compiler version
- v0.8.17+commit.8df45f5f
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2024-06-03T05:42:27.746710Z
Constructor Arguments
000000000000000000000000714881e622079536033d3c53165c9c852bac559b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000d706f6f6c2875696e743235362900000000000000000000000000000000000000
Arg [0] (address) : 0x714881e622079536033d3c53165c9c852bac559b
Arg [1] (string) : pool(uint256)
ÇekilişHavuz.sol
// SPDX-License-Identifier: MIT // File @openzeppelin/contracts/utils/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File @openzeppelin/contracts/access/[email protected] // Original license: SPDX_License_Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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); } } // File contracts/RafflePool.sol // Original license: SPDX_License_Identifier: MIT pragma solidity ^0.8.17; contract RafflePool is Ownable { struct Payout { uint256 from; uint256 to; uint256 amount; } struct Pool { address poolAddress; bytes4 selector; } Pool public pool; uint256[] public places; mapping(uint256 => bool) public paidTable; uint256 public currentRafflePosition = 0; uint256 public currentPayPosition = 0; Payout[] public payoutStructure; event Claimed(address indexed user, uint256 indexed index, uint256 amount); receive() external payable {} fallback() external payable {} constructor(address poolAddress_, string memory functionPrototype_) { pool.poolAddress = poolAddress_; pool.selector = bytes4(keccak256(bytes(functionPrototype_))); (bool success, ) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, 0)); require(success, "RafflePool: Invalid pool address or selector"); } function getUserInfo(address user) external view returns(uint256 place, uint256 amount) { for (uint256 i = 0; i < places.length; i++) { (bool success, bytes memory data) = pool.poolAddress.staticcall(abi.encodeWithSelector(pool.selector, i)); require(success, "RafflePool: cannot get user address"); address user_ = _bytesToAddress(data); if (user == user_) { Payout memory payout; for (uint256 j = 0; j < payoutStructure.length; j++) { payout = payoutStructure[j]; if (payout.from <= places[i] && payout.to > places[i]) { return (places[i], payout.amount); } } } } } function setPayoutStructure(uint256[] calldata payoutStructure_) external onlyOwner() { require(0 == payoutStructure.length, "RafflePool: Payout structure already set"); require(0 != payoutStructure_.length, "RafflePool: Length of payout structure cannot be 0"); require(0 == payoutStructure_.length % 3, "RafflePool: length % 3 should be 0"); uint256 pl = payoutStructure_[payoutStructure_.length - 2]; (bool success, ) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, pl - 1)); require(success, "RafflePool: Payout structure not correspond with pool"); (success, ) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, pl)); require(! success, "RafflePool: Payout structure not correspond with pool"); require(0 == payoutStructure_[0], "RafflePool: Invalid payout structure"); require(payoutStructure_[0] < payoutStructure_[1], "RafflePool: Invalid payout structure"); payoutStructure.push(Payout({ from: payoutStructure_[0], to: payoutStructure_[1], amount: payoutStructure_[2] })); for (uint256 i = 3; i < payoutStructure_.length; i += 3) { require(payoutStructure_[i] == payoutStructure[payoutStructure.length - 1].to, "RafflePool: Invalid payout structure"); require(payoutStructure_[i] < payoutStructure_[i + 1], "RafflePool: Invalid payout structure"); payoutStructure.push(Payout({ from: payoutStructure_[i], to: payoutStructure_[i + 1], amount: payoutStructure_[i + 2] })); } } function rafflePool(uint256 count_) external onlyOwner() { require(0 != payoutStructure.length, "RafflePool: Payout structure not set"); uint256 pl = payoutStructure[payoutStructure.length - 1].to; require(pl != currentRafflePosition, "RafflePool: Pool already raffled"); require(0 != count_, "RafflePool: Count must be greater than 0"); require(currentRafflePosition + count_ - 1 < pl, "RafflePool: Out of index"); bytes32 hash = bytes32(abi.encodePacked(blockhash(block.number - 1))); uint256 from = currentRafflePosition; currentRafflePosition += count_; uint256[] storage places_ = places; for (uint256 i = from; i < currentRafflePosition; i++) { places_.push(places_.length); uint256 n = uint256(hash) % (i + 1); uint256 t = places_[n]; places_[n] = places_[places_.length - 1]; places_[places_.length - 1] = t; hash = keccak256(abi.encodePacked(hash)); } } function payWithIndex(uint256 userIndex_) external { _pay(userIndex_); } function payWithCount(uint256 count_) external { require(0 != count_, "RafflePool: Count must be greater than 0"); uint256 pl = payoutStructure[payoutStructure.length - 1].to; require(currentPayPosition + count_ <= pl, "RafflePool: Out of index"); for (uint256 i = 0; i < count_; i++) { _pay(currentPayPosition); ++currentPayPosition; } } function getPayoutStructure() external view returns (Payout[] memory) { return payoutStructure; } function getPlaces() external view returns (uint256[] memory) { return places; } function withdraw(address _recipient) public onlyOwner() { payable(_recipient).transfer(address(this).balance); } /// Helper member functions function _pay(uint256 index_) private { uint256 pl = payoutStructure[payoutStructure.length - 1].to; require(pl == currentRafflePosition, "RafflePool: Raffle not ended"); require(pl > currentPayPosition, "RafflePool: Pool already paid"); if (paidTable[index_]) { return; } (bool success, bytes memory data) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, index_)); require(success, "RafflePool: Pool call failed"); address ua = _bytesToAddress(data); Payout memory payout; for (uint256 i = 0; i < payoutStructure.length; i++) { payout = payoutStructure[i]; if (payout.from <= places[index_] && places[index_] < payout.to) { paidTable[index_] = true; (success,) = payable(ua).call{ value: payout.amount }(""); require(success, "RafflePool: transfer failed"); emit Claimed(ua, index_, payout.amount); return; } } } function _bytesToAddress(bytes memory data) private pure returns (address addr) { require(data.length >= 20, "RafflePool: Invalid address data"); assembly { addr := mload(add(data, 0x20)) } } }
Compiler Settings
{"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{"ÇekilişHavuz.sol":{}},"evmVersion":"istanbul"}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"poolAddress_","internalType":"address"},{"type":"string","name":"functionPrototype_","internalType":"string"}]},{"type":"event","name":"Claimed","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","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":"fallback","stateMutability":"payable"},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentPayPosition","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentRafflePosition","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct RafflePool.Payout[]","components":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"to","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]}],"name":"getPayoutStructure","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getPlaces","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"place","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"getUserInfo","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paidTable","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"payWithCount","inputs":[{"type":"uint256","name":"count_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"payWithIndex","inputs":[{"type":"uint256","name":"userIndex_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"to","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"payoutStructure","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"places","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"poolAddress","internalType":"address"},{"type":"bytes4","name":"selector","internalType":"bytes4"}],"name":"pool","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rafflePool","inputs":[{"type":"uint256","name":"count_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPayoutStructure","inputs":[{"type":"uint256[]","name":"payoutStructure_","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"address","name":"_recipient","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x6080604052600060045560006005553480156200001b57600080fd5b5060405162001d3338038062001d338339810160408190526200003e9162000223565b620000493362000197565b60018054825160208401206001600160a01b038581166001600160c01b031990931692909217600160a01b60e092831c8102919091179384905560405160006024820181905294938416939190910490911b9060440160408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051620000df9190620002fe565b6000604051808303816000865af19150503d80600081146200011e576040519150601f19603f3d011682016040523d82523d6000602084013e62000123565b606091505b50509050806200018e5760405162461bcd60e51b815260206004820152602c60248201527f526166666c65506f6f6c3a20496e76616c696420706f6f6c206164647265737360448201526b1037b91039b2b632b1ba37b960a11b606482015260840160405180910390fd5b5050506200031c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200021a57818101518382015260200162000200565b50506000910152565b600080604083850312156200023757600080fd5b82516001600160a01b03811681146200024f57600080fd5b60208401519092506001600160401b03808211156200026d57600080fd5b818501915085601f8301126200028257600080fd5b815181811115620002975762000297620001e7565b604051601f8201601f19908116603f01168101908382118183101715620002c257620002c2620001e7565b81604052828152886020848701011115620002dc57600080fd5b620002ef836020830160208801620001fd565b80955050505050509250929050565b6000825162000312818460208701620001fd565b9190910192915050565b611a07806200032c6000396000f3fe6080604052600436106100f65760003560e01c80639494582d1161008f578063c7634a7911610061578063c7634a79146102d2578063cc5ee36514610312578063e557bb4e14610328578063f289eaa514610348578063f2fde38b1461038357005b80639494582d146102505780639c2d2d8e14610270578063a980e79f14610292578063bc23f848146102b257005b806351cff8d9116100c857806351cff8d9146101be5780636386c1c7146101de578063715018a6146102135780638da5cb5b1461022857005b806308d62b03146100ff5780630cff68271461011f57806316f0115b146101485780633b0e84de1461019c57005b366100fd57005b005b34801561010b57600080fd5b506100fd61011a3660046116ac565b6103a3565b34801561012b57600080fd5b5061013560045481565b6040519081526020015b60405180910390f35b34801561015457600080fd5b50600154610174906001600160a01b03811690600160a01b900460e01b82565b604080516001600160a01b0390931683526001600160e01b031990911660208301520161013f565b3480156101a857600080fd5b506101b161049c565b60405161013f91906116c5565b3480156101ca57600080fd5b506100fd6101d9366004611709565b6104f4565b3480156101ea57600080fd5b506101fe6101f9366004611709565b610535565b6040805192835260208301919091520161013f565b34801561021f57600080fd5b506100fd6107a2565b34801561023457600080fd5b506000546040516001600160a01b03909116815260200161013f565b34801561025c57600080fd5b506100fd61026b366004611739565b6107b6565b34801561027c57600080fd5b50610285610d82565b60405161013f91906117ae565b34801561029e57600080fd5b506100fd6102ad3660046116ac565b610dff565b3480156102be57600080fd5b506100fd6102cd3660046116ac565b6110de565b3480156102de57600080fd5b506103026102ed3660046116ac565b60036020526000908152604090205460ff1681565b604051901515815260200161013f565b34801561031e57600080fd5b5061013560055481565b34801561033457600080fd5b506101356103433660046116ac565b6110ea565b34801561035457600080fd5b506103686103633660046116ac565b61110b565b6040805193845260208401929092529082015260600161013f565b34801561038f57600080fd5b506100fd61039e366004611709565b61113e565b806000036103cc5760405162461bcd60e51b81526004016103c390611807565b60405180910390fd5b60068054600091906103e090600190611865565b815481106103f0576103f061187e565b906000526020600020906003020160010154905080826005546104139190611894565b111561045c5760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b60448201526064016103c3565b60005b82811015610497576104726005546111b4565b600560008154610481906118a7565b909155508061048f816118a7565b91505061045f565b505050565b606060028054806020026020016040519081016040528092919081815260200182805480156104ea57602002820191906000526020600020905b8154815260200190600101908083116104d6575b5050505050905090565b6104fc6115a6565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610531573d6000803e3d6000fd5b5050565b60008060005b60025481101561079c5760015460408051602480820185905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b031916179052905160009283926001600160a01b03909116916105a891906118c0565b600060405180830381855afa9150503d80600081146105e3576040519150601f19603f3d011682016040523d82523d6000602084013e6105e8565b606091505b5091509150816106465760405162461bcd60e51b815260206004820152602360248201527f526166666c65506f6f6c3a2063616e6e6f74206765742075736572206164647260448201526265737360e81b60648201526084016103c3565b600061065182611600565b9050806001600160a01b0316876001600160a01b0316036107865761069060405180606001604052806000815260200160008152602001600081525090565b60005b60065481101561078357600681815481106106b0576106b061187e565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509150600286815481106106fc576106fc61187e565b906000526020600020015482600001511115801561073a5750600286815481106107285761072861187e565b90600052602060002001548260200151115b1561077157600286815481106107525761075261187e565b9060005260206000200154826040015197509750505050505050915091565b8061077b816118a7565b915050610693565b50505b5050508080610794906118a7565b91505061053b565b50915091565b6107aa6115a6565b6107b4600061165c565b565b6107be6115a6565b6006541561081f5760405162461bcd60e51b815260206004820152602860248201527f526166666c65506f6f6c3a205061796f75742073747275637475726520616c726044820152671958591e481cd95d60c21b60648201526084016103c3565b600081900361088b5760405162461bcd60e51b815260206004820152603260248201527f526166666c65506f6f6c3a204c656e677468206f66207061796f75742073747260448201527107563747572652063616e6e6f7420626520360741b60648201526084016103c3565b6108966003826118ef565b156108ee5760405162461bcd60e51b815260206004820152602260248201527f526166666c65506f6f6c3a206c656e677468202520332073686f756c64206265604482015261020360f41b60648201526084016103c3565b600082826108fd600282611865565b81811061090c5761090c61187e565b600180546020909202939093013593506000926001600160a01b0382169250600160a01b90910460e01b906109419085611865565b60405160240161095391815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161099191906118c0565b6000604051808303816000865af19150503d80600081146109ce576040519150601f19603f3d011682016040523d82523d6000602084013e6109d3565b606091505b50509050806109f45760405162461bcd60e51b81526004016103c390611911565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b03191617905290516001600160a01b0390921691610a5291906118c0565b6000604051808303816000865af19150503d8060008114610a8f576040519150601f19603f3d011682016040523d82523d6000602084013e610a94565b606091505b50909150508015610ab75760405162461bcd60e51b81526004016103c390611911565b83836000818110610aca57610aca61187e565b90506020020135600014610af05760405162461bcd60e51b81526004016103c390611966565b83836001818110610b0357610b0361187e565b9050602002013584846000818110610b1d57610b1d61187e565b9050602002013510610b415760405162461bcd60e51b81526004016103c390611966565b6006604051806060016040528086866000818110610b6157610b6161187e565b90506020020135815260200186866001818110610b8057610b8061187e565b90506020020135815260200186866002818110610b9f57610b9f61187e565b60209081029290920135909252835460018181018655600095865294829020845160039283029091019081559184015194820194909455604090920151600290920191909155505b83811015610d7b5760068054610bff90600190611865565b81548110610c0f57610c0f61187e565b906000526020600020906003020160010154858583818110610c3357610c3361187e565b9050602002013514610c575760405162461bcd60e51b81526004016103c390611966565b8484610c64836001611894565b818110610c7357610c7361187e565b90506020020135858583818110610c8c57610c8c61187e565b9050602002013510610cb05760405162461bcd60e51b81526004016103c390611966565b60066040518060600160405280878785818110610ccf57610ccf61187e565b9050602002013581526020018787856001610cea9190611894565b818110610cf957610cf961187e565b9050602002013581526020018787856002610d149190611894565b818110610d2357610d2361187e565b6020908102929092013590925283546001818101865560009586529482902084516003928302909101908155918401519482019490945560409092015160029092019190915550610d749082611894565b9050610be7565b5050505050565b60606006805480602002602001604051908101604052809291908181526020016000905b82821015610df65783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610da6565b50505050905090565b610e076115a6565b600654600003610e655760405162461bcd60e51b8152602060048201526024808201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f74604482015263081cd95d60e21b60648201526084016103c3565b6006805460009190610e7990600190611865565b81548110610e8957610e8961187e565b90600052602060002090600302016001015490506004548103610eee5760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20506f6f6c20616c726561647920726166666c656460448201526064016103c3565b81600003610f0e5760405162461bcd60e51b81526004016103c390611807565b80600183600454610f1f9190611894565b610f299190611865565b10610f715760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b60448201526064016103c3565b6000610f7e600143611865565b604080519140602083015201604051602081830303815290604052610fa2906119aa565b6004805491925084906000610fb78385611894565b9091555060029050815b6004548110156110d657815460018082018455600084815260208120830192909255610fee908390611894565b610ff890866118ef565b9050600083828154811061100e5761100e61187e565b90600052602060002001549050836001858054905061102d9190611865565b8154811061103d5761103d61187e565b906000526020600020015484838154811061105a5761105a61187e565b60009182526020909120015583548190859061107890600190611865565b815481106110885761108861187e565b9060005260206000200181905550856040516020016110a991815260200190565b604051602081830303815290604052805190602001209550505080806110ce906118a7565b915050610fc1565b505050505050565b6110e7816111b4565b50565b600281815481106110fa57600080fd5b600091825260209091200154905081565b6006818154811061111b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6111466115a6565b6001600160a01b0381166111ab5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c3565b6110e78161165c565b60068054600091906111c890600190611865565b815481106111d8576111d861187e565b9060005260206000209060030201600101549050600454811461123d5760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20526166666c65206e6f7420656e6465640000000060448201526064016103c3565b600554811161128e5760405162461bcd60e51b815260206004820152601d60248201527f526166666c65506f6f6c3a20506f6f6c20616c7265616479207061696400000060448201526064016103c3565b60008281526003602052604090205460ff16156112a9575050565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b031916179052905160009283926001600160a01b039091169161130c91906118c0565b6000604051808303816000865af19150503d8060008114611349576040519150601f19603f3d011682016040523d82523d6000602084013e61134e565b606091505b5091509150816113a05760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20506f6f6c2063616c6c206661696c65640000000060448201526064016103c3565b60006113ab82611600565b90506113d160405180606001604052806000815260200160008152602001600081525090565b60005b60065481101561159d57600681815481106113f1576113f161187e565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505091506002878154811061143d5761143d61187e565b906000526020600020015482600001511115801561147b575081602001516002888154811061146e5761146e61187e565b9060005260206000200154105b1561158b57600087815260036020526040808220805460ff191660011790558381015190516001600160a01b0386169281818185875af1925050503d80600081146114e2576040519150601f19603f3d011682016040523d82523d6000602084013e6114e7565b606091505b5050809550508461153a5760405162461bcd60e51b815260206004820152601b60248201527f526166666c65506f6f6c3a207472616e73666572206661696c6564000000000060448201526064016103c3565b86836001600160a01b03167f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a846040015160405161157a91815260200190565b60405180910390a350505050505050565b80611595816118a7565b9150506113d4565b50505050505050565b6000546001600160a01b031633146107b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c3565b60006014825110156116545760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20496e76616c69642061646472657373206461746160448201526064016103c3565b506020015190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156116be57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156116fd578351835292840192918401916001016116e1565b50909695505050505050565b60006020828403121561171b57600080fd5b81356001600160a01b038116811461173257600080fd5b9392505050565b6000806020838503121561174c57600080fd5b823567ffffffffffffffff8082111561176457600080fd5b818501915085601f83011261177857600080fd5b81358181111561178757600080fd5b8660208260051b850101111561179c57600080fd5b60209290920196919550909350505050565b602080825282518282018190526000919060409081850190868401855b828110156117fa57815180518552868101518786015285015185850152606090930192908501906001016117cb565b5091979650505050505050565b60208082526028908201527f526166666c65506f6f6c3a20436f756e74206d75737420626520677265617465604082015267072207468616e20360c41b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118785761187861184f565b92915050565b634e487b7160e01b600052603260045260246000fd5b808201808211156118785761187861184f565b6000600182016118b9576118b961184f565b5060010190565b6000825160005b818110156118e157602081860181015185830152016118c7565b506000920191825250919050565b60008261190c57634e487b7160e01b600052601260045260246000fd5b500690565b60208082526035908201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f746040820152740818dbdc9c995cdc1bdb99081dda5d1a081c1bdbdb605a1b606082015260800190565b60208082526024908201527f526166666c65506f6f6c3a20496e76616c6964207061796f75742073747275636040820152637475726560e01b606082015260800190565b805160208083015191908110156119cb576000198160200360031b1b821691505b5091905056fea2646970667358221220d730acfec69afacbe2dd6218bab276991fb9eede7472dcbcf2542e8b842df09664736f6c63430008110033000000000000000000000000714881e622079536033d3c53165c9c852bac559b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000d706f6f6c2875696e743235362900000000000000000000000000000000000000
Deployed ByteCode
0x6080604052600436106100f65760003560e01c80639494582d1161008f578063c7634a7911610061578063c7634a79146102d2578063cc5ee36514610312578063e557bb4e14610328578063f289eaa514610348578063f2fde38b1461038357005b80639494582d146102505780639c2d2d8e14610270578063a980e79f14610292578063bc23f848146102b257005b806351cff8d9116100c857806351cff8d9146101be5780636386c1c7146101de578063715018a6146102135780638da5cb5b1461022857005b806308d62b03146100ff5780630cff68271461011f57806316f0115b146101485780633b0e84de1461019c57005b366100fd57005b005b34801561010b57600080fd5b506100fd61011a3660046116ac565b6103a3565b34801561012b57600080fd5b5061013560045481565b6040519081526020015b60405180910390f35b34801561015457600080fd5b50600154610174906001600160a01b03811690600160a01b900460e01b82565b604080516001600160a01b0390931683526001600160e01b031990911660208301520161013f565b3480156101a857600080fd5b506101b161049c565b60405161013f91906116c5565b3480156101ca57600080fd5b506100fd6101d9366004611709565b6104f4565b3480156101ea57600080fd5b506101fe6101f9366004611709565b610535565b6040805192835260208301919091520161013f565b34801561021f57600080fd5b506100fd6107a2565b34801561023457600080fd5b506000546040516001600160a01b03909116815260200161013f565b34801561025c57600080fd5b506100fd61026b366004611739565b6107b6565b34801561027c57600080fd5b50610285610d82565b60405161013f91906117ae565b34801561029e57600080fd5b506100fd6102ad3660046116ac565b610dff565b3480156102be57600080fd5b506100fd6102cd3660046116ac565b6110de565b3480156102de57600080fd5b506103026102ed3660046116ac565b60036020526000908152604090205460ff1681565b604051901515815260200161013f565b34801561031e57600080fd5b5061013560055481565b34801561033457600080fd5b506101356103433660046116ac565b6110ea565b34801561035457600080fd5b506103686103633660046116ac565b61110b565b6040805193845260208401929092529082015260600161013f565b34801561038f57600080fd5b506100fd61039e366004611709565b61113e565b806000036103cc5760405162461bcd60e51b81526004016103c390611807565b60405180910390fd5b60068054600091906103e090600190611865565b815481106103f0576103f061187e565b906000526020600020906003020160010154905080826005546104139190611894565b111561045c5760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b60448201526064016103c3565b60005b82811015610497576104726005546111b4565b600560008154610481906118a7565b909155508061048f816118a7565b91505061045f565b505050565b606060028054806020026020016040519081016040528092919081815260200182805480156104ea57602002820191906000526020600020905b8154815260200190600101908083116104d6575b5050505050905090565b6104fc6115a6565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610531573d6000803e3d6000fd5b5050565b60008060005b60025481101561079c5760015460408051602480820185905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b031916179052905160009283926001600160a01b03909116916105a891906118c0565b600060405180830381855afa9150503d80600081146105e3576040519150601f19603f3d011682016040523d82523d6000602084013e6105e8565b606091505b5091509150816106465760405162461bcd60e51b815260206004820152602360248201527f526166666c65506f6f6c3a2063616e6e6f74206765742075736572206164647260448201526265737360e81b60648201526084016103c3565b600061065182611600565b9050806001600160a01b0316876001600160a01b0316036107865761069060405180606001604052806000815260200160008152602001600081525090565b60005b60065481101561078357600681815481106106b0576106b061187e565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509150600286815481106106fc576106fc61187e565b906000526020600020015482600001511115801561073a5750600286815481106107285761072861187e565b90600052602060002001548260200151115b1561077157600286815481106107525761075261187e565b9060005260206000200154826040015197509750505050505050915091565b8061077b816118a7565b915050610693565b50505b5050508080610794906118a7565b91505061053b565b50915091565b6107aa6115a6565b6107b4600061165c565b565b6107be6115a6565b6006541561081f5760405162461bcd60e51b815260206004820152602860248201527f526166666c65506f6f6c3a205061796f75742073747275637475726520616c726044820152671958591e481cd95d60c21b60648201526084016103c3565b600081900361088b5760405162461bcd60e51b815260206004820152603260248201527f526166666c65506f6f6c3a204c656e677468206f66207061796f75742073747260448201527107563747572652063616e6e6f7420626520360741b60648201526084016103c3565b6108966003826118ef565b156108ee5760405162461bcd60e51b815260206004820152602260248201527f526166666c65506f6f6c3a206c656e677468202520332073686f756c64206265604482015261020360f41b60648201526084016103c3565b600082826108fd600282611865565b81811061090c5761090c61187e565b600180546020909202939093013593506000926001600160a01b0382169250600160a01b90910460e01b906109419085611865565b60405160240161095391815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161099191906118c0565b6000604051808303816000865af19150503d80600081146109ce576040519150601f19603f3d011682016040523d82523d6000602084013e6109d3565b606091505b50509050806109f45760405162461bcd60e51b81526004016103c390611911565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b03191617905290516001600160a01b0390921691610a5291906118c0565b6000604051808303816000865af19150503d8060008114610a8f576040519150601f19603f3d011682016040523d82523d6000602084013e610a94565b606091505b50909150508015610ab75760405162461bcd60e51b81526004016103c390611911565b83836000818110610aca57610aca61187e565b90506020020135600014610af05760405162461bcd60e51b81526004016103c390611966565b83836001818110610b0357610b0361187e565b9050602002013584846000818110610b1d57610b1d61187e565b9050602002013510610b415760405162461bcd60e51b81526004016103c390611966565b6006604051806060016040528086866000818110610b6157610b6161187e565b90506020020135815260200186866001818110610b8057610b8061187e565b90506020020135815260200186866002818110610b9f57610b9f61187e565b60209081029290920135909252835460018181018655600095865294829020845160039283029091019081559184015194820194909455604090920151600290920191909155505b83811015610d7b5760068054610bff90600190611865565b81548110610c0f57610c0f61187e565b906000526020600020906003020160010154858583818110610c3357610c3361187e565b9050602002013514610c575760405162461bcd60e51b81526004016103c390611966565b8484610c64836001611894565b818110610c7357610c7361187e565b90506020020135858583818110610c8c57610c8c61187e565b9050602002013510610cb05760405162461bcd60e51b81526004016103c390611966565b60066040518060600160405280878785818110610ccf57610ccf61187e565b9050602002013581526020018787856001610cea9190611894565b818110610cf957610cf961187e565b9050602002013581526020018787856002610d149190611894565b818110610d2357610d2361187e565b6020908102929092013590925283546001818101865560009586529482902084516003928302909101908155918401519482019490945560409092015160029092019190915550610d749082611894565b9050610be7565b5050505050565b60606006805480602002602001604051908101604052809291908181526020016000905b82821015610df65783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610da6565b50505050905090565b610e076115a6565b600654600003610e655760405162461bcd60e51b8152602060048201526024808201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f74604482015263081cd95d60e21b60648201526084016103c3565b6006805460009190610e7990600190611865565b81548110610e8957610e8961187e565b90600052602060002090600302016001015490506004548103610eee5760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20506f6f6c20616c726561647920726166666c656460448201526064016103c3565b81600003610f0e5760405162461bcd60e51b81526004016103c390611807565b80600183600454610f1f9190611894565b610f299190611865565b10610f715760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b60448201526064016103c3565b6000610f7e600143611865565b604080519140602083015201604051602081830303815290604052610fa2906119aa565b6004805491925084906000610fb78385611894565b9091555060029050815b6004548110156110d657815460018082018455600084815260208120830192909255610fee908390611894565b610ff890866118ef565b9050600083828154811061100e5761100e61187e565b90600052602060002001549050836001858054905061102d9190611865565b8154811061103d5761103d61187e565b906000526020600020015484838154811061105a5761105a61187e565b60009182526020909120015583548190859061107890600190611865565b815481106110885761108861187e565b9060005260206000200181905550856040516020016110a991815260200190565b604051602081830303815290604052805190602001209550505080806110ce906118a7565b915050610fc1565b505050505050565b6110e7816111b4565b50565b600281815481106110fa57600080fd5b600091825260209091200154905081565b6006818154811061111b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6111466115a6565b6001600160a01b0381166111ab5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c3565b6110e78161165c565b60068054600091906111c890600190611865565b815481106111d8576111d861187e565b9060005260206000209060030201600101549050600454811461123d5760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20526166666c65206e6f7420656e6465640000000060448201526064016103c3565b600554811161128e5760405162461bcd60e51b815260206004820152601d60248201527f526166666c65506f6f6c3a20506f6f6c20616c7265616479207061696400000060448201526064016103c3565b60008281526003602052604090205460ff16156112a9575050565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b031916179052905160009283926001600160a01b039091169161130c91906118c0565b6000604051808303816000865af19150503d8060008114611349576040519150601f19603f3d011682016040523d82523d6000602084013e61134e565b606091505b5091509150816113a05760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20506f6f6c2063616c6c206661696c65640000000060448201526064016103c3565b60006113ab82611600565b90506113d160405180606001604052806000815260200160008152602001600081525090565b60005b60065481101561159d57600681815481106113f1576113f161187e565b9060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505091506002878154811061143d5761143d61187e565b906000526020600020015482600001511115801561147b575081602001516002888154811061146e5761146e61187e565b9060005260206000200154105b1561158b57600087815260036020526040808220805460ff191660011790558381015190516001600160a01b0386169281818185875af1925050503d80600081146114e2576040519150601f19603f3d011682016040523d82523d6000602084013e6114e7565b606091505b5050809550508461153a5760405162461bcd60e51b815260206004820152601b60248201527f526166666c65506f6f6c3a207472616e73666572206661696c6564000000000060448201526064016103c3565b86836001600160a01b03167f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a846040015160405161157a91815260200190565b60405180910390a350505050505050565b80611595816118a7565b9150506113d4565b50505050505050565b6000546001600160a01b031633146107b45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c3565b60006014825110156116545760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20496e76616c69642061646472657373206461746160448201526064016103c3565b506020015190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156116be57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156116fd578351835292840192918401916001016116e1565b50909695505050505050565b60006020828403121561171b57600080fd5b81356001600160a01b038116811461173257600080fd5b9392505050565b6000806020838503121561174c57600080fd5b823567ffffffffffffffff8082111561176457600080fd5b818501915085601f83011261177857600080fd5b81358181111561178757600080fd5b8660208260051b850101111561179c57600080fd5b60209290920196919550909350505050565b602080825282518282018190526000919060409081850190868401855b828110156117fa57815180518552868101518786015285015185850152606090930192908501906001016117cb565b5091979650505050505050565b60208082526028908201527f526166666c65506f6f6c3a20436f756e74206d75737420626520677265617465604082015267072207468616e20360c41b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118785761187861184f565b92915050565b634e487b7160e01b600052603260045260246000fd5b808201808211156118785761187861184f565b6000600182016118b9576118b961184f565b5060010190565b6000825160005b818110156118e157602081860181015185830152016118c7565b506000920191825250919050565b60008261190c57634e487b7160e01b600052601260045260246000fd5b500690565b60208082526035908201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f746040820152740818dbdc9c995cdc1bdb99081dda5d1a081c1bdbdb605a1b606082015260800190565b60208082526024908201527f526166666c65506f6f6c3a20496e76616c6964207061796f75742073747275636040820152637475726560e01b606082015260800190565b805160208083015191908110156119cb576000198160200360031b1b821691505b5091905056fea2646970667358221220d730acfec69afacbe2dd6218bab276991fb9eede7472dcbcf2542e8b842df09664736f6c63430008110033