false
false
0

Contract Address Details

0x0613F78DfC587Ea71CBfB82ea30218FEb8bC68bE

Contract Name
Migration
Creator
0xc7d98c–7f3521 at 0xef0f29–f04556
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
2 Transactions
Transfers
4 Transfers
Gas Used
260,132
Last Balance Update
16288110
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
Migration




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




Optimization runs
200
EVM Version
default




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

Contract source code

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

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 *
 * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/ownership/Ownable.sol
 * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts
 * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the
 * build/artifacts folder) as well as the vanilla Ownable implementation from an openzeppelin version.
 */
contract Ownable {
    address private _owner;

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

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(),"Not Owner");
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * @notice Renouncing to ownership will leave the contract without an owner.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0),"Zero address not allowed");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

interface IERC223 {
    function mint(address _to, uint256 _amount) external;
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    function burnFrom(address sender, uint256 amount) external returns (bool);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
}

interface IStacking {
    struct Staker {
        uint256 amount;
        uint256 rewardPerSharePaid;
        uint64 endTime; // Time when staking ends and user may withdraw. After this time user will not receive rewards.
        uint64 index; // Balances indexed
        uint64 bonus;   // percent of bonus applied
        uint32 affiliatePercent; // percent of user's rewards that will be transferred to affiliate, i.e. 5% 
        uint32 noAffiliatePercent; // percent of user's rewards will be paid if no affiliate.
        address affiliate; // address of affiliate
    }
    function staker(address user) external view returns(Staker memory);
}

contract Migration is Ownable {
    address constant public SOY = address(0xE1A77164e5C6d9E0fc0b23D11e0874De6B328e68); //address(0x9FaE2529863bD691B4A7171bDfCf33C7ebB10a65);
    address constant public CLOE = address(0xd29588B55c9aCfEe50f52600Ae7C6a251cd9b145); //address(0x1eAa43544dAa399b87EEcFcC6Fa579D5ea4A6187);

    uint256 constant public startMigration = 1705786025; //1706745600;   // timestamp when migration start 1 February 2024 00:00:00 UTC

    bool public isPause;
    uint256 public totalSlothMinted;
    uint256[] public periodEnd = [1705881599,1705967999,1706054399,1706054499,1706054599,1706054699,1706054799,1706054899,1706745599]; // for test
    //uint256[] public periodEnd = [1706831999,1706918399,1707004799,1707091199,1707177599,1707263999,1707868799,1708473599,1714521599]; // last period will ends on 30 April 2024 23:59:59 UTC
    uint256[] public soyRatio = [100,200,400,800,1000,2000,4000,8000,10000];
    uint256[] public cloeRatio = [80,160,320,640,800,1600,3200,6400,8000];
    uint256 public totalCLOEMigrated;
    
    struct StakeRate {
        uint112 migratedAmount;
        uint112 reservedAmount;
        uint32 rate;
    }

    address[] public stakingContracts = [0x86F7e2ef599690b64f0063b3F978ea6Ae2814f63,0x7d6C70b6561C31935e6B0dd77731FC63D5aC37F2,0x19DcB402162b6937a8ACEac87Ed6c05219c9bEf7,0x31bFf88C6124E1622f81b3Ba7ED219e5d78abd98];
    mapping(address user => StakeRate) public stakingRateReserved;
    uint256 public currentPeriod;

    event Migrate(address user, uint256 soyAmount, uint256 slothAmount);
    event MigrateCLOE(address user, uint256 cloeAmount, uint256 slothAmount);
    event StakingMigrate(address user, uint256 rate, uint256 migratedAmount, uint256 reservedAmount);
    event StakingFixRateMigration(address user, uint256 soyAmount, uint256 slothAmount);
    event SetPeriod(uint256 period, uint256 _periodEnd, uint256 _soyRatio, uint256 _cloeRatio);


    modifier migrationAllowed() {
        require(block.timestamp >= startMigration, "Migration is not started yet");
        require(!isPause, "Migration is paused");
        while(periodEnd[currentPeriod] < block.timestamp) {
            require(currentPeriod < 8, "Migration finished");   // 8 - last period
            currentPeriod++;
        }
        _;
    }

    function tokenReceived(address _from, uint _value, bytes memory data) external returns(bytes4) {
        require(msg.sender == SOY, "Only SOY");
        if (keccak256(data) == keccak256("stakingFixRateMigration")) 
            stakingFixRateMigration(_from, _value);
        else
            migrate(_from, _value, true);
        return this.tokenReceived.selector;
    }

    function migrateCLOE(uint256 amount) external {
        IERC223(CLOE).burnFrom(msg.sender, amount);
        totalCLOEMigrated += amount;
        migrate(msg.sender, amount, false);
    }

    function migrate(address user, uint256 amount, bool isSoy) internal migrationAllowed {
        uint256 slothAmount;
        if(isSoy) {
            slothAmount = amount / soyRatio[currentPeriod];
            emit Migrate(user, amount, slothAmount);
        } else {
            slothAmount = amount / cloeRatio[currentPeriod];
            emit MigrateCLOE(user, amount, slothAmount); 
        }
        totalSlothMinted += slothAmount;
        transferToVesting(user, slothAmount);       
    }

    function stakingMigrate() external migrationAllowed {
        require(stakingRateReserved[msg.sender].rate == 0, "Already migrated");
        uint256 endMigration = periodEnd[8];    // 30 April 2024 23:59:59 UTC
        uint256 migratedAmount;
        uint256 reservedAmount;
        for (uint i; i<4; i++) {
            IStacking.Staker memory s = IStacking(stakingContracts[i]).staker(msg.sender);
            if(s.endTime > endMigration || (s.endTime == 0 && i != 0)) migratedAmount += s.amount;  // release time after and of migration and it's not a 30 days staking
            else reservedAmount += s.amount;
        }
        stakingRateReserved[msg.sender] = StakeRate(uint112(migratedAmount),uint112(reservedAmount),uint32(soyRatio[currentPeriod]));
        migrate(msg.sender, migratedAmount, true);
        emit StakingMigrate(msg.sender, soyRatio[currentPeriod], migratedAmount, reservedAmount);
    }

    function stakingFixRateMigration(address user, uint256 amount) internal {
            uint256 reservedAmount = stakingRateReserved[user].reservedAmount;
            require(reservedAmount >= amount, "Exceed reserved amount");
            uint256 slothAmount = amount / stakingRateReserved[user].rate;
            stakingRateReserved[user].reservedAmount = uint112(reservedAmount - amount);
            emit StakingFixRateMigration(user, amount, slothAmount); 
            totalSlothMinted += slothAmount;
            transferToVesting(user, slothAmount);       
    }

    function transferToVesting(address user, uint256 amount) internal {
        IERC223(0x7873d09AF3d6965988831C60c7D38DBbd2eAEAB0).mint(user, amount); // for testing use token test4
    }

    function setPause(bool pause) external onlyOwner {
        isPause = pause;
    }

    function setPeriod(uint256 period, uint256 _periodEnd, uint256 _soyRatio, uint256 _cloeRatio) external onlyOwner {
        if (period < periodEnd.length) {
            periodEnd[period] = _periodEnd;
            soyRatio[period] = _soyRatio;
            cloeRatio[period] = _cloeRatio;
        } else {
            periodEnd.push(_periodEnd);
            soyRatio.push(_soyRatio);
            cloeRatio.push(_cloeRatio);
        }
        emit SetPeriod(period, _periodEnd, _soyRatio, _cloeRatio);
    }

    function rescueERC20(address token, address to) external onlyOwner {
        require(token != SOY, "wrong token");
        uint256 value = IERC223(token).balanceOf(address(this));
        IERC223(token).transfer(to, value);
    }
}
        

Contract ABI

[{"type":"event","name":"Migrate","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"soyAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"slothAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"MigrateCLOE","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"cloeAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"slothAmount","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":"SetPeriod","inputs":[{"type":"uint256","name":"period","internalType":"uint256","indexed":false},{"type":"uint256","name":"_periodEnd","internalType":"uint256","indexed":false},{"type":"uint256","name":"_soyRatio","internalType":"uint256","indexed":false},{"type":"uint256","name":"_cloeRatio","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"StakingFixRateMigration","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"soyAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"slothAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"StakingMigrate","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"rate","internalType":"uint256","indexed":false},{"type":"uint256","name":"migratedAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"reservedAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CLOE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SOY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cloeRatio","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentPeriod","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrateCLOE","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"periodEnd","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueERC20","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPause","inputs":[{"type":"bool","name":"pause","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPeriod","inputs":[{"type":"uint256","name":"period","internalType":"uint256"},{"type":"uint256","name":"_periodEnd","internalType":"uint256"},{"type":"uint256","name":"_soyRatio","internalType":"uint256"},{"type":"uint256","name":"_cloeRatio","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"soyRatio","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"stakingContracts","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"stakingMigrate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint112","name":"migratedAmount","internalType":"uint112"},{"type":"uint112","name":"reservedAmount","internalType":"uint112"},{"type":"uint32","name":"rate","internalType":"uint32"}],"name":"stakingRateReserved","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"startMigration","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes4","name":"","internalType":"bytes4"}],"name":"tokenReceived","inputs":[{"type":"address","name":"_from","internalType":"address"},{"type":"uint256","name":"_value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalCLOEMigrated","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSlothMinted","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
              

Contract Creation Code

Verify & Publish
0x6101a06040526365adafff60809081526365af017f60a0526365b052ff60c0526365b0536360e0526365b053c7610100526365b0542b610120526365b0548f610140526365b054f3610160526365badeff610180526200006490600290600962000202565b5060408051610120810182526064815260c860208201526101909181019190915261032060608201526103e860808201526107d060a0820152610fa060c0820152611f4060e0820152612710610100820152620000c69060039060096200025a565b5060408051610120810182526050815260a060208201819052610140928201929092526102806060820152610320608082015261064091810191909152610c8060c082015261190060e0820152611f406101008201526200012c9060049060096200025a565b50604080516080810182527386f7e2ef599690b64f0063b3f978ea6ae2814f638152737d6c70b6561c31935e6b0dd77731fc63d5ac37f260208201527319dcb402162b6937a8aceac87ed6c05219c9bef7918101919091527331bff88c6124e1622f81b3ba7ed219e5d78abd986060820152620001ae9060069060046200029e565b50348015620001bc57600080fd5b50600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36200030d565b82805482825590600052602060002090810192821562000248579160200282015b8281111562000248578251829063ffffffff1690559160200191906001019062000223565b5062000256929150620002f6565b5090565b82805482825590600052602060002090810192821562000248579160200282015b8281111562000248578251829061ffff169055916020019190600101906200027b565b82805482825590600052602060002090810192821562000248579160200282015b828111156200024857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002bf565b5b80821115620002565760008155600101620002f7565b61158a806200031d6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063715018a6116100b8578063be9e2c9a1161007c578063be9e2c9a14610293578063bedb86fb146102ae578063bf3c35c3146102c1578063e79b9e21146102d4578063f2fde38b14610344578063ff0938a71461035757600080fd5b8063715018a61461022757806384daaf541461022f5780638943ec02146102375780638da5cb5b146102635780638f32d59b1461027457600080fd5b806318264f331161010a57806318264f33146101c957806327614ec4146101d45780632da49d16146101e75780635d799f87146101f05780635eb325eb146102035780637028768f1461021e57600080fd5b806306040618146101475780630a352b99146101635780631109b19a146101765780631167186e146101a157806317aeb5f7146101b4575b600080fd5b61015060085481565b6040519081526020015b60405180910390f35b61015061017136600461119a565b61036b565b61018961018436600461119a565b61038c565b6040516001600160a01b03909116815260200161015a565b6101506101af36600461119a565b6103b6565b6101c76101c23660046111b3565b6103c6565b005b6101506365ac3aa981565b6101506101e236600461119a565b61054c565b61015060055481565b6101c76101fe3660046111fa565b61055c565b61018973d29588b55c9acfee50f52600ae7c6a251cd9b14581565b61015060015481565b6101c76106c9565b6101c761073d565b61024a61024536600461127a565b610b28565b6040516001600160e01b0319909116815260200161015a565b6000546001600160a01b0316610189565b6000546001600160a01b031633145b604051901515815260200161015a565b61018973e1a77164e5c6d9e0fc0b23d11e0874de6b328e6881565b6101c76102bc366004611339565b610bd0565b6101c76102cf36600461119a565b610c18565b6103186102e236600461135d565b6007602052600090815260409020546001600160701b0380821691600160701b810490911690600160e01b900463ffffffff1683565b604080516001600160701b03948516815293909216602084015263ffffffff169082015260600161015a565b6101c761035236600461135d565b610cbc565b60005461028390600160a01b900460ff1681565b6003818154811061037b57600080fd5b600091825260209091200154905081565b6006818154811061039c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6004818154811061037b57600080fd5b6000546001600160a01b031633146103f95760405162461bcd60e51b81526004016103f09061137a565b60405180910390fd5b60025484101561046c5782600285815481106104175761041761139d565b906000526020600020018190555081600385815481106104395761043961139d565b9060005260206000200181905550806004858154811061045b5761045b61139d565b6000918252602090912001556104fe565b6002805460018181019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01849055600380548083019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018390556004805491820181556000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018190555b6040805185815260208101859052908101839052606081018290527f132ea6b97a4eea2a5d619f7617dd4282377e3c165fa1f801fc5e26bb977519999060800160405180910390a150505050565b6002818154811061037b57600080fd5b6000546001600160a01b031633146105865760405162461bcd60e51b81526004016103f09061137a565b73e1a77164e5c6d9e0fc0b23d11e0874de6b328e67196001600160a01b038316016105e15760405162461bcd60e51b815260206004820152600b60248201526a3bb937b733903a37b5b2b760a91b60448201526064016103f0565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c91906113b3565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390529192509084169063a9059cbb906044016020604051808303816000875af115801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c391906113cc565b50505050565b6000546001600160a01b031633146106f35760405162461bcd60e51b81526004016103f09061137a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6365ac3aa94210156107915760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103f0565b600054600160a01b900460ff16156107e15760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103f0565b426002600854815481106107f7576107f761139d565b9060005260206000200154101561086857600880541061084e5760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103f0565b6008805490600061085e836113ff565b91905055506107e1565b33600090815260076020526040902054600160e01b900463ffffffff16156108c55760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481b5a59dc985d195960821b60448201526064016103f0565b600060026008815481106108db576108db61139d565b9060005260206000200154905060008060005b60048110156109f05760006006828154811061090c5761090c61139d565b6000918252602090912001546040516320b93b6960e21b81523360048201526001600160a01b03909116906382e4eda49060240161010060405180830381865afa15801561095e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109829190611449565b905084816040015167ffffffffffffffff1611806109b65750604081015167ffffffffffffffff161580156109b657508115155b156109ce5780516109c79085611506565b93506109dd565b80516109da9084611506565b92505b50806109e8816113ff565b9150506108ee565b506040518060600160405280836001600160701b03168152602001826001600160701b03168152602001600360085481548110610a2f57610a2f61139d565b600091825260208083209091015463ffffffff908116909352338083526007825260409283902085518154938701519690940151909416600160e01b026001600160e01b036001600160701b03968716600160701b026001600160e01b031990941696909416959095179190911791909116929092179055610ab390836001610cef565b7f17bd98d373ca29f15c4088751e90d4b6ab74d72e75b677238ac452c8ab20dbe333600360085481548110610aea57610aea61139d565b60009182526020918290200154604080516001600160a01b0390941684529183015281018490526060810183905260800160405180910390a1505050565b60003373e1a77164e5c6d9e0fc0b23d11e0874de6b328e6814610b785760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920534f5960c01b60448201526064016103f0565b815160208301207fd62bf507207cbfed0be58152d90527386cb09b87448f61308aa066342be1f0f401610bb457610baf8484610f3b565b610bc0565b610bc084846001610cef565b506344a1f60160e11b9392505050565b6000546001600160a01b03163314610bfa5760405162461bcd60e51b81526004016103f09061137a565b60008054911515600160a01b0260ff60a01b19909216919091179055565b60405163079cc67960e41b81523360048201526024810182905273d29588b55c9acfee50f52600ae7c6a251cd9b145906379cc6790906044016020604051808303816000875af1158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9491906113cc565b508060056000828254610ca79190611506565b90915550610cb9905033826000610cef565b50565b6000546001600160a01b03163314610ce65760405162461bcd60e51b81526004016103f09061137a565b610cb981611071565b6365ac3aa9421015610d435760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103f0565b600054600160a01b900460ff1615610d935760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103f0565b42600260085481548110610da957610da961139d565b90600052602060002001541015610e1a576008805410610e005760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103f0565b60088054906000610e10836113ff565b9190505550610d93565b60008115610e9f57600360085481548110610e3757610e3761139d565b906000526020600020015483610e4d919061151f565b604080516001600160a01b0387168152602081018690529081018290529091507fd44a6dd2bfac4f6bc02d116d96aa12c24e8580626b95cb6a2f543f18cb61bd4c9060600160405180910390a1610f19565b600460085481548110610eb457610eb461139d565b906000526020600020015483610eca919061151f565b604080516001600160a01b0387168152602081018690529081018290529091507f360e9013a4321fcce6c9385c1811b27dedd609caddbba8e813e7e5c1d4a6507b906060015b60405180910390a15b8060016000828254610f2b9190611506565b909155506106c390508482611122565b6001600160a01b038216600090815260076020526040902054600160701b90046001600160701b031681811015610fad5760405162461bcd60e51b8152602060048201526016602482015275115e18d95959081c995cd95c9d995908185b5bdd5b9d60521b60448201526064016103f0565b6001600160a01b038316600090815260076020526040812054610fdd90600160e01b900463ffffffff168461151f565b9050610fe98383611541565b6001600160a01b03851660008181526007602090815260409182902080546001600160701b0395909516600160701b026dffffffffffffffffffffffffffff60701b199095169490941790935580519182529181018590529081018290527f69ad942cd0be186fc035367df354cdda64c5048503ac199f931f2def922b3d3e90606001610f10565b6001600160a01b0381166110c75760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f776564000000000000000060448201526064016103f0565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516340c10f1960e01b81526001600160a01b038316600482015260248101829052737873d09af3d6965988831c60c7d38dbbd2eaeab0906340c10f1990604401600060405180830381600087803b15801561117e57600080fd5b505af1158015611192573d6000803e3d6000fd5b505050505050565b6000602082840312156111ac57600080fd5b5035919050565b600080600080608085870312156111c957600080fd5b5050823594602084013594506040840135936060013592509050565b6001600160a01b0381168114610cb957600080fd5b6000806040838503121561120d57600080fd5b8235611218816111e5565b91506020830135611228816111e5565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561127257611272611233565b604052919050565b60008060006060848603121561128f57600080fd5b833561129a816111e5565b92506020848101359250604085013567ffffffffffffffff808211156112bf57600080fd5b818701915087601f8301126112d357600080fd5b8135818111156112e5576112e5611233565b6112f7601f8201601f19168501611249565b9150808252888482850101111561130d57600080fd5b80848401858401376000848284010152508093505050509250925092565b8015158114610cb957600080fd5b60006020828403121561134b57600080fd5b81356113568161132b565b9392505050565b60006020828403121561136f57600080fd5b8135611356816111e5565b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156113c557600080fd5b5051919050565b6000602082840312156113de57600080fd5b81516113568161132b565b634e487b7160e01b600052601160045260246000fd5b600060018201611411576114116113e9565b5060010190565b805167ffffffffffffffff8116811461143057600080fd5b919050565b805163ffffffff8116811461143057600080fd5b600061010080838503121561145d57600080fd5b6040519081019067ffffffffffffffff8211818310171561148057611480611233565b81604052835181526020840151602082015261149e60408501611418565b60408201526114af60608501611418565b60608201526114c060808501611418565b60808201526114d160a08501611435565b60a08201526114e260c08501611435565b60c082015260e084015191506114f7826111e5565b60e08101919091529392505050565b80820180821115611519576115196113e9565b92915050565b60008261153c57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611519576115196113e956fea2646970667358221220e5fbdbdc47cf1b4f3b9e78615a2bad344d54974c3122f75683a83f44aa49794064736f6c63430008130033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101425760003560e01c8063715018a6116100b8578063be9e2c9a1161007c578063be9e2c9a14610293578063bedb86fb146102ae578063bf3c35c3146102c1578063e79b9e21146102d4578063f2fde38b14610344578063ff0938a71461035757600080fd5b8063715018a61461022757806384daaf541461022f5780638943ec02146102375780638da5cb5b146102635780638f32d59b1461027457600080fd5b806318264f331161010a57806318264f33146101c957806327614ec4146101d45780632da49d16146101e75780635d799f87146101f05780635eb325eb146102035780637028768f1461021e57600080fd5b806306040618146101475780630a352b99146101635780631109b19a146101765780631167186e146101a157806317aeb5f7146101b4575b600080fd5b61015060085481565b6040519081526020015b60405180910390f35b61015061017136600461119a565b61036b565b61018961018436600461119a565b61038c565b6040516001600160a01b03909116815260200161015a565b6101506101af36600461119a565b6103b6565b6101c76101c23660046111b3565b6103c6565b005b6101506365ac3aa981565b6101506101e236600461119a565b61054c565b61015060055481565b6101c76101fe3660046111fa565b61055c565b61018973d29588b55c9acfee50f52600ae7c6a251cd9b14581565b61015060015481565b6101c76106c9565b6101c761073d565b61024a61024536600461127a565b610b28565b6040516001600160e01b0319909116815260200161015a565b6000546001600160a01b0316610189565b6000546001600160a01b031633145b604051901515815260200161015a565b61018973e1a77164e5c6d9e0fc0b23d11e0874de6b328e6881565b6101c76102bc366004611339565b610bd0565b6101c76102cf36600461119a565b610c18565b6103186102e236600461135d565b6007602052600090815260409020546001600160701b0380821691600160701b810490911690600160e01b900463ffffffff1683565b604080516001600160701b03948516815293909216602084015263ffffffff169082015260600161015a565b6101c761035236600461135d565b610cbc565b60005461028390600160a01b900460ff1681565b6003818154811061037b57600080fd5b600091825260209091200154905081565b6006818154811061039c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6004818154811061037b57600080fd5b6000546001600160a01b031633146103f95760405162461bcd60e51b81526004016103f09061137a565b60405180910390fd5b60025484101561046c5782600285815481106104175761041761139d565b906000526020600020018190555081600385815481106104395761043961139d565b9060005260206000200181905550806004858154811061045b5761045b61139d565b6000918252602090912001556104fe565b6002805460018181019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01849055600380548083019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018390556004805491820181556000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018190555b6040805185815260208101859052908101839052606081018290527f132ea6b97a4eea2a5d619f7617dd4282377e3c165fa1f801fc5e26bb977519999060800160405180910390a150505050565b6002818154811061037b57600080fd5b6000546001600160a01b031633146105865760405162461bcd60e51b81526004016103f09061137a565b73e1a77164e5c6d9e0fc0b23d11e0874de6b328e67196001600160a01b038316016105e15760405162461bcd60e51b815260206004820152600b60248201526a3bb937b733903a37b5b2b760a91b60448201526064016103f0565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa158015610628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064c91906113b3565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390529192509084169063a9059cbb906044016020604051808303816000875af115801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c391906113cc565b50505050565b6000546001600160a01b031633146106f35760405162461bcd60e51b81526004016103f09061137a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6365ac3aa94210156107915760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103f0565b600054600160a01b900460ff16156107e15760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103f0565b426002600854815481106107f7576107f761139d565b9060005260206000200154101561086857600880541061084e5760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103f0565b6008805490600061085e836113ff565b91905055506107e1565b33600090815260076020526040902054600160e01b900463ffffffff16156108c55760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481b5a59dc985d195960821b60448201526064016103f0565b600060026008815481106108db576108db61139d565b9060005260206000200154905060008060005b60048110156109f05760006006828154811061090c5761090c61139d565b6000918252602090912001546040516320b93b6960e21b81523360048201526001600160a01b03909116906382e4eda49060240161010060405180830381865afa15801561095e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109829190611449565b905084816040015167ffffffffffffffff1611806109b65750604081015167ffffffffffffffff161580156109b657508115155b156109ce5780516109c79085611506565b93506109dd565b80516109da9084611506565b92505b50806109e8816113ff565b9150506108ee565b506040518060600160405280836001600160701b03168152602001826001600160701b03168152602001600360085481548110610a2f57610a2f61139d565b600091825260208083209091015463ffffffff908116909352338083526007825260409283902085518154938701519690940151909416600160e01b026001600160e01b036001600160701b03968716600160701b026001600160e01b031990941696909416959095179190911791909116929092179055610ab390836001610cef565b7f17bd98d373ca29f15c4088751e90d4b6ab74d72e75b677238ac452c8ab20dbe333600360085481548110610aea57610aea61139d565b60009182526020918290200154604080516001600160a01b0390941684529183015281018490526060810183905260800160405180910390a1505050565b60003373e1a77164e5c6d9e0fc0b23d11e0874de6b328e6814610b785760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920534f5960c01b60448201526064016103f0565b815160208301207fd62bf507207cbfed0be58152d90527386cb09b87448f61308aa066342be1f0f401610bb457610baf8484610f3b565b610bc0565b610bc084846001610cef565b506344a1f60160e11b9392505050565b6000546001600160a01b03163314610bfa5760405162461bcd60e51b81526004016103f09061137a565b60008054911515600160a01b0260ff60a01b19909216919091179055565b60405163079cc67960e41b81523360048201526024810182905273d29588b55c9acfee50f52600ae7c6a251cd9b145906379cc6790906044016020604051808303816000875af1158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9491906113cc565b508060056000828254610ca79190611506565b90915550610cb9905033826000610cef565b50565b6000546001600160a01b03163314610ce65760405162461bcd60e51b81526004016103f09061137a565b610cb981611071565b6365ac3aa9421015610d435760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103f0565b600054600160a01b900460ff1615610d935760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103f0565b42600260085481548110610da957610da961139d565b90600052602060002001541015610e1a576008805410610e005760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103f0565b60088054906000610e10836113ff565b9190505550610d93565b60008115610e9f57600360085481548110610e3757610e3761139d565b906000526020600020015483610e4d919061151f565b604080516001600160a01b0387168152602081018690529081018290529091507fd44a6dd2bfac4f6bc02d116d96aa12c24e8580626b95cb6a2f543f18cb61bd4c9060600160405180910390a1610f19565b600460085481548110610eb457610eb461139d565b906000526020600020015483610eca919061151f565b604080516001600160a01b0387168152602081018690529081018290529091507f360e9013a4321fcce6c9385c1811b27dedd609caddbba8e813e7e5c1d4a6507b906060015b60405180910390a15b8060016000828254610f2b9190611506565b909155506106c390508482611122565b6001600160a01b038216600090815260076020526040902054600160701b90046001600160701b031681811015610fad5760405162461bcd60e51b8152602060048201526016602482015275115e18d95959081c995cd95c9d995908185b5bdd5b9d60521b60448201526064016103f0565b6001600160a01b038316600090815260076020526040812054610fdd90600160e01b900463ffffffff168461151f565b9050610fe98383611541565b6001600160a01b03851660008181526007602090815260409182902080546001600160701b0395909516600160701b026dffffffffffffffffffffffffffff60701b199095169490941790935580519182529181018590529081018290527f69ad942cd0be186fc035367df354cdda64c5048503ac199f931f2def922b3d3e90606001610f10565b6001600160a01b0381166110c75760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f776564000000000000000060448201526064016103f0565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516340c10f1960e01b81526001600160a01b038316600482015260248101829052737873d09af3d6965988831c60c7d38dbbd2eaeab0906340c10f1990604401600060405180830381600087803b15801561117e57600080fd5b505af1158015611192573d6000803e3d6000fd5b505050505050565b6000602082840312156111ac57600080fd5b5035919050565b600080600080608085870312156111c957600080fd5b5050823594602084013594506040840135936060013592509050565b6001600160a01b0381168114610cb957600080fd5b6000806040838503121561120d57600080fd5b8235611218816111e5565b91506020830135611228816111e5565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561127257611272611233565b604052919050565b60008060006060848603121561128f57600080fd5b833561129a816111e5565b92506020848101359250604085013567ffffffffffffffff808211156112bf57600080fd5b818701915087601f8301126112d357600080fd5b8135818111156112e5576112e5611233565b6112f7601f8201601f19168501611249565b9150808252888482850101111561130d57600080fd5b80848401858401376000848284010152508093505050509250925092565b8015158114610cb957600080fd5b60006020828403121561134b57600080fd5b81356113568161132b565b9392505050565b60006020828403121561136f57600080fd5b8135611356816111e5565b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156113c557600080fd5b5051919050565b6000602082840312156113de57600080fd5b81516113568161132b565b634e487b7160e01b600052601160045260246000fd5b600060018201611411576114116113e9565b5060010190565b805167ffffffffffffffff8116811461143057600080fd5b919050565b805163ffffffff8116811461143057600080fd5b600061010080838503121561145d57600080fd5b6040519081019067ffffffffffffffff8211818310171561148057611480611233565b81604052835181526020840151602082015261149e60408501611418565b60408201526114af60608501611418565b60608201526114c060808501611418565b60808201526114d160a08501611435565b60a08201526114e260c08501611435565b60c082015260e084015191506114f7826111e5565b60e08101919091529392505050565b80820180821115611519576115196113e9565b92915050565b60008261153c57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611519576115196113e956fea2646970667358221220e5fbdbdc47cf1b4f3b9e78615a2bad344d54974c3122f75683a83f44aa49794064736f6c63430008130033