false
false
0

Contract Address Details

0x4277431300e48b429ecCeeb304b10dA49a514261

Contract Name
CoreTeamDAO
Creator
0xc7d98cā€“7f3521 at 0x2e0031ā€“8683b7
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
15 Transactions
Transfers
0 Transfers
Gas Used
1,055,196
Last Balance Update
16286546
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:21.742003Z

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

    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

    

    uint256 public salaryPeriod = 3 minutes;// days;   // salary period in seconds
    uint256 public quarterlyPeriod = 9 minutes;// days;    // period in seconds for quarterly payment 
    uint256 public yearlyPeriod = 36 minutes;// days;    // period in seconds for yearly payment
    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 allocated) {
        uint256 len = employeesList.length;
        allocated = int256(address(this).balance);
        for (uint i = 0; i < len; i++) {
            if (!employees[employeesList[i]].isStopped) {   // don't count employees with stopped payouts
                (uint256 unclaimed,,) = getUnlockedAmount(employeesList[i]);
                allocated = allocated - int256(unclaimed);
            }
        }
    }

    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":"allocated","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

Verify & Publish
0x608060405260b460035561021c60045561087060055534801561002157600080fd5b50611635806100316000396000f3fe6080604052600436106101175760003560e01c8063957138a4116100a0578063d067894711610064578063d067894714610313578063f2fde38b146103c1578063f79bc635146103e1578063fb6195af146103f7578063fe3f3f021461040c57600080fd5b8063957138a414610267578063b1670d5c14610287578063b187bd26146102a9578063bedb86fb146102d3578063c4d66de8146102f357600080fd5b8063427de6c1116100e7578063427de6c1146101e15780634e71d92d14610209578063715018a61461021e5780638da5cb5b146102335780638e5ac8001461025157600080fd5b8062ae3bf8146101235780631fc9d53c146101455780632c310a121461016e578063420d4a02146101a657600080fd5b3661011e57005b600080fd5b34801561012f57600080fd5b5061014361013e3660046112fe565b61042c565b005b34801561015157600080fd5b5061015b60055481565b6040519081526020015b60405180910390f35b34801561017a57600080fd5b5061018e610189366004611320565b61054a565b6040516001600160a01b039091168152602001610165565b3480156101b257600080fd5b506101c66101c13660046112fe565b610574565b60408051938452602084019290925290820152606001610165565b3480156101ed57600080fd5b5061018e73b852ad87329986eac6e991954fe329231d1e4de181565b34801561021557600080fd5b5061014361096b565b34801561022a57600080fd5b50610143610a6b565b34801561023f57600080fd5b506000546001600160a01b031661018e565b34801561025d57600080fd5b5061015b60045481565b34801561027357600080fd5b5061014361028236600461134a565b610aee565b34801561029357600080fd5b5061029c610b55565b6040516101659190611381565b3480156102b557600080fd5b506006546102c39060ff1681565b6040519015158152602001610165565b3480156102df57600080fd5b506101436102ee3660046113ce565b610bb7565b3480156102ff57600080fd5b5061014361030e3660046112fe565b610c03565b34801561031f57600080fd5b5061037b61032e3660046112fe565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460089097015495969495939492939192909160ff1689565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e0830152151561010082015261012001610165565b3480156103cd57600080fd5b506101436103dc3660046112fe565b610c64565b3480156103ed57600080fd5b5061015b60035481565b34801561040357600080fd5b5061015b610d5d565b34801561041857600080fd5b506101436104273660046113eb565b610e10565b3361043f6000546001600160a01b031690565b6001600160a01b03161461046e5760405162461bcd60e51b81526004016104659061142d565b60405180910390fd5b60006001600160a01b03821661048f57504761048a3382610ff8565b610504565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f79190611462565b90506105048233836110c6565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b6002818154811061055a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116600090815260016020818152604080842081516101208101835281548152938101549284019290925260028201548382015260038201546060808501919091526004808401546080860152600584015460a0860152600684015460c0860152600784015460e086015260089093015460ff1615156101008501528151630240bc6b60e21b8152915185948594909385938493849373b852ad87329986eac6e991954fe329231d1e4de193630902f1ac9381830193909290918290030181865afa15801561064f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106739190611492565b5091509150816001600160701b0316816001600160701b03168560400151670de0b6b3a76400006106a491906114f8565b6106ae91906114f8565b6106b89190611515565b925050506000600354836000015184602001516106d59190611537565b6106df9190611515565b60035484519192506000916106f49042611537565b6106fe9190611515565b9050600061070c8383611537565b905060648560800151866060015160646107269190611537565b6107309190611537565b61073a83876114f8565b61074491906114f8565b61074e9190611515565b975060648560600151828661076391906114f8565b61076d91906114f8565b6107779190611515565b8560a001818151610788919061154a565b905250608085015160649061079d83876114f8565b6107a791906114f8565b6107b19190611515565b8560c0018181516107c2919061154a565b90525060045485516000919081906107da9042611537565b6107e49190611515565b6107ee91906114f8565b86516107fa919061154a565b905085602001518111801561080f5750428111155b156108835760035486516108239083611537565b61082d9190611515565b6108379084611537565b915060648660600151838761084c91906114f8565b61085691906114f8565b6108609190611515565b9750878660a001516108729190611537565b61087c908a61154a565b985061088b565b8560a0015197505b6005548651819061089c9042611537565b6108a69190611515565b6108b091906114f8565b86516108bc919061154a565b90508560200151811180156108d15750428111155b156109455760035486516108e59083611537565b6108ef9190611515565b6108f99084611537565b915060648660800151838761090e91906114f8565b61091891906114f8565b6109229190611515565b9650868660c001516109349190611537565b61093e908a61154a565b985061094d565b8560c0015196505b60e086015161095c908a61154a565b98505050505050509193909250565b3233146109ba5760405162461bcd60e51b815260206004820152601d60248201527f43616c6c2066726f6d20636f6e747261637420646973616c6c6f7765640000006044820152606401610465565b60065460ff16156109fd5760405162461bcd60e51b815260206004820152600d60248201526c14185e5bdd5d081c185d5cd959609a1b6044820152606401610465565b3360009081526001602052604090206008015460ff1615610a605760405162461bcd60e51b815260206004820152601b60248201527f5061796d656e742069732073746f70706564206279206f776e657200000000006044820152606401610465565b610a69336111e1565b565b33610a7e6000546001600160a01b031690565b6001600160a01b031614610aa45760405162461bcd60e51b81526004016104659061142d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b33610b016000546001600160a01b031690565b6001600160a01b031614610b275760405162461bcd60e51b81526004016104659061142d565b6001600160a01b03919091166000908152600160205260409020600801805460ff1916911515919091179055565b60606002805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b5050505050905090565b33610bca6000546001600160a01b031690565b6001600160a01b031614610bf05760405162461bcd60e51b81526004016104659061142d565b6006805460ff1916911515919091179055565b6000546001600160a01b031615610c1957600080fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b33610c776000546001600160a01b031690565b6001600160a01b031614610c9d5760405162461bcd60e51b81526004016104659061142d565b6001600160a01b038116610d025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610465565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600254479060005b81811015610e0b576001600060028381548110610d8457610d8461155d565b60009182526020808320909101546001600160a01b0316835282019290925260400190206008015460ff16610df9576000610de560028381548110610dcb57610dcb61155d565b6000918252602090912001546001600160a01b0316610574565b505090508084610df59190611573565b9350505b80610e038161159a565b915050610d65565b505090565b33610e236000546001600160a01b031690565b6001600160a01b031614610e495760405162461bcd60e51b81526004016104659061142d565b6064610e55838561154a565b10610ea25760405162461bcd60e51b815260206004820181905260248201527f53756d206f662070657263656e7473206d757374206265206c657373203130306044820152606401610465565b60065460ff16158015610ed157506001600160a01b03851660009081526001602052604090206008015460ff16155b15610edf57610edf856111e1565b6001600160a01b0385166000908152600160208190526040822001549003610f4d57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0387161790555b8015610f76576001600160a01b0385166000908152600160208190526040909120828155018190555b6001600160a01b038516600081815260016020908152604091829020600281018890556003810187905560040185905581519283528201869052810184905260608101839052608081018290527fca5d5e0f1ad92f22bec637b03c50ccb972e35e8577fbd2e5b1f9ae1f0b1822bc9060a0015b60405180910390a15050505050565b604080516000808252602082019092526001600160a01b03841690839060405161102291906115b3565b60006040518083038185875af1925050503d806000811461105f576040519150601f19603f3d011682016040523d82523d6000602084013e611064565b606091505b50509050806110c15760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b6064820152608401610465565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161112291906115b3565b6000604051808303816000865af19150503d806000811461115f576040519150601f19603f3d011682016040523d82523d6000602084013e611164565b606091505b509150915081801561118e57508051158061118e57508080602001905181019061118e91906115e2565b6111da5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610465565b5050505050565b60008060006111ef84610574565b925092509250826000146112dc574780841115611234576112108185611537565b6001600160a01b038616600090815260016020526040902060070155925082611251565b6001600160a01b0385166000908152600160205260408120600701555b6001600160a01b038516600090815260016020819052604090912042918101919091556005810184905560060182905561128b8585610ff8565b6001600160a01b038516600090815260016020908152604091829020600701548251878152918201527f022e3d29644ead4083349ca84d24bcac368b2461819b70f5921fea15de4dec4d9101610fe9565b50505050565b80356001600160a01b03811681146112f957600080fd5b919050565b60006020828403121561131057600080fd5b611319826112e2565b9392505050565b60006020828403121561133257600080fd5b5035919050565b801515811461134757600080fd5b50565b6000806040838503121561135d57600080fd5b611366836112e2565b9150602083013561137681611339565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156113c25783516001600160a01b03168352928401929184019160010161139d565b50909695505050505050565b6000602082840312156113e057600080fd5b813561131981611339565b600080600080600060a0868803121561140357600080fd5b61140c866112e2565b97602087013597506040870135966060810135965060800135945092505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561147457600080fd5b5051919050565b80516001600160701b03811681146112f957600080fd5b6000806000606084860312156114a757600080fd5b6114b08461147b565b92506114be6020850161147b565b9150604084015163ffffffff811681146114d757600080fd5b809150509250925092565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761150f5761150f6114e2565b92915050565b60008261153257634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561150f5761150f6114e2565b8082018082111561150f5761150f6114e2565b634e487b7160e01b600052603260045260246000fd5b8181036000831280158383131683831282161715611593576115936114e2565b5092915050565b6000600182016115ac576115ac6114e2565b5060010190565b6000825160005b818110156115d457602081860181015185830152016115ba565b506000920191825250919050565b6000602082840312156115f457600080fd5b81516113198161133956fea2646970667358221220800a4411dfdc6732050b2687b1b439134b7c814a4bc26ae17691dac5f157d02564736f6c63430008130033

Deployed ByteCode

0x6080604052600436106101175760003560e01c8063957138a4116100a0578063d067894711610064578063d067894714610313578063f2fde38b146103c1578063f79bc635146103e1578063fb6195af146103f7578063fe3f3f021461040c57600080fd5b8063957138a414610267578063b1670d5c14610287578063b187bd26146102a9578063bedb86fb146102d3578063c4d66de8146102f357600080fd5b8063427de6c1116100e7578063427de6c1146101e15780634e71d92d14610209578063715018a61461021e5780638da5cb5b146102335780638e5ac8001461025157600080fd5b8062ae3bf8146101235780631fc9d53c146101455780632c310a121461016e578063420d4a02146101a657600080fd5b3661011e57005b600080fd5b34801561012f57600080fd5b5061014361013e3660046112fe565b61042c565b005b34801561015157600080fd5b5061015b60055481565b6040519081526020015b60405180910390f35b34801561017a57600080fd5b5061018e610189366004611320565b61054a565b6040516001600160a01b039091168152602001610165565b3480156101b257600080fd5b506101c66101c13660046112fe565b610574565b60408051938452602084019290925290820152606001610165565b3480156101ed57600080fd5b5061018e73b852ad87329986eac6e991954fe329231d1e4de181565b34801561021557600080fd5b5061014361096b565b34801561022a57600080fd5b50610143610a6b565b34801561023f57600080fd5b506000546001600160a01b031661018e565b34801561025d57600080fd5b5061015b60045481565b34801561027357600080fd5b5061014361028236600461134a565b610aee565b34801561029357600080fd5b5061029c610b55565b6040516101659190611381565b3480156102b557600080fd5b506006546102c39060ff1681565b6040519015158152602001610165565b3480156102df57600080fd5b506101436102ee3660046113ce565b610bb7565b3480156102ff57600080fd5b5061014361030e3660046112fe565b610c03565b34801561031f57600080fd5b5061037b61032e3660046112fe565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006860154600787015460089097015495969495939492939192909160ff1689565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c084015260e0830152151561010082015261012001610165565b3480156103cd57600080fd5b506101436103dc3660046112fe565b610c64565b3480156103ed57600080fd5b5061015b60035481565b34801561040357600080fd5b5061015b610d5d565b34801561041857600080fd5b506101436104273660046113eb565b610e10565b3361043f6000546001600160a01b031690565b6001600160a01b03161461046e5760405162461bcd60e51b81526004016104659061142d565b60405180910390fd5b60006001600160a01b03821661048f57504761048a3382610ff8565b610504565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f79190611462565b90506105048233836110c6565b604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b6002818154811061055a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116600090815260016020818152604080842081516101208101835281548152938101549284019290925260028201548382015260038201546060808501919091526004808401546080860152600584015460a0860152600684015460c0860152600784015460e086015260089093015460ff1615156101008501528151630240bc6b60e21b8152915185948594909385938493849373b852ad87329986eac6e991954fe329231d1e4de193630902f1ac9381830193909290918290030181865afa15801561064f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106739190611492565b5091509150816001600160701b0316816001600160701b03168560400151670de0b6b3a76400006106a491906114f8565b6106ae91906114f8565b6106b89190611515565b925050506000600354836000015184602001516106d59190611537565b6106df9190611515565b60035484519192506000916106f49042611537565b6106fe9190611515565b9050600061070c8383611537565b905060648560800151866060015160646107269190611537565b6107309190611537565b61073a83876114f8565b61074491906114f8565b61074e9190611515565b975060648560600151828661076391906114f8565b61076d91906114f8565b6107779190611515565b8560a001818151610788919061154a565b905250608085015160649061079d83876114f8565b6107a791906114f8565b6107b19190611515565b8560c0018181516107c2919061154a565b90525060045485516000919081906107da9042611537565b6107e49190611515565b6107ee91906114f8565b86516107fa919061154a565b905085602001518111801561080f5750428111155b156108835760035486516108239083611537565b61082d9190611515565b6108379084611537565b915060648660600151838761084c91906114f8565b61085691906114f8565b6108609190611515565b9750878660a001516108729190611537565b61087c908a61154a565b985061088b565b8560a0015197505b6005548651819061089c9042611537565b6108a69190611515565b6108b091906114f8565b86516108bc919061154a565b90508560200151811180156108d15750428111155b156109455760035486516108e59083611537565b6108ef9190611515565b6108f99084611537565b915060648660800151838761090e91906114f8565b61091891906114f8565b6109229190611515565b9650868660c001516109349190611537565b61093e908a61154a565b985061094d565b8560c0015196505b60e086015161095c908a61154a565b98505050505050509193909250565b3233146109ba5760405162461bcd60e51b815260206004820152601d60248201527f43616c6c2066726f6d20636f6e747261637420646973616c6c6f7765640000006044820152606401610465565b60065460ff16156109fd5760405162461bcd60e51b815260206004820152600d60248201526c14185e5bdd5d081c185d5cd959609a1b6044820152606401610465565b3360009081526001602052604090206008015460ff1615610a605760405162461bcd60e51b815260206004820152601b60248201527f5061796d656e742069732073746f70706564206279206f776e657200000000006044820152606401610465565b610a69336111e1565b565b33610a7e6000546001600160a01b031690565b6001600160a01b031614610aa45760405162461bcd60e51b81526004016104659061142d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b33610b016000546001600160a01b031690565b6001600160a01b031614610b275760405162461bcd60e51b81526004016104659061142d565b6001600160a01b03919091166000908152600160205260409020600801805460ff1916911515919091179055565b60606002805480602002602001604051908101604052809291908181526020018280548015610bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8f575b5050505050905090565b33610bca6000546001600160a01b031690565b6001600160a01b031614610bf05760405162461bcd60e51b81526004016104659061142d565b6006805460ff1916911515919091179055565b6000546001600160a01b031615610c1957600080fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350565b33610c776000546001600160a01b031690565b6001600160a01b031614610c9d5760405162461bcd60e51b81526004016104659061142d565b6001600160a01b038116610d025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610465565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600254479060005b81811015610e0b576001600060028381548110610d8457610d8461155d565b60009182526020808320909101546001600160a01b0316835282019290925260400190206008015460ff16610df9576000610de560028381548110610dcb57610dcb61155d565b6000918252602090912001546001600160a01b0316610574565b505090508084610df59190611573565b9350505b80610e038161159a565b915050610d65565b505090565b33610e236000546001600160a01b031690565b6001600160a01b031614610e495760405162461bcd60e51b81526004016104659061142d565b6064610e55838561154a565b10610ea25760405162461bcd60e51b815260206004820181905260248201527f53756d206f662070657263656e7473206d757374206265206c657373203130306044820152606401610465565b60065460ff16158015610ed157506001600160a01b03851660009081526001602052604090206008015460ff16155b15610edf57610edf856111e1565b6001600160a01b0385166000908152600160208190526040822001549003610f4d57600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0387161790555b8015610f76576001600160a01b0385166000908152600160208190526040909120828155018190555b6001600160a01b038516600081815260016020908152604091829020600281018890556003810187905560040185905581519283528201869052810184905260608101839052608081018290527fca5d5e0f1ad92f22bec637b03c50ccb972e35e8577fbd2e5b1f9ae1f0b1822bc9060a0015b60405180910390a15050505050565b604080516000808252602082019092526001600160a01b03841690839060405161102291906115b3565b60006040518083038185875af1925050503d806000811461105f576040519150601f19603f3d011682016040523d82523d6000602084013e611064565b606091505b50509050806110c15760405162461bcd60e51b815260206004820152602360248201527f5472616e7366657248656c7065723a20434c4f5f5452414e534645525f46414960448201526213115160ea1b6064820152608401610465565b505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283929087169161112291906115b3565b6000604051808303816000865af19150503d806000811461115f576040519150601f19603f3d011682016040523d82523d6000602084013e611164565b606091505b509150915081801561118e57508051158061118e57508080602001905181019061118e91906115e2565b6111da5760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610465565b5050505050565b60008060006111ef84610574565b925092509250826000146112dc574780841115611234576112108185611537565b6001600160a01b038616600090815260016020526040902060070155925082611251565b6001600160a01b0385166000908152600160205260408120600701555b6001600160a01b038516600090815260016020819052604090912042918101919091556005810184905560060182905561128b8585610ff8565b6001600160a01b038516600090815260016020908152604091829020600701548251878152918201527f022e3d29644ead4083349ca84d24bcac368b2461819b70f5921fea15de4dec4d9101610fe9565b50505050565b80356001600160a01b03811681146112f957600080fd5b919050565b60006020828403121561131057600080fd5b611319826112e2565b9392505050565b60006020828403121561133257600080fd5b5035919050565b801515811461134757600080fd5b50565b6000806040838503121561135d57600080fd5b611366836112e2565b9150602083013561137681611339565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156113c25783516001600160a01b03168352928401929184019160010161139d565b50909695505050505050565b6000602082840312156113e057600080fd5b813561131981611339565b600080600080600060a0868803121561140357600080fd5b61140c866112e2565b97602087013597506040870135966060810135965060800135945092505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561147457600080fd5b5051919050565b80516001600160701b03811681146112f957600080fd5b6000806000606084860312156114a757600080fd5b6114b08461147b565b92506114be6020850161147b565b9150604084015163ffffffff811681146114d757600080fd5b809150509250925092565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761150f5761150f6114e2565b92915050565b60008261153257634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561150f5761150f6114e2565b8082018082111561150f5761150f6114e2565b634e487b7160e01b600052603260045260246000fd5b8181036000831280158383131683831282161715611593576115936114e2565b5092915050565b6000600182016115ac576115ac6114e2565b5060010190565b6000825160005b818110156115d457602081860181015185830152016115ba565b506000920191825250919050565b6000602082840312156115f457600080fd5b81516113198161133956fea2646970667358221220800a4411dfdc6732050b2687b1b439134b7c814a4bc26ae17691dac5f157d02564736f6c63430008130033