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:53.840557Z
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(0xE1A77164e5C6d9E0fc0b23D11e0874De6B328e68); //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(0xd29588B55c9aCfEe50f52600Ae7C6a251cd9b145).mint(user, amount); // for testing
}
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
0x6101a06040526365adafff60809081526365af017f60a0526365b052ff60c0526365b0536360e0526365b053c7610100526365b0542b610120526365b0548f610140526365b054f3610160526365badeff610180526200006490600290600962000202565b5060408051610120810182526064815260c860208201526101909181019190915261032060608201526103e860808201526107d060a0820152610fa060c0820152611f4060e0820152612710610100820152620000c69060039060096200025a565b5060408051610120810182526050815260a060208201819052610140928201929092526102806060820152610320608082015261064091810191909152610c8060c082015261190060e0820152611f406101008201526200012c9060049060096200025a565b50604080516080810182527386f7e2ef599690b64f0063b3f978ea6ae2814f638152737d6c70b6561c31935e6b0dd77731fc63d5ac37f260208201527319dcb402162b6937a8aceac87ed6c05219c9bef7918101919091527331bff88c6124e1622f81b3ba7ed219e5d78abd986060820152620001ae9060069060046200029e565b50348015620001bc57600080fd5b50600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36200030d565b82805482825590600052602060002090810192821562000248579160200282015b8281111562000248578251829063ffffffff1690559160200191906001019062000223565b5062000256929150620002f6565b5090565b82805482825590600052602060002090810192821562000248579160200282015b8281111562000248578251829061ffff169055916020019190600101906200027b565b82805482825590600052602060002090810192821562000248579160200282015b828111156200024857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620002bf565b5b80821115620002565760008155600101620002f7565b61156f806200031d6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063715018a6116100b8578063be9e2c9a1161007c578063be9e2c9a14610203578063bedb86fb14610293578063bf3c35c3146102a6578063e79b9e21146102b9578063f2fde38b14610329578063ff0938a71461033c57600080fd5b8063715018a61461022757806384daaf541461022f5780638943ec02146102375780638da5cb5b146102635780638f32d59b1461027457600080fd5b806318264f331161010a57806318264f33146101c957806327614ec4146101d45780632da49d16146101e75780635d799f87146101f05780635eb325eb146102035780637028768f1461021e57600080fd5b806306040618146101475780630a352b99146101635780631109b19a146101765780631167186e146101a157806317aeb5f7146101b4575b600080fd5b61015060085481565b6040519081526020015b60405180910390f35b61015061017136600461117f565b610350565b61018961018436600461117f565b610371565b6040516001600160a01b03909116815260200161015a565b6101506101af36600461117f565b61039b565b6101c76101c2366004611198565b6103ab565b005b6101506365ac3aa981565b6101506101e236600461117f565b610531565b61015060055481565b6101c76101fe3660046111df565b610541565b61018973e1a77164e5c6d9e0fc0b23d11e0874de6b328e6881565b61015060015481565b6101c76106ae565b6101c7610722565b61024a61024536600461125f565b610b0d565b6040516001600160e01b0319909116815260200161015a565b6000546001600160a01b0316610189565b6000546001600160a01b031633145b604051901515815260200161015a565b6101c76102a136600461131e565b610bb5565b6101c76102b436600461117f565b610bfd565b6102fd6102c7366004611342565b6007602052600090815260409020546001600160701b0380821691600160701b810490911690600160e01b900463ffffffff1683565b604080516001600160701b03948516815293909216602084015263ffffffff169082015260600161015a565b6101c7610337366004611342565b610ca1565b60005461028390600160a01b900460ff1681565b6003818154811061036057600080fd5b600091825260209091200154905081565b6006818154811061038157600080fd5b6000918252602090912001546001600160a01b0316905081565b6004818154811061036057600080fd5b6000546001600160a01b031633146103de5760405162461bcd60e51b81526004016103d59061135f565b60405180910390fd5b6002548410156104515782600285815481106103fc576103fc611382565b9060005260206000200181905550816003858154811061041e5761041e611382565b9060005260206000200181905550806004858154811061044057610440611382565b6000918252602090912001556104e3565b6002805460018181019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01849055600380548083019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018390556004805491820181556000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018190555b6040805185815260208101859052908101839052606081018290527f132ea6b97a4eea2a5d619f7617dd4282377e3c165fa1f801fc5e26bb977519999060800160405180910390a150505050565b6002818154811061036057600080fd5b6000546001600160a01b0316331461056b5760405162461bcd60e51b81526004016103d59061135f565b73e1a77164e5c6d9e0fc0b23d11e0874de6b328e67196001600160a01b038316016105c65760405162461bcd60e51b815260206004820152600b60248201526a3bb937b733903a37b5b2b760a91b60448201526064016103d5565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561060d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106319190611398565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390529192509084169063a9059cbb906044016020604051808303816000875af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a891906113b1565b50505050565b6000546001600160a01b031633146106d85760405162461bcd60e51b81526004016103d59061135f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6365ac3aa94210156107765760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103d5565b600054600160a01b900460ff16156107c65760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103d5565b426002600854815481106107dc576107dc611382565b9060005260206000200154101561084d5760088054106108335760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103d5565b60088054906000610843836113e4565b91905055506107c6565b33600090815260076020526040902054600160e01b900463ffffffff16156108aa5760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481b5a59dc985d195960821b60448201526064016103d5565b600060026008815481106108c0576108c0611382565b9060005260206000200154905060008060005b60048110156109d5576000600682815481106108f1576108f1611382565b6000918252602090912001546040516320b93b6960e21b81523360048201526001600160a01b03909116906382e4eda49060240161010060405180830381865afa158015610943573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610967919061142e565b905084816040015167ffffffffffffffff16118061099b5750604081015167ffffffffffffffff1615801561099b57508115155b156109b35780516109ac90856114eb565b93506109c2565b80516109bf90846114eb565b92505b50806109cd816113e4565b9150506108d3565b506040518060600160405280836001600160701b03168152602001826001600160701b03168152602001600360085481548110610a1457610a14611382565b600091825260208083209091015463ffffffff908116909352338083526007825260409283902085518154938701519690940151909416600160e01b026001600160e01b036001600160701b03968716600160701b026001600160e01b031990941696909416959095179190911791909116929092179055610a9890836001610cd4565b7f17bd98d373ca29f15c4088751e90d4b6ab74d72e75b677238ac452c8ab20dbe333600360085481548110610acf57610acf611382565b60009182526020918290200154604080516001600160a01b0390941684529183015281018490526060810183905260800160405180910390a1505050565b60003373e1a77164e5c6d9e0fc0b23d11e0874de6b328e6814610b5d5760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920534f5960c01b60448201526064016103d5565b815160208301207fd62bf507207cbfed0be58152d90527386cb09b87448f61308aa066342be1f0f401610b9957610b948484610f20565b610ba5565b610ba584846001610cd4565b506344a1f60160e11b9392505050565b6000546001600160a01b03163314610bdf5760405162461bcd60e51b81526004016103d59061135f565b60008054911515600160a01b0260ff60a01b19909216919091179055565b60405163079cc67960e41b81523360048201526024810182905273e1a77164e5c6d9e0fc0b23d11e0874de6b328e68906379cc6790906044016020604051808303816000875af1158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7991906113b1565b508060056000828254610c8c91906114eb565b90915550610c9e905033826000610cd4565b50565b6000546001600160a01b03163314610ccb5760405162461bcd60e51b81526004016103d59061135f565b610c9e81611056565b6365ac3aa9421015610d285760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103d5565b600054600160a01b900460ff1615610d785760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103d5565b42600260085481548110610d8e57610d8e611382565b90600052602060002001541015610dff576008805410610de55760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103d5565b60088054906000610df5836113e4565b9190505550610d78565b60008115610e8457600360085481548110610e1c57610e1c611382565b906000526020600020015483610e329190611504565b604080516001600160a01b0387168152602081018690529081018290529091507fd44a6dd2bfac4f6bc02d116d96aa12c24e8580626b95cb6a2f543f18cb61bd4c9060600160405180910390a1610efe565b600460085481548110610e9957610e99611382565b906000526020600020015483610eaf9190611504565b604080516001600160a01b0387168152602081018690529081018290529091507f360e9013a4321fcce6c9385c1811b27dedd609caddbba8e813e7e5c1d4a6507b906060015b60405180910390a15b8060016000828254610f1091906114eb565b909155506106a890508482611107565b6001600160a01b038216600090815260076020526040902054600160701b90046001600160701b031681811015610f925760405162461bcd60e51b8152602060048201526016602482015275115e18d95959081c995cd95c9d995908185b5bdd5b9d60521b60448201526064016103d5565b6001600160a01b038316600090815260076020526040812054610fc290600160e01b900463ffffffff1684611504565b9050610fce8383611526565b6001600160a01b03851660008181526007602090815260409182902080546001600160701b0395909516600160701b026dffffffffffffffffffffffffffff60701b199095169490941790935580519182529181018590529081018290527f69ad942cd0be186fc035367df354cdda64c5048503ac199f931f2def922b3d3e90606001610ef5565b6001600160a01b0381166110ac5760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f776564000000000000000060448201526064016103d5565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516340c10f1960e01b81526001600160a01b03831660048201526024810182905273d29588b55c9acfee50f52600ae7c6a251cd9b145906340c10f1990604401600060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b505050505050565b60006020828403121561119157600080fd5b5035919050565b600080600080608085870312156111ae57600080fd5b5050823594602084013594506040840135936060013592509050565b6001600160a01b0381168114610c9e57600080fd5b600080604083850312156111f257600080fd5b82356111fd816111ca565b9150602083013561120d816111ca565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561125757611257611218565b604052919050565b60008060006060848603121561127457600080fd5b833561127f816111ca565b92506020848101359250604085013567ffffffffffffffff808211156112a457600080fd5b818701915087601f8301126112b857600080fd5b8135818111156112ca576112ca611218565b6112dc601f8201601f1916850161122e565b915080825288848285010111156112f257600080fd5b80848401858401376000848284010152508093505050509250925092565b8015158114610c9e57600080fd5b60006020828403121561133057600080fd5b813561133b81611310565b9392505050565b60006020828403121561135457600080fd5b813561133b816111ca565b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156113aa57600080fd5b5051919050565b6000602082840312156113c357600080fd5b815161133b81611310565b634e487b7160e01b600052601160045260246000fd5b6000600182016113f6576113f66113ce565b5060010190565b805167ffffffffffffffff8116811461141557600080fd5b919050565b805163ffffffff8116811461141557600080fd5b600061010080838503121561144257600080fd5b6040519081019067ffffffffffffffff8211818310171561146557611465611218565b816040528351815260208401516020820152611483604085016113fd565b6040820152611494606085016113fd565b60608201526114a5608085016113fd565b60808201526114b660a0850161141a565b60a08201526114c760c0850161141a565b60c082015260e084015191506114dc826111ca565b60e08101919091529392505050565b808201808211156114fe576114fe6113ce565b92915050565b60008261152157634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156114fe576114fe6113ce56fea26469706673582212203c057deb9f6b794bbc516e2c0ad0905f998fa5feeaa25d31e72cb13ee6ceea1c64736f6c63430008130033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101425760003560e01c8063715018a6116100b8578063be9e2c9a1161007c578063be9e2c9a14610203578063bedb86fb14610293578063bf3c35c3146102a6578063e79b9e21146102b9578063f2fde38b14610329578063ff0938a71461033c57600080fd5b8063715018a61461022757806384daaf541461022f5780638943ec02146102375780638da5cb5b146102635780638f32d59b1461027457600080fd5b806318264f331161010a57806318264f33146101c957806327614ec4146101d45780632da49d16146101e75780635d799f87146101f05780635eb325eb146102035780637028768f1461021e57600080fd5b806306040618146101475780630a352b99146101635780631109b19a146101765780631167186e146101a157806317aeb5f7146101b4575b600080fd5b61015060085481565b6040519081526020015b60405180910390f35b61015061017136600461117f565b610350565b61018961018436600461117f565b610371565b6040516001600160a01b03909116815260200161015a565b6101506101af36600461117f565b61039b565b6101c76101c2366004611198565b6103ab565b005b6101506365ac3aa981565b6101506101e236600461117f565b610531565b61015060055481565b6101c76101fe3660046111df565b610541565b61018973e1a77164e5c6d9e0fc0b23d11e0874de6b328e6881565b61015060015481565b6101c76106ae565b6101c7610722565b61024a61024536600461125f565b610b0d565b6040516001600160e01b0319909116815260200161015a565b6000546001600160a01b0316610189565b6000546001600160a01b031633145b604051901515815260200161015a565b6101c76102a136600461131e565b610bb5565b6101c76102b436600461117f565b610bfd565b6102fd6102c7366004611342565b6007602052600090815260409020546001600160701b0380821691600160701b810490911690600160e01b900463ffffffff1683565b604080516001600160701b03948516815293909216602084015263ffffffff169082015260600161015a565b6101c7610337366004611342565b610ca1565b60005461028390600160a01b900460ff1681565b6003818154811061036057600080fd5b600091825260209091200154905081565b6006818154811061038157600080fd5b6000918252602090912001546001600160a01b0316905081565b6004818154811061036057600080fd5b6000546001600160a01b031633146103de5760405162461bcd60e51b81526004016103d59061135f565b60405180910390fd5b6002548410156104515782600285815481106103fc576103fc611382565b9060005260206000200181905550816003858154811061041e5761041e611382565b9060005260206000200181905550806004858154811061044057610440611382565b6000918252602090912001556104e3565b6002805460018181019092557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01849055600380548083019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018390556004805491820181556000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b018190555b6040805185815260208101859052908101839052606081018290527f132ea6b97a4eea2a5d619f7617dd4282377e3c165fa1f801fc5e26bb977519999060800160405180910390a150505050565b6002818154811061036057600080fd5b6000546001600160a01b0316331461056b5760405162461bcd60e51b81526004016103d59061135f565b73e1a77164e5c6d9e0fc0b23d11e0874de6b328e67196001600160a01b038316016105c65760405162461bcd60e51b815260206004820152600b60248201526a3bb937b733903a37b5b2b760a91b60448201526064016103d5565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561060d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106319190611398565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390529192509084169063a9059cbb906044016020604051808303816000875af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a891906113b1565b50505050565b6000546001600160a01b031633146106d85760405162461bcd60e51b81526004016103d59061135f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6365ac3aa94210156107765760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103d5565b600054600160a01b900460ff16156107c65760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103d5565b426002600854815481106107dc576107dc611382565b9060005260206000200154101561084d5760088054106108335760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103d5565b60088054906000610843836113e4565b91905055506107c6565b33600090815260076020526040902054600160e01b900463ffffffff16156108aa5760405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481b5a59dc985d195960821b60448201526064016103d5565b600060026008815481106108c0576108c0611382565b9060005260206000200154905060008060005b60048110156109d5576000600682815481106108f1576108f1611382565b6000918252602090912001546040516320b93b6960e21b81523360048201526001600160a01b03909116906382e4eda49060240161010060405180830381865afa158015610943573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610967919061142e565b905084816040015167ffffffffffffffff16118061099b5750604081015167ffffffffffffffff1615801561099b57508115155b156109b35780516109ac90856114eb565b93506109c2565b80516109bf90846114eb565b92505b50806109cd816113e4565b9150506108d3565b506040518060600160405280836001600160701b03168152602001826001600160701b03168152602001600360085481548110610a1457610a14611382565b600091825260208083209091015463ffffffff908116909352338083526007825260409283902085518154938701519690940151909416600160e01b026001600160e01b036001600160701b03968716600160701b026001600160e01b031990941696909416959095179190911791909116929092179055610a9890836001610cd4565b7f17bd98d373ca29f15c4088751e90d4b6ab74d72e75b677238ac452c8ab20dbe333600360085481548110610acf57610acf611382565b60009182526020918290200154604080516001600160a01b0390941684529183015281018490526060810183905260800160405180910390a1505050565b60003373e1a77164e5c6d9e0fc0b23d11e0874de6b328e6814610b5d5760405162461bcd60e51b81526020600482015260086024820152674f6e6c7920534f5960c01b60448201526064016103d5565b815160208301207fd62bf507207cbfed0be58152d90527386cb09b87448f61308aa066342be1f0f401610b9957610b948484610f20565b610ba5565b610ba584846001610cd4565b506344a1f60160e11b9392505050565b6000546001600160a01b03163314610bdf5760405162461bcd60e51b81526004016103d59061135f565b60008054911515600160a01b0260ff60a01b19909216919091179055565b60405163079cc67960e41b81523360048201526024810182905273e1a77164e5c6d9e0fc0b23d11e0874de6b328e68906379cc6790906044016020604051808303816000875af1158015610c55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7991906113b1565b508060056000828254610c8c91906114eb565b90915550610c9e905033826000610cd4565b50565b6000546001600160a01b03163314610ccb5760405162461bcd60e51b81526004016103d59061135f565b610c9e81611056565b6365ac3aa9421015610d285760405162461bcd60e51b815260206004820152601c60248201527f4d6967726174696f6e206973206e6f742073746172746564207965740000000060448201526064016103d5565b600054600160a01b900460ff1615610d785760405162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb881a5cc81c185d5cd959606a1b60448201526064016103d5565b42600260085481548110610d8e57610d8e611382565b90600052602060002001541015610dff576008805410610de55760405162461bcd60e51b8152602060048201526012602482015271135a59dc985d1a5bdb88199a5b9a5cda195960721b60448201526064016103d5565b60088054906000610df5836113e4565b9190505550610d78565b60008115610e8457600360085481548110610e1c57610e1c611382565b906000526020600020015483610e329190611504565b604080516001600160a01b0387168152602081018690529081018290529091507fd44a6dd2bfac4f6bc02d116d96aa12c24e8580626b95cb6a2f543f18cb61bd4c9060600160405180910390a1610efe565b600460085481548110610e9957610e99611382565b906000526020600020015483610eaf9190611504565b604080516001600160a01b0387168152602081018690529081018290529091507f360e9013a4321fcce6c9385c1811b27dedd609caddbba8e813e7e5c1d4a6507b906060015b60405180910390a15b8060016000828254610f1091906114eb565b909155506106a890508482611107565b6001600160a01b038216600090815260076020526040902054600160701b90046001600160701b031681811015610f925760405162461bcd60e51b8152602060048201526016602482015275115e18d95959081c995cd95c9d995908185b5bdd5b9d60521b60448201526064016103d5565b6001600160a01b038316600090815260076020526040812054610fc290600160e01b900463ffffffff1684611504565b9050610fce8383611526565b6001600160a01b03851660008181526007602090815260409182902080546001600160701b0395909516600160701b026dffffffffffffffffffffffffffff60701b199095169490941790935580519182529181018590529081018290527f69ad942cd0be186fc035367df354cdda64c5048503ac199f931f2def922b3d3e90606001610ef5565b6001600160a01b0381166110ac5760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f776564000000000000000060448201526064016103d5565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516340c10f1960e01b81526001600160a01b03831660048201526024810182905273d29588b55c9acfee50f52600ae7c6a251cd9b145906340c10f1990604401600060405180830381600087803b15801561116357600080fd5b505af1158015611177573d6000803e3d6000fd5b505050505050565b60006020828403121561119157600080fd5b5035919050565b600080600080608085870312156111ae57600080fd5b5050823594602084013594506040840135936060013592509050565b6001600160a01b0381168114610c9e57600080fd5b600080604083850312156111f257600080fd5b82356111fd816111ca565b9150602083013561120d816111ca565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561125757611257611218565b604052919050565b60008060006060848603121561127457600080fd5b833561127f816111ca565b92506020848101359250604085013567ffffffffffffffff808211156112a457600080fd5b818701915087601f8301126112b857600080fd5b8135818111156112ca576112ca611218565b6112dc601f8201601f1916850161122e565b915080825288848285010111156112f257600080fd5b80848401858401376000848284010152508093505050509250925092565b8015158114610c9e57600080fd5b60006020828403121561133057600080fd5b813561133b81611310565b9392505050565b60006020828403121561135457600080fd5b813561133b816111ca565b6020808252600990820152682737ba1027bbb732b960b91b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156113aa57600080fd5b5051919050565b6000602082840312156113c357600080fd5b815161133b81611310565b634e487b7160e01b600052601160045260246000fd5b6000600182016113f6576113f66113ce565b5060010190565b805167ffffffffffffffff8116811461141557600080fd5b919050565b805163ffffffff8116811461141557600080fd5b600061010080838503121561144257600080fd5b6040519081019067ffffffffffffffff8211818310171561146557611465611218565b816040528351815260208401516020820152611483604085016113fd565b6040820152611494606085016113fd565b60608201526114a5608085016113fd565b60808201526114b660a0850161141a565b60a08201526114c760c0850161141a565b60c082015260e084015191506114dc826111ca565b60e08101919091529392505050565b808201808211156114fe576114fe6113ce565b92915050565b60008261152157634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156114fe576114fe6113ce56fea26469706673582212203c057deb9f6b794bbc516e2c0ad0905f998fa5feeaa25d31e72cb13ee6ceea1c64736f6c63430008130033