Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- CoreTeamDAO
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2024-09-26T15:25:22.602272Z
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 internal _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 Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface ISoyPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface IERC20 { function balanceOf(address owner) external view returns (uint); function transfer(address to, uint value) external; } contract CoreTeamDAO is Ownable { ISoyPair constant public CLO_BUSDT = ISoyPair(0xB852AD87329986EaC6e991954fe329231D1E4De1); // reserve0 - BUSDT, reserve1 - WCLO uint256 constant public salaryPeriod = 30 days; // salary period in seconds uint256 constant public quarterlyPeriod = 91 days; // period in seconds for quarterly payment uint256 constant public yearlyPeriod = 365 days; // period in seconds for yearly payment struct Employee { uint256 startTimestamp; // timestamp from which start periods uint256 lastClaimed; // timestamp when CLO was claimed last time uint256 salary; // salary in BUSDT (without decimals) uint256 quarterlyPercent; // percent of salary paid quarterly uint256 yearlyPercent; // percent of salary paid yearly uint256 quarterlyPending; // Amount of CLO that is pending for quarterly payout uint256 yearlyPending; // Amount of CLO that is pending for yearly payout uint256 unpaid; // Amount of CLO that was not paid due to insufficient contract balance bool isStopped; // stop payouts } mapping (address => Employee) public employees; address[] public employeesList; // list of employees bool public isPaused; event SetSalary(address employee, uint256 salary, uint256 quarterlyPercent, uint256 yearlyPercent, uint256 startTimestamp); event Claim(uint256 amount, uint256 pendingAmount); event Rescue(address token, uint256 amount); function initialize(address _newOwner) external { require(_owner == address(0)); _owner = _newOwner; emit OwnershipTransferred(address(0), _newOwner); } receive() external payable {} // Set salary in BUSDT without decimals. if "startTimestamp" == 0, then startTimestamp will not be updated function setSalary(address employee, uint256 salary, uint256 quarterlyPercent, uint256 yearlyPercent, uint256 startTimestamp) external onlyOwner { require(quarterlyPercent + yearlyPercent < 100, "Sum of percents must be less 100"); if (!isPaused && !employees[employee].isStopped) _claim(employee); // claim unlocked salary and bonus to employee address if(employees[employee].lastClaimed == 0) { // new employee employeesList.push(employee); } if (startTimestamp > 0) { employees[employee].startTimestamp = startTimestamp; employees[employee].lastClaimed = startTimestamp; } employees[employee].salary = salary; employees[employee].quarterlyPercent = quarterlyPercent; employees[employee].yearlyPercent = yearlyPercent; emit SetSalary(employee, salary, quarterlyPercent, yearlyPercent, startTimestamp); } // pause/unpause contract function setPause(bool pause) external onlyOwner { isPaused = pause; } // stop employee payment function setStop(address employee, bool stopped) external onlyOwner { employees[employee].isStopped = stopped; } // claim unlocked salary and bonus to employee address function claim() external { require(tx.origin == msg.sender, "Call from contract disallowed"); // protection from flash-loan price manipulation require(!isPaused, "Payout paused"); require(!employees[msg.sender].isStopped, "Payment is stopped by owner"); _claim(msg.sender); } function _claim(address employee) internal { (uint256 unlockedAmount, uint256 quarterlyPending, uint256 yearlyPending) = getUnlockedAmount(employee); if (unlockedAmount != 0) { uint256 balance = address(this).balance; if (unlockedAmount > balance) { employees[employee].unpaid = unlockedAmount - balance; unlockedAmount = balance; } else { employees[employee].unpaid = 0; } employees[employee].lastClaimed = block.timestamp; employees[employee].quarterlyPending = quarterlyPending; employees[employee].yearlyPending = yearlyPending; safeTransferCLO(employee, unlockedAmount); emit Claim(unlockedAmount, employees[employee].unpaid); } } // return unlocked amount of CLO function getUnlockedAmount(address employee) public view returns(uint256 unlockedAmount, uint256 quarterlyPending, uint256 yearlyPending) { Employee memory e = employees[employee]; uint256 salaryCLO; // calculate CLO amount for salary based on CLO_BUSDT pool { (uint112 reserveBUSDT, uint112 reserveCLO,) = CLO_BUSDT.getReserves(); salaryCLO = e.salary * 1e18 * reserveCLO / reserveBUSDT; // convert salary from BUSDT to CLO and add 18 decimals } uint256 paidPeriods = (e.lastClaimed - e.startTimestamp) / salaryPeriod; uint256 passedPeriods = (block.timestamp - e.startTimestamp) / salaryPeriod; uint256 unpaidPeriods = passedPeriods - paidPeriods; unlockedAmount = salaryCLO * unpaidPeriods * (100 - e.quarterlyPercent - e.yearlyPercent) / 100; // unlocked salary e.quarterlyPending += (salaryCLO * unpaidPeriods * e.quarterlyPercent / 100); // add part of salary to quarterlyPending e.yearlyPending += (salaryCLO * unpaidPeriods * e.yearlyPercent / 100); // add part of salary to yearlyPending // calculate amount for quarterly part uint256 periodEnd = e.startTimestamp + (((block.timestamp - e.startTimestamp) / quarterlyPeriod ) * quarterlyPeriod); // timestamp when last quarterly period ended if (periodEnd > e.lastClaimed && periodEnd <= block.timestamp ) { // quarterly period ends unpaidPeriods = passedPeriods - ((periodEnd - e.startTimestamp) / salaryPeriod); // number of months excluded from quarterly payment quarterlyPending = (salaryCLO * unpaidPeriods * e.quarterlyPercent / 100); unlockedAmount += e.quarterlyPending - quarterlyPending; } else { quarterlyPending = e.quarterlyPending; } // calculate amount for yearly part periodEnd = e.startTimestamp + (((block.timestamp - e.startTimestamp) / yearlyPeriod ) * yearlyPeriod); // timestamp when last yearly period ended if (periodEnd > e.lastClaimed && periodEnd <= block.timestamp ) { // yearly period ends unpaidPeriods = passedPeriods - ((periodEnd - e.startTimestamp) / salaryPeriod); // number of months excluded from yearly payment yearlyPending = (salaryCLO * unpaidPeriods * e.yearlyPercent / 100); unlockedAmount += e.yearlyPending - yearlyPending; } else { yearlyPending = e.yearlyPending; } unlockedAmount += e.unpaid; // if contract has debt } // return allocated amount of CLO function getAllocatedAmount() external view returns(int256 allocatedToClaim, int256 totalAllocated) { uint256 len = employeesList.length; allocatedToClaim = int256(address(this).balance); uint256 totalUnlocked; uint256 totalPending; for (uint i = 0; i < len; i++) { if (!employees[employeesList[i]].isStopped) { // don't count employees with stopped payouts (uint256 unlocked, uint256 quarterlyPending, uint256 yearlyPending) = getUnlockedAmount(employeesList[i]); totalUnlocked += unlocked; totalPending = totalPending + quarterlyPending + yearlyPending; } } allocatedToClaim = allocatedToClaim - int256(totalUnlocked); totalAllocated = allocatedToClaim - int256(totalPending); } function getEmployeesList() external view returns(address[] memory) { return employeesList; } 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 safeTransferCLO(address to, uint value) internal { (bool success,) = to.call{value:value}(new bytes(0)); require(success, 'TransferHelper: CLO_TRANSFER_FAILED'); } }
Contract ABI
[{"type":"event","name":"Claim","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"pendingAmount","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":"SetSalary","inputs":[{"type":"address","name":"employee","internalType":"address","indexed":false},{"type":"uint256","name":"salary","internalType":"uint256","indexed":false},{"type":"uint256","name":"quarterlyPercent","internalType":"uint256","indexed":false},{"type":"uint256","name":"yearlyPercent","internalType":"uint256","indexed":false},{"type":"uint256","name":"startTimestamp","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISoyPair"}],"name":"CLO_BUSDT","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"startTimestamp","internalType":"uint256"},{"type":"uint256","name":"lastClaimed","internalType":"uint256"},{"type":"uint256","name":"salary","internalType":"uint256"},{"type":"uint256","name":"quarterlyPercent","internalType":"uint256"},{"type":"uint256","name":"yearlyPercent","internalType":"uint256"},{"type":"uint256","name":"quarterlyPending","internalType":"uint256"},{"type":"uint256","name":"yearlyPending","internalType":"uint256"},{"type":"uint256","name":"unpaid","internalType":"uint256"},{"type":"bool","name":"isStopped","internalType":"bool"}],"name":"employees","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"employeesList","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"int256","name":"allocatedToClaim","internalType":"int256"},{"type":"int256","name":"totalAllocated","internalType":"int256"}],"name":"getAllocatedAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"getEmployeesList","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"unlockedAmount","internalType":"uint256"},{"type":"uint256","name":"quarterlyPending","internalType":"uint256"},{"type":"uint256","name":"yearlyPending","internalType":"uint256"}],"name":"getUnlockedAmount","inputs":[{"type":"address","name":"employee","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPaused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"quarterlyPeriod","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueTokens","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"salaryPeriod","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPause","inputs":[{"type":"bool","name":"pause","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSalary","inputs":[{"type":"address","name":"employee","internalType":"address"},{"type":"uint256","name":"salary","internalType":"uint256"},{"type":"uint256","name":"quarterlyPercent","internalType":"uint256"},{"type":"uint256","name":"yearlyPercent","internalType":"uint256"},{"type":"uint256","name":"startTimestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStop","inputs":[{"type":"address","name":"employee","internalType":"address"},{"type":"bool","name":"stopped","internalType":"bool"}]},{"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":"yearlyPeriod","inputs":[]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x608060405234801561001057600080fd5b50611696806100206000396000f3fe6080604052600436106101175760003560e01c8063957138a4116100a0578063d067894711610064578063d067894714610316578063f2fde38b146103c4578063f79bc635146103e4578063fb6195af146103fb578063fe3f3f021461042557600080fd5b8063957138a41461026a578063b1670d5c1461028a578063b187bd26146102ac578063bedb86fb146102d6578063c4d66de8146102f657600080fd5b8063427de6c1116100e7578063427de6c1146101e35780634e71d92d1461020b578063715018a6146102205780638da5cb5b146102355780638e5ac8001461025357600080fd5b8062ae3bf8146101235780631fc9d53c146101455780632c310a1214610170578063420d4a02146101a857600080fd5b3661011e57005b600080fd5b34801561012f57600080fd5b5061014361013e36600461135f565b610445565b005b34801561015157600080fd5b5061015d6301e1338081565b6040519081526020015b60405180910390f35b34801561017c57600080fd5b5061019061018b366004611381565b610563565b6040516001600160a01b039091168152602001610167565b3480156101b457600080fd5b506101c86101c336600461135f565b61058d565b60408051938452602084019290925290820152606001610167565b3480156101ef57600080fd5b5061019073b852ad87329986eac6e991954fe329231d1e4de181565b34801561021757600080fd5b50610143610990565b34801561022c57600080fd5b50610143610a90565b34801561024157600080fd5b506000546001600160a01b0316610190565b34801561025f57600080fd5b5061015d6277f88081565b34801561027657600080fd5b506101436102853660046113ab565b610b13565b34801561029657600080fd5b5061029f610b7a565b60405161016791906113e2565b3480156102b857600080fd5b506003546102c69060ff1681565b6040519015158152602001610167565b3480156102e257600080fd5b506101436102f136600461142f565b610bdc565b34801561030257600080fd5b5061014361031136600461135f565b610c28565b34801561032257600080fd5b5061037e61033136600461135f565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460089097015495969495939492939192909160ff1689565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e0830152151561010082015261012001610167565b3480156103d057600080fd5b506101436103df36600461135f565b610c89565b3480156103f057600080fd5b5061015d62278d0081565b34801561040757600080fd5b50610410610d82565b60408051928352602083019190915201610167565b34801561043157600080fd5b5061014361044036600461144c565b610e71565b336104586000546001600160a01b031690565b6001600160a01b0316146104875760405162461bcd60e51b815260040161047e9061148e565b60405180910390fd5b60006001600160a01b0382166104a85750476104a33382611059565b61051d565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051091906114c3565b905061051d823383611127565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b6002818154811061057357600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116600090815260016020818152604080842081516101208101835281548152938101549284019290925260028201548382015260038201546060808501919091526004808401546080860152600584015460a0860152600684015460c0860152600784015460e086015260089093015460ff1615156101008501528151630240bc6b60e21b8152915185948594909385938493849373b852ad87329986eac6e991954fe329231d1e4de193630902f1ac9381830193909290918290030181865afa158015610668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068c91906114f3565b5091509150816001600160701b0316816001600160701b03168560400151670de0b6b3a76400006106bd9190611559565b6106c79190611559565b6106d19190611576565b92505050600062278d00836000015184602001516106ef9190611598565b6106f99190611576565b9050600062278d008460000151426107119190611598565b61071b9190611576565b905060006107298383611598565b905060648560800151866060015160646107439190611598565b61074d9190611598565b6107578387611559565b6107619190611559565b61076b9190611576565b97506064856060015182866107809190611559565b61078a9190611559565b6107949190611576565b8560a0018181516107a591906115ab565b90525060808501516064906107ba8387611559565b6107c49190611559565b6107ce9190611576565b8560c0018181516107df91906115ab565b90525084516000906277f8809081906107f89042611598565b6108029190611576565b61080c9190611559565b865161081891906115ab565b905085602001518111801561082d5750428111155b156108a357855162278d00906108439083611598565b61084d9190611576565b6108579084611598565b915060648660600151838761086c9190611559565b6108769190611559565b6108809190611576565b9750878660a001516108929190611598565b61089c908a6115ab565b98506108ab565b8560a0015197505b85516301e133809081906108bf9042611598565b6108c99190611576565b6108d39190611559565b86516108df91906115ab565b90508560200151811180156108f45750428111155b1561096a57855162278d009061090a9083611598565b6109149190611576565b61091e9084611598565b91506064866080015183876109339190611559565b61093d9190611559565b6109479190611576565b9650868660c001516109599190611598565b610963908a6115ab565b9850610972565b8560c0015196505b60e0860151610981908a6115ab565b98505050505050509193909250565b3233146109df5760405162461bcd60e51b815260206004820152601d60248201527f43616c6c2066726f6d20636f6e747261637420646973616c6c6f776564000000604482015260640161047e565b60035460ff1615610a225760405162461bcd60e51b815260206004820152600d60248201526c14185e5bdd5d081c185d5cd959609a1b604482015260640161047e565b3360009081526001602052604090206008015460ff1615610a855760405162461bcd60e51b815260206004820152601b60248201527f5061796d656e742069732073746f70706564206279206f776e65720000000000604482015260640161047e565b610a8e33611242565b565b33610aa36000546001600160a01b031690565b6001600160a01b031614610ac95760405162461bcd60e51b815260040161047e9061148e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b33610b266000546001600160a01b031690565b6001600160a01b031614610b4c5760405162461bcd60e51b815260040161047e9061148e565b6001600160a01b03919091166000908152600160205260409020600801805460ff1916911515919091179055565b60606002805480602002602001604051908101604052809291908181526020018280548015610bd257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bb4575b5050505050905090565b33610bef6000546001600160a01b031690565b6001600160a01b031614610c155760405162461bcd60e51b815260040161047e9061148e565b6003805460ff1916911515919091179055565b6000546001600160a01b031615610c3e57600080fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b33610c9c6000546001600160a01b031690565b6001600160a01b031614610cc25760405162461bcd60e51b815260040161047e9061148e565b6001600160a01b038116610d275760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161047e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60025447906000908180805b83811015610e51576001600060028381548110610dad57610dad6115be565b60009182526020808320909101546001600160a01b0316835282019290925260400190206008015460ff16610e3f576000806000610e1160028581548110610df757610df76115be565b6000918252602090912001546001600160a01b031661058d565b91945092509050610e2283876115ab565b955080610e2f83876115ab565b610e3991906115ab565b94505050505b80610e49816115d4565b915050610d8e565b50610e5c82866115ed565b9450610e6881866115ed565b93505050509091565b33610e846000546001600160a01b031690565b6001600160a01b031614610eaa5760405162461bcd60e51b815260040161047e9061148e565b6064610eb683856115ab565b10610f035760405162461bcd60e51b815260206004820181905260248201527f53756d206f662070657263656e7473206d757374206265206c65737320313030604482015260640161047e565b60035460ff16158015610f3257506001600160a01b03851660009081526001602052604090206008015460ff16155b15610f4057610f4085611242565b6001600160a01b0385166000908152600160208190526040822001549003610fae57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0387161790555b8015610fd7576001600160a01b0385166000908152600160208190526040909120828155018190555b6001600160a01b038516600081815260016020908152604091829020600281018890556003810187905560040185905581519283528201869052810184905260608101839052608081018290527fca5d5e0f1ad92f22bec637b03c50ccb972e35e8577fbd2e5b1f9ae1f0b1822bc9060a0015b60405180910390a15050505050565b604080516000808252602082019092526001600160a01b0384169083906040516110839190611614565b60006040518083038185875af1925050503d80600081146110c0576040519150601f19603f3d011682016040523d82523d6000602084013e6110c5565b606091505b50509050806111225760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b606482015260840161047e565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916111839190611614565b6000604051808303816000865af19150503d80600081146111c0576040519150601f19603f3d011682016040523d82523d6000602084013e6111c5565b606091505b50915091508180156111ef5750805115806111ef5750808060200190518101906111ef9190611643565b61123b5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015260640161047e565b5050505050565b60008060006112508461058d565b9250925092508260001461133d574780841115611295576112718185611598565b6001600160a01b0386166000908152600160205260409020600701559250826112b2565b6001600160a01b0385166000908152600160205260408120600701555b6001600160a01b03851660009081526001602081905260409091204291810191909155600581018490556006018290556112ec8585611059565b6001600160a01b038516600090815260016020908152604091829020600701548251878152918201527f022e3d29644ead4083349ca84d24bcac368b2461819b70f5921fea15de4dec4d910161104a565b50505050565b80356001600160a01b038116811461135a57600080fd5b919050565b60006020828403121561137157600080fd5b61137a82611343565b9392505050565b60006020828403121561139357600080fd5b5035919050565b80151581146113a857600080fd5b50565b600080604083850312156113be57600080fd5b6113c783611343565b915060208301356113d78161139a565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156114235783516001600160a01b0316835292840192918401916001016113fe565b50909695505050505050565b60006020828403121561144157600080fd5b813561137a8161139a565b600080600080600060a0868803121561146457600080fd5b61146d86611343565b97602087013597506040870135966060810135965060800135945092505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156114d557600080fd5b5051919050565b80516001600160701b038116811461135a57600080fd5b60008060006060848603121561150857600080fd5b611511846114dc565b925061151f602085016114dc565b9150604084015163ffffffff8116811461153857600080fd5b809150509250925092565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761157057611570611543565b92915050565b60008261159357634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561157057611570611543565b8082018082111561157057611570611543565b634e487b7160e01b600052603260045260246000fd5b6000600182016115e6576115e6611543565b5060010190565b818103600083128015838313168383128216171561160d5761160d611543565b5092915050565b6000825160005b81811015611635576020818601810151858301520161161b565b506000920191825250919050565b60006020828403121561165557600080fd5b815161137a8161139a56fea2646970667358221220efbf21cb4626aa9f7ae2b77a3a4992ab7822caafb4c2f63d24ac10aab20b54fd64736f6c63430008130033
Deployed ByteCode
0x6080604052600436106101175760003560e01c8063957138a4116100a0578063d067894711610064578063d067894714610316578063f2fde38b146103c4578063f79bc635146103e4578063fb6195af146103fb578063fe3f3f021461042557600080fd5b8063957138a41461026a578063b1670d5c1461028a578063b187bd26146102ac578063bedb86fb146102d6578063c4d66de8146102f657600080fd5b8063427de6c1116100e7578063427de6c1146101e35780634e71d92d1461020b578063715018a6146102205780638da5cb5b146102355780638e5ac8001461025357600080fd5b8062ae3bf8146101235780631fc9d53c146101455780632c310a1214610170578063420d4a02146101a857600080fd5b3661011e57005b600080fd5b34801561012f57600080fd5b5061014361013e36600461135f565b610445565b005b34801561015157600080fd5b5061015d6301e1338081565b6040519081526020015b60405180910390f35b34801561017c57600080fd5b5061019061018b366004611381565b610563565b6040516001600160a01b039091168152602001610167565b3480156101b457600080fd5b506101c86101c336600461135f565b61058d565b60408051938452602084019290925290820152606001610167565b3480156101ef57600080fd5b5061019073b852ad87329986eac6e991954fe329231d1e4de181565b34801561021757600080fd5b50610143610990565b34801561022c57600080fd5b50610143610a90565b34801561024157600080fd5b506000546001600160a01b0316610190565b34801561025f57600080fd5b5061015d6277f88081565b34801561027657600080fd5b506101436102853660046113ab565b610b13565b34801561029657600080fd5b5061029f610b7a565b60405161016791906113e2565b3480156102b857600080fd5b506003546102c69060ff1681565b6040519015158152602001610167565b3480156102e257600080fd5b506101436102f136600461142f565b610bdc565b34801561030257600080fd5b5061014361031136600461135f565b610c28565b34801561032257600080fd5b5061037e61033136600461135f565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460089097015495969495939492939192909160ff1689565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e0830152151561010082015261012001610167565b3480156103d057600080fd5b506101436103df36600461135f565b610c89565b3480156103f057600080fd5b5061015d62278d0081565b34801561040757600080fd5b50610410610d82565b60408051928352602083019190915201610167565b34801561043157600080fd5b5061014361044036600461144c565b610e71565b336104586000546001600160a01b031690565b6001600160a01b0316146104875760405162461bcd60e51b815260040161047e9061148e565b60405180910390fd5b60006001600160a01b0382166104a85750476104a33382611059565b61051d565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051091906114c3565b905061051d823383611127565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b6002818154811061057357600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116600090815260016020818152604080842081516101208101835281548152938101549284019290925260028201548382015260038201546060808501919091526004808401546080860152600584015460a0860152600684015460c0860152600784015460e086015260089093015460ff1615156101008501528151630240bc6b60e21b8152915185948594909385938493849373b852ad87329986eac6e991954fe329231d1e4de193630902f1ac9381830193909290918290030181865afa158015610668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068c91906114f3565b5091509150816001600160701b0316816001600160701b03168560400151670de0b6b3a76400006106bd9190611559565b6106c79190611559565b6106d19190611576565b92505050600062278d00836000015184602001516106ef9190611598565b6106f99190611576565b9050600062278d008460000151426107119190611598565b61071b9190611576565b905060006107298383611598565b905060648560800151866060015160646107439190611598565b61074d9190611598565b6107578387611559565b6107619190611559565b61076b9190611576565b97506064856060015182866107809190611559565b61078a9190611559565b6107949190611576565b8560a0018181516107a591906115ab565b90525060808501516064906107ba8387611559565b6107c49190611559565b6107ce9190611576565b8560c0018181516107df91906115ab565b90525084516000906277f8809081906107f89042611598565b6108029190611576565b61080c9190611559565b865161081891906115ab565b905085602001518111801561082d5750428111155b156108a357855162278d00906108439083611598565b61084d9190611576565b6108579084611598565b915060648660600151838761086c9190611559565b6108769190611559565b6108809190611576565b9750878660a001516108929190611598565b61089c908a6115ab565b98506108ab565b8560a0015197505b85516301e133809081906108bf9042611598565b6108c99190611576565b6108d39190611559565b86516108df91906115ab565b90508560200151811180156108f45750428111155b1561096a57855162278d009061090a9083611598565b6109149190611576565b61091e9084611598565b91506064866080015183876109339190611559565b61093d9190611559565b6109479190611576565b9650868660c001516109599190611598565b610963908a6115ab565b9850610972565b8560c0015196505b60e0860151610981908a6115ab565b98505050505050509193909250565b3233146109df5760405162461bcd60e51b815260206004820152601d60248201527f43616c6c2066726f6d20636f6e747261637420646973616c6c6f776564000000604482015260640161047e565b60035460ff1615610a225760405162461bcd60e51b815260206004820152600d60248201526c14185e5bdd5d081c185d5cd959609a1b604482015260640161047e565b3360009081526001602052604090206008015460ff1615610a855760405162461bcd60e51b815260206004820152601b60248201527f5061796d656e742069732073746f70706564206279206f776e65720000000000604482015260640161047e565b610a8e33611242565b565b33610aa36000546001600160a01b031690565b6001600160a01b031614610ac95760405162461bcd60e51b815260040161047e9061148e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b33610b266000546001600160a01b031690565b6001600160a01b031614610b4c5760405162461bcd60e51b815260040161047e9061148e565b6001600160a01b03919091166000908152600160205260409020600801805460ff1916911515919091179055565b60606002805480602002602001604051908101604052809291908181526020018280548015610bd257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610bb4575b5050505050905090565b33610bef6000546001600160a01b031690565b6001600160a01b031614610c155760405162461bcd60e51b815260040161047e9061148e565b6003805460ff1916911515919091179055565b6000546001600160a01b031615610c3e57600080fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b33610c9c6000546001600160a01b031690565b6001600160a01b031614610cc25760405162461bcd60e51b815260040161047e9061148e565b6001600160a01b038116610d275760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161047e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60025447906000908180805b83811015610e51576001600060028381548110610dad57610dad6115be565b60009182526020808320909101546001600160a01b0316835282019290925260400190206008015460ff16610e3f576000806000610e1160028581548110610df757610df76115be565b6000918252602090912001546001600160a01b031661058d565b91945092509050610e2283876115ab565b955080610e2f83876115ab565b610e3991906115ab565b94505050505b80610e49816115d4565b915050610d8e565b50610e5c82866115ed565b9450610e6881866115ed565b93505050509091565b33610e846000546001600160a01b031690565b6001600160a01b031614610eaa5760405162461bcd60e51b815260040161047e9061148e565b6064610eb683856115ab565b10610f035760405162461bcd60e51b815260206004820181905260248201527f53756d206f662070657263656e7473206d757374206265206c65737320313030604482015260640161047e565b60035460ff16158015610f3257506001600160a01b03851660009081526001602052604090206008015460ff16155b15610f4057610f4085611242565b6001600160a01b0385166000908152600160208190526040822001549003610fae57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0387161790555b8015610fd7576001600160a01b0385166000908152600160208190526040909120828155018190555b6001600160a01b038516600081815260016020908152604091829020600281018890556003810187905560040185905581519283528201869052810184905260608101839052608081018290527fca5d5e0f1ad92f22bec637b03c50ccb972e35e8577fbd2e5b1f9ae1f0b1822bc9060a0015b60405180910390a15050505050565b604080516000808252602082019092526001600160a01b0384169083906040516110839190611614565b60006040518083038185875af1925050503d80600081146110c0576040519150601f19603f3d011682016040523d82523d6000602084013e6110c5565b606091505b50509050806111225760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b606482015260840161047e565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916111839190611614565b6000604051808303816000865af19150503d80600081146111c0576040519150601f19603f3d011682016040523d82523d6000602084013e6111c5565b606091505b50915091508180156111ef5750805115806111ef5750808060200190518101906111ef9190611643565b61123b5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015260640161047e565b5050505050565b60008060006112508461058d565b9250925092508260001461133d574780841115611295576112718185611598565b6001600160a01b0386166000908152600160205260409020600701559250826112b2565b6001600160a01b0385166000908152600160205260408120600701555b6001600160a01b03851660009081526001602081905260409091204291810191909155600581018490556006018290556112ec8585611059565b6001600160a01b038516600090815260016020908152604091829020600701548251878152918201527f022e3d29644ead4083349ca84d24bcac368b2461819b70f5921fea15de4dec4d910161104a565b50505050565b80356001600160a01b038116811461135a57600080fd5b919050565b60006020828403121561137157600080fd5b61137a82611343565b9392505050565b60006020828403121561139357600080fd5b5035919050565b80151581146113a857600080fd5b50565b600080604083850312156113be57600080fd5b6113c783611343565b915060208301356113d78161139a565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156114235783516001600160a01b0316835292840192918401916001016113fe565b50909695505050505050565b60006020828403121561144157600080fd5b813561137a8161139a565b600080600080600060a0868803121561146457600080fd5b61146d86611343565b97602087013597506040870135966060810135965060800135945092505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156114d557600080fd5b5051919050565b80516001600160701b038116811461135a57600080fd5b60008060006060848603121561150857600080fd5b611511846114dc565b925061151f602085016114dc565b9150604084015163ffffffff8116811461153857600080fd5b809150509250925092565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761157057611570611543565b92915050565b60008261159357634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561157057611570611543565b8082018082111561157057611570611543565b634e487b7160e01b600052603260045260246000fd5b6000600182016115e6576115e6611543565b5060010190565b818103600083128015838313168383128216171561160d5761160d611543565b5092915050565b6000825160005b81811015611635576020818601810151858301520161161b565b506000920191825250919050565b60006020828403121561165557600080fd5b815161137a8161139a56fea2646970667358221220efbf21cb4626aa9f7ae2b77a3a4992ab7822caafb4c2f63d24ac10aab20b54fd64736f6c63430008130033