More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 907 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Leave Land | 18666162 | 392 days ago | IN | 0 ETH | 0.00697856 | ||||
Take Gold | 18666138 | 392 days ago | IN | 0 ETH | 0.01026079 | ||||
Take Gold | 18663412 | 392 days ago | IN | 0 ETH | 0.01408146 | ||||
Take Gold | 18641665 | 395 days ago | IN | 0 ETH | 0.00980944 | ||||
Leave Land | 18630650 | 397 days ago | IN | 0 ETH | 0.00897463 | ||||
Leave Land | 18630645 | 397 days ago | IN | 0 ETH | 0.00821651 | ||||
Leave Land | 18607282 | 400 days ago | IN | 0 ETH | 0.00544799 | ||||
Leave Land | 18603595 | 401 days ago | IN | 0 ETH | 0.00362095 | ||||
Take Gold | 18603593 | 401 days ago | IN | 0 ETH | 0.00612293 | ||||
Go To Land | 18600908 | 401 days ago | IN | 0 ETH | 0.00351616 | ||||
Take Gold | 18600891 | 401 days ago | IN | 0 ETH | 0.00774018 | ||||
Go To Land | 18595663 | 402 days ago | IN | 0 ETH | 0.01037533 | ||||
Leave Land | 18595659 | 402 days ago | IN | 0 ETH | 0.00682017 | ||||
Take Gold | 18595655 | 402 days ago | IN | 0 ETH | 0.0113925 | ||||
Take Gold | 18594424 | 402 days ago | IN | 0 ETH | 0.00954899 | ||||
Leave Land | 18592800 | 402 days ago | IN | 0 ETH | 0.01160532 | ||||
Take Gold | 18591817 | 402 days ago | IN | 0 ETH | 0.00946381 | ||||
Renounce Ownersh... | 18591778 | 402 days ago | IN | 0 ETH | 0.00085549 | ||||
Leave Land | 18591728 | 402 days ago | IN | 0 ETH | 0.00510851 | ||||
Take Gold | 18591724 | 402 days ago | IN | 0 ETH | 0.00792873 | ||||
Leave Land | 18591676 | 402 days ago | IN | 0 ETH | 0.00527188 | ||||
Leave Land | 18591545 | 402 days ago | IN | 0 ETH | 0.00553861 | ||||
Take Gold | 18591529 | 402 days ago | IN | 0 ETH | 0.00794226 | ||||
Take Gold | 18591526 | 402 days ago | IN | 0 ETH | 0.00865718 | ||||
Leave Land | 18590655 | 402 days ago | IN | 0 ETH | 0.0063556 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18666138 | 392 days ago | 0.0108636 ETH | ||||
18663412 | 392 days ago | 0.01514481 ETH | ||||
18641665 | 395 days ago | 0.0211132 ETH | ||||
18603593 | 401 days ago | 0.05456576 ETH | ||||
18600891 | 401 days ago | 0.10557382 ETH | ||||
18595655 | 402 days ago | 0.01983152 ETH | ||||
18594424 | 402 days ago | 0.05101664 ETH | ||||
18591817 | 402 days ago | 0.01855514 ETH | ||||
18591785 | 402 days ago | 0.00579873 ETH | ||||
18591785 | 402 days ago | 0.01414325 ETH | ||||
18591724 | 402 days ago | 0.0608015 ETH | ||||
18591719 | 402 days ago | 0.00449945 ETH | ||||
18591719 | 402 days ago | 0.01097428 ETH | ||||
18591580 | 402 days ago | 0.00165818 ETH | ||||
18591580 | 402 days ago | 0.00404435 ETH | ||||
18591550 | 402 days ago | 0.00103975 ETH | ||||
18591550 | 402 days ago | 0.00253599 ETH | ||||
18591529 | 402 days ago | 0.13124046 ETH | ||||
18591526 | 402 days ago | 0.01639574 ETH | ||||
18591505 | 402 days ago | 0.01381101 ETH | ||||
18591505 | 402 days ago | 0.0336854 ETH | ||||
18591291 | 402 days ago | 0.00643481 ETH | ||||
18591291 | 402 days ago | 0.01569466 ETH | ||||
18591246 | 402 days ago | 0.00355483 ETH | ||||
18591246 | 402 days ago | 0.00867032 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Sunra
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.23; import "./ISunra.sol"; import "./Land.sol"; import "./AccLandData.sol"; import "./LandPrediction.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract Ownable { address public owner; event OwnershipRenounced(); constructor() { owner = msg.sender; } modifier onlyOwner() { require(owner == msg.sender, "not the owner"); _; } function renounceOwnership() external onlyOwner { owner = address(0); emit OwnershipRenounced(); } function transferOwnership(address newOwner) external onlyOwner { require(owner != address(0)); owner = newOwner; } } contract EthReceivable { string constant ERR_SEND_ETHER_FEE = "#1"; // sent fee error: master ether is not sent address public immutable master; // eth master uint256 _ethMasterFeePercent = 41; // master fee percent constructor(address master_) { master = master_; } receive() external payable { uint256 masterFee = (msg.value * _ethMasterFeePercent) / 100; (bool sentFee, ) = payable(master).call{value: masterFee}(""); require(sentFee, ERR_SEND_ETHER_FEE); } function ethMasterFeePercent() external view returns (uint256) { return _ethMasterFeePercent; } function _changeEthMasterFeePercent(uint256 percent) internal { require(percent <= 51); _ethMasterFeePercent = percent; } } contract Initializeable { string constant ERR_ALREADY_LAUNCHED = "#2"; // already initializeed bool public isInitialized; function _initialize() internal { require(!isInitialized, ERR_ALREADY_LAUNCHED); // already initializeed isInitialized = true; } } contract HasRandom { uint256 internal _nonce = 1; function _rand() internal virtual returns (uint256) { //return _nonce++ * block.timestamp * block.number; return _nonce++ * block.number; } function _rand(uint256 min, uint256 max) internal returns (uint256) { return min + (_rand() % (max - min + 1)); } } contract Sunra is ISunra, Ownable, EthReceivable, Initializeable, HasRandom { string constant ERR_NOT_CORRECT = "#3"; // not correct string constant ERR_NOT_LAUNCHED = "#4"; // not initializeed string constant ERR_WORLD_NOT_EXISTS = "#5"; // land is not exists string constant ERR_SLOT_NOT_FOUND = "#6"; // slot for land is not found string constant ERR_CAN_NOT_COLLECT_REWARDS = "#7"; // can not take rewards yet string constant ERR_NO_WORLD_WITH_ID = "#8"; // has no land with certain id string constant ERR_ETHER_NOT_SEND = "#9"; // sent fee error: ether is not sent string constant ERR_INCORRECT_WORLD_NUMBER = "#10"; // incorrect land number using LandPrediction for Land; IERC20 _token; IERC20 _token2; uint256 public landslCreatedTotal; // total created lands count uint8 constant _initializeLandsCount = 2; uint8 public constant maxLandsCount = 4; // maximum lands count uint256 public constant newLandTimeMin = 1 minutes; uint256 public constant newLandTimeMax = 1 hours; uint256 public landPeriodWaitSecondsMin = 61 seconds; // land period wait time season min uint256 public landPeriodWaitSecondsMax = 36001 seconds; // land period wait time season max uint256 public landRewardPercentMin = 51; // 100%=1000 uint256 public landRewardPercentMax = 501; // 100%=1000 uint256 public landEraseTimeMin = 61 seconds; uint256 public landEraseTimeMax = 601 seconds; uint256 public landEraseStartChance = 31; // noe of this is initializes erase on take uint256 public landTakeGoldSecondsMin = 61 seconds; // land take time season min uint256 public landTakeGoldSecondsMax = 3601 seconds; // land take time season max Land[maxLandsCount] _lands; // accounts land data mapping(address => AccLandData[maxLandsCount]) accs; address _deployer; uint256 _newLandTime; constructor(address master_) EthReceivable(master_) { _deployer = msg.sender; } function initialize() external onlyOwner { _initialize(); for (uint8 i = 1; i <= _initializeLandsCount; ++i) _createLand(i); } function token1() external view returns (IERC20) { return _token; } function token2() external view returns (IERC20) { return _token2; } function changeEthMasterFeePercent(uint256 percent) external onlyOwner { _changeEthMasterFeePercent(percent); } function changePeriodWaitSeconds( uint256 landPeriodWaitSecondsMin_, uint256 landPeriodWaitSecondsMax_ ) external onlyOwner { require( landPeriodWaitSecondsMin_ > 0 && landPeriodWaitSecondsMin_ <= landPeriodWaitSecondsMax_, ERR_NOT_CORRECT ); landPeriodWaitSecondsMin = landPeriodWaitSecondsMin_; landPeriodWaitSecondsMax = landPeriodWaitSecondsMax_; } function changeTakeGoldSeconds( uint256 landTakeGoldSecondsMin_, uint256 landTakeGoldSecondsMax_ ) external onlyOwner { require( landTakeGoldSecondsMin_ > 0 && landTakeGoldSecondsMin_ <= landTakeGoldSecondsMax_, ERR_NOT_CORRECT ); landTakeGoldSecondsMin = landTakeGoldSecondsMin_; landTakeGoldSecondsMax = landTakeGoldSecondsMax_; } function changePrizePercent(uint256 min, uint256 max) external onlyOwner { require(min <= max, ERR_NOT_CORRECT); require(max <= 1000, ERR_NOT_CORRECT); landRewardPercentMin = min; landRewardPercentMax = max; } function changeLandEraseStartChance(uint256 chance) external onlyOwner { require(chance > 1); landEraseStartChance = chance; } function changeErc20(address token_, address token2_) external { require(msg.sender == _deployer); delete _deployer; _token = IERC20(token_); _token2 = IERC20(token2_); } function goToLand(uint256 landId, uint256 tokensCount) external { // limitations require(isInitialized, ERR_NOT_LAUNCHED); // get land (Land storage land, uint8 number) = _getLandByIdInternal(landId); require(land.isExists(), ERR_WORLD_NOT_EXISTS); // refresh land //_refreshBeforeUseLand(land, number); _eraseLand(land, number); _refreshLand(land, number); require(land.isExists(), ERR_WORLD_NOT_EXISTS); // thansfer stak tokens uint256 lastTokens = _token.balanceOf(address(this)); _token.transferFrom(msg.sender, address(this), tokensCount); uint256 staked = _token.balanceOf(address(this)) - lastTokens; // write data AccLandData storage acc = accs[msg.sender][number - 1]; if (acc.landId != land.id) ++land.accountsCount; acc.landId = land.id; acc.takePeriod = land.periodNumber(); acc.tokenStaked += staked; land.tokenStaked += staked; } function leaveLand(uint256 landId) external { (Land storage land, uint8 number) = _getLandByIdInternal(landId); _refreshBeforeUseLand(land, number); AccLandData storage acc = accs[msg.sender][number - 1]; require(acc.landId > 0, ERR_SLOT_NOT_FOUND); //if (_canTakeRewards(acc, land)) // _takeGold(msg.sender, acc, land); _token.transfer(msg.sender, acc.tokenStaked); --land.accountsCount; land.tokenStaked -= acc.tokenStaked; delete accs[msg.sender][number - 1]; } function _refreshBeforeUseLand(Land storage land, uint8 number) private { require(land.isExists(), ERR_WORLD_NOT_EXISTS); _refreshLandsErases(); _refreshLand(land, number); _createNewLands(); require(land.isExists(), ERR_WORLD_NOT_EXISTS); } function getAccSlots( address addr ) external view returns (AccLandData[] memory) { AccLandData[] memory res = new AccLandData[](maxLandsCount); for (uint8 i = 0; i < maxLandsCount; ++i) { AccLandData storage data = accs[addr][i]; Land memory land = _lands[i]; if (!land.isExists()) continue; res[i] = data; } return res; } function getAccSlotForLand( address acc, uint256 landId ) public view returns (AccLandData memory) { return _getAccSlotForLand(acc, landId); } function _getAccSlotForLand( address acc, uint256 landId ) private view returns (AccLandData storage) { require(landId > 0, ERR_WORLD_NOT_EXISTS); for (uint8 i = 0; i < maxLandsCount; ++i) { AccLandData storage data = accs[acc][i]; if (data.landId == landId) { require(isLandExists(data.landId), ERR_SLOT_NOT_FOUND); return data; } } revert(ERR_SLOT_NOT_FOUND); } function _trySetEraseTime(Land storage land) private { if (!land.isExists() || land.eraseTime != 0) return; if (_rand(1, landEraseStartChance) % landEraseStartChance != 1) return; land.changeEraseSeconds(_rand(landEraseTimeMin, landEraseTimeMax)); } function isLandTakeSeason(uint8 landNumber) public view returns (bool) { return _isLandTakeSeason(_getLandByNumber(landNumber)); } function _isLandTakeSeason(Land memory land) private view returns (bool) { return land.id > 0 && land.isTakeTime(); } /*function takeGoldAllLands() external { uint8 takeCount; for (uint8 i = 0; i < maxLandsCount; ++i) { AccLandData storage data = accs[msg.sender][i]; Land storage land = _lands[i]; if (!land.isExists()) continue; _refreshLand(land, i + 1); if (!_canTakeRewards(data, land)) continue; _takeGold(msg.sender, data, land); ++takeCount; } _createNewLands(); require(takeCount > 0, ERR_CAN_NOT_COLLECT_REWARDS); }*/ function takeGold(uint256 landId) external { (Land storage land, uint8 number) = _getLandByIdInternal(landId); _refreshBeforeUseLand(land, number); AccLandData storage data = accs[msg.sender][number - 1]; require(_canTakeRewards(data, land), ERR_CAN_NOT_COLLECT_REWARDS); _takeGold(msg.sender, data, land); } function _canTakeRewards( AccLandData memory acc, Land memory land ) private view returns (bool) { return land.isExists() && land.isTakeTime() && acc.takePeriod + 1 < land.periodNumber(); } function _takeGold( address addr, AccLandData storage acc, Land storage land ) private returns ( uint256 ethRewarded, uint256 tokenRewarded, uint256 token2Rewarded ) { _tryNextTakePeriodSnapshot(land); ethRewarded = land.ethRewardPeriod(acc.tokenStaked); tokenRewarded = land.tokenRewardPeriod(acc.tokenStaked); token2Rewarded = land.token2RewardPeriod(acc.tokenStaked); acc.takePeriod = land.periodNumber() - 1; if (ethRewarded > 0) { (bool sentFee, ) = payable(addr).call{value: ethRewarded}(""); require(sentFee, ERR_ETHER_NOT_SEND); land.eth -= ethRewarded; } if (tokenRewarded > 0) { _token.transfer(addr, tokenRewarded); land.token1 -= tokenRewarded; } if (token2Rewarded > 0) { _token2.transfer(addr, token2Rewarded); land.token2 -= token2Rewarded; } _trySetEraseTime(land); } function _tryNextTakePeriodSnapshot(Land storage land) private { if ( !land.isExists() || land.eraseTime != 0 || !land.isTakePeriodDirty() ) return; _addRewardsToLand(land); land.tokenStakedSnapshot = land.tokenStaked; land.takePeriodSnapshot = land.periodNumber(); land.ethSnapshot = land.eth; land.tokenSnapshot = land.token1; land.token2Snapshot = land.token2; } function getRewardForTokens( uint256 landId, uint256 tokensCount ) external view returns (uint256 eth, uint256 token1, uint256 token2) { (Land storage land, ) = _getLandByIdInternal(landId); eth = land.ethRewardForTokens(tokensCount); token1 = land.tokenRewardForTokens(tokensCount); token2 = land.token2RewardForTokens(tokensCount); } function getRewardForAccount( uint256 landId, address account ) external view returns (uint256 eth, uint256 token1, uint256 token2) { (Land storage land, uint8 number) = _getLandByIdInternal(landId); AccLandData memory acc = accs[account][number - 1]; if (acc.takePeriod == land.periodNumber()) { return (0, 0, 0); } eth = land.ethRewardPeriod(acc.tokenStaked); token1 = land.tokenRewardPeriod(acc.tokenStaked); token2 = land.token2RewardPeriod(acc.tokenStaked); } function _getLandNumber( AccLandData memory acc ) private view returns (uint8) { if (acc.landId == 0) return 0; for (uint8 i = 0; i < maxLandsCount; ++i) { if (_lands[i].id == acc.landId) return i + 1; } return 0; } function getLandByNumber(uint8 number) external view returns (Land memory) { return _getLandByNumber(number); } function _getLandByNumber( uint8 number ) private view returns (Land storage) { require( number >= 1 && number <= maxLandsCount, ERR_INCORRECT_WORLD_NUMBER ); return _lands[number - 1]; } function getLandNumberById(uint256 id) public view returns (uint8) { if (id == 0) return 0; for (uint8 i = 0; i < maxLandsCount; ++i) { if (_lands[i].id == id) return i + 1; } return 0; } function isLandExists(uint256 id) public view returns (bool) { return _getLandById(id).isExists(); } function getLandById(uint256 id) external view returns (Land memory) { return _getLandById(id); } function _getLandByIdInternal( uint256 id ) private view returns (Land storage land, uint8 number) { number = getLandNumberById(id); require(number > 0, ERR_NO_WORLD_WITH_ID); land = _lands[number - 1]; } function _getLandById( uint256 id ) internal view returns (Land storage land) { (land, ) = _getLandByIdInternal(id); } function getLandTakePeriod(uint256 landId) external view returns (uint256) { return _getLandById(landId).periodNumber(); } function tokenStacked() public view returns (uint256) { uint256 res; for (uint8 i = 0; i < maxLandsCount; ++i) { if (!_lands[i].isExists()) continue; res += _lands[i].tokenStaked; } return res; } function token2Total() public view returns (uint256) { return _token2.balanceOf(address(this)); } function ethOnLands() public view returns (uint256) { uint256 res; for (uint8 i = 0; i < maxLandsCount; ++i) { res += _lands[i].ethOnLand(); } return res; } function tokenOnLands() public view returns (uint256) { uint256 res; for (uint8 i = 0; i < maxLandsCount; ++i) { res += _lands[i].tokenOnPeriod(); } return res; } function tokenOnLandsRewardWithStacks() public view returns (uint256) { uint256 res; for (uint8 i = 0; i < maxLandsCount; ++i) { res += _lands[i].token1 + _lands[i].tokenStaked; } return res; } function token2OnLands() public view returns (uint256) { uint256 res; for (uint8 i = 0; i < maxLandsCount; ++i) { res += _lands[i].token2OnLand(); } return res; } function accountsOnLands() public view returns (uint256) { uint256 res; for (uint8 i = 0; i < maxLandsCount; ++i) { res += _lands[i].accountsCount; } return res; } function landsCount() public view returns (uint8) { uint8 res; for (uint8 i = 0; i < maxLandsCount; ++i) { if (_lands[i].id > 0) ++res; } return res; } function _getEmptyLandNumber() internal view returns (uint8) { for (uint8 i = 0; i < maxLandsCount; ++i) { if (_lands[i].id == 0) return i + 1; } return 0; } function ethRewardsCount() public view returns (uint256) { return address(this).balance - ethOnLands(); } function tokenRewardsCount() public view returns (uint256) { return _token.balanceOf(address(this)) - tokenOnLandsRewardWithStacks(); } function token2RewardsCount() public view returns (uint256) { return token2Total() - token2OnLands(); } function _generateLandEth() private returns (uint256) { return (ethRewardsCount() * _rand(landRewardPercentMin, landRewardPercentMax)) / 1000; } function _generateLandToken1() private returns (uint256) { return (tokenRewardsCount() * _rand(landRewardPercentMin, landRewardPercentMax)) / 1000; } function _generateLandToken2() private returns (uint256) { return (token2RewardsCount() * _rand(landRewardPercentMin, landRewardPercentMax)) / 1000; } function _addRewardsToLand(Land storage land) private { land.eth += _generateLandEth(); land.token1 += _generateLandToken1(); land.token2 += _generateLandToken2(); } function getLands() external view returns (LandData[maxLandsCount] memory) { LandData[maxLandsCount] memory res; for (uint8 i = 0; i < maxLandsCount; ++i) { if (!_lands[i].isExists()) continue; res[i] = _lands[i].getData(i + 1); } return res; } function getLandData( uint256 landId ) external view returns (LandData memory) { (Land storage land, uint8 number) = _getLandByIdInternal(landId); return land.getData(number); } function _createLand(uint8 number) private { Land storage land = _getLandByNumber(number); land.id = ++landslCreatedTotal; uint256 periodTake = _rand( landTakeGoldSecondsMin, landTakeGoldSecondsMax ); uint256 periodWait = _rand( landPeriodWaitSecondsMin, landPeriodWaitSecondsMax ); land.periodSeconds = periodTake + periodWait; land.takeGoldSeconds = periodTake; land.creationTime = block.timestamp; _addRewardsToLand(land); _newLandTime = block.timestamp + _rand(newLandTimeMin, newLandTimeMax); } function _isNeedEraseLand(Land memory land) private view returns (bool) { return land.id > 0 && !land.isExists(); } function refreshLand(uint8 number) external { _refreshLand(_getLandByNumber(number), number); _createNewLands(); } function _refreshLand(Land storage land, uint8 number) private { if (_eraseLand(land, number)) return; _tryNextTakePeriodSnapshot(land); } function _eraseLand( Land storage land, uint8 number ) private returns (bool) { require( number >= 1 && number <= maxLandsCount, ERR_INCORRECT_WORLD_NUMBER ); if (!_isNeedEraseLand(land)) return false; uint256 tokenToBurn = land.token1 + land.tokenStaked; if (tokenToBurn > 0) _token.transfer(address(0), tokenToBurn); delete _lands[number - 1]; return true; } function refreshLands() external { _refreshLandsErases(); _refreshLandsTakePeriods(); _createNewLands(); } function createNewLands() external { _createNewLands(); } function _createNewLands() private { if (!isInitialized) return; // time limit if (block.timestamp < _newLandTime) return; // getting new land number uint8 newLandNumber = _getEmptyLandNumber(); if (newLandNumber == 0) return; // creating the new land _createLand(newLandNumber); } function _refreshLandsTakePeriods() private { for (uint8 i = 0; i < maxLandsCount; ++i) { _tryNextTakePeriodSnapshot(_lands[i]); } } function _refreshLandsErases() private { for (uint8 i = 1; i <= maxLandsCount; ++i) { _eraseLand(_lands[i - 1], i); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
pragma solidity ^0.8.23; struct AccLandData { uint256 landId; // id of the land or 0 uint256 tokenStaked; // count of staked tokens of account uint256 takePeriod; // last used take period }
pragma solidity ^0.8.23; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface ISunra { function token1() external view returns (IERC20); function token2() external view returns (IERC20); function createNewLands() external; }
pragma solidity ^0.8.23; struct Land { // constant for land uint256 id; // id of land or 0 if it not exists uint256 creationTime; // when was created uint256 periodSeconds; // period time season uint256 takeGoldSeconds; // time seconds to extract gold on new take period // erase uint256 eraseTime; // time when will be eraseed or 0 // total savings uint256 eth; // eth to take uint256 token1; // token1 to take uint256 token2; // token2 to take // accounts data uint256 accountsCount; // accounts count on land uint256 tokenStaked; // total staked tokens // snapshot uint256 takePeriodSnapshot; // number of snapshot period to take uint256 tokenStakedSnapshot; // tokens staked for takes on take period uint256 ethSnapshot; uint256 tokenSnapshot; uint256 token2Snapshot; }
pragma solidity ^0.8.23; import "./Land.sol"; struct Period { uint256 number; // period number uint256 eth; // ether on period for rewards uint256 token; // token on period (not includes stakes) for rewards uint256 token2; // token2 on period for rewards uint256 tokenStaked; // token stacks sum on period bool isTakeTime; // is now take time or not bool isDirty; // is period dirty uint256 time; // time since the beginning of the period uint256 remainingTime; // remaining time until next period uint256 endTime; // when period expires } struct LandData { Land land; // land data Period period; // land period data uint8 number; // land number bool isExists; // is land exists } library LandPrediction { // time from period start function periodTime(Land memory land) internal view returns (uint256) { return (block.timestamp - land.creationTime) % land.periodSeconds; } function nextPeriodRemainingTime( Land memory land ) internal view returns (uint256) { return land.periodSeconds - periodTime(land); } function nextPeriodTime( Land memory land ) internal view returns (uint256) { return block.timestamp + nextPeriodRemainingTime(land); } function periodNumber( Land memory land ) internal view returns (uint256) { return (block.timestamp - land.creationTime) / land.periodSeconds; } function isTakePeriodDirty( Land memory land ) internal view returns (bool) { return land.takePeriodSnapshot != periodNumber(land); } function isTakeTime(Land memory land) internal view returns (bool) { return periodTime(land) < land.takeGoldSeconds; } function ethOnLand(Land memory land) internal view returns (uint256) { if (!isExists(land)) return 0; return land.eth; } function token2OnLand( Land memory land ) internal view returns (uint256) { if (!isExists(land)) return 0; return land.token2; } function ethOnPeriod(Land memory land) internal view returns (uint256) { if (!isExists(land)) return 0; if (isTakePeriodDirty(land)) return land.eth; else return land.ethSnapshot; } function tokenOnPeriod( Land memory land ) internal view returns (uint256) { if (!isExists(land)) return 0; if (isTakePeriodDirty(land)) return land.token1; else return land.tokenSnapshot; } function token2OnPeriod( Land memory land ) internal view returns (uint256) { if (!isExists(land)) return 0; if (isTakePeriodDirty(land)) return land.token2; else return land.token2Snapshot; } function tokenStakedOnPeriod( Land memory land ) internal view returns (uint256) { if (isTakePeriodDirty(land)) return land.tokenStaked; else return land.tokenStakedSnapshot; } function ethRewardForTokens( Land memory land, uint256 tokenstaked ) internal view returns (uint256) { if (tokenstaked == 0 || !isExists(land)) return 0; if (land.tokenStaked == 0) return land.eth; return (land.eth * tokenstaked) / land.tokenStaked; } function tokenRewardForTokens( Land memory land, uint256 tokenstaked ) internal view returns (uint256) { if (tokenstaked == 0 || !isExists(land)) return 0; if (land.tokenStaked == 0) return land.token1; return (land.token1 * tokenstaked) / land.tokenStaked; } function token2RewardForTokens( Land memory land, uint256 tokenstaked ) internal view returns (uint256) { if (tokenstaked == 0 || !isExists(land)) return 0; if (land.tokenStaked == 0) return land.token2; return (land.token2 * tokenstaked) / land.tokenStaked; } function ethRewardPeriod( Land memory land, uint256 tokenstaked ) internal view returns (uint256) { if (tokenstaked == 0 || !isExists(land)) return 0; uint256 stacke = tokenStakedOnPeriod(land); if (stacke == 0) return ethOnPeriod(land); return (ethOnPeriod(land) * tokenstaked) / stacke; } function tokenRewardPeriod( Land memory land, uint256 tokenstaked ) internal view returns (uint256) { if (tokenstaked == 0 || !isExists(land)) return 0; uint256 stacke = tokenStakedOnPeriod(land); if (stacke == 0) return tokenOnPeriod(land); return (tokenOnPeriod(land) * tokenstaked) / stacke; } function token2RewardPeriod( Land memory land, uint256 tokenstaked ) internal view returns (uint256) { if (tokenstaked == 0 || !isExists(land)) return 0; uint256 stacke = tokenStakedOnPeriod(land); if (stacke == 0) return token2OnPeriod(land); return (token2OnPeriod(land) * tokenstaked) / stacke; } function isExists(Land memory land) internal view returns (bool) { return land.id > 0 && (land.eraseTime == 0 || (block.timestamp < land.eraseTime)); } function getData( Land memory land, uint8 number ) internal view returns (LandData memory) { return LandData( land, Period( periodNumber(land), ethOnPeriod(land), tokenOnPeriod(land), token2OnPeriod(land), tokenStakedOnPeriod(land), isTakeTime(land), isTakePeriodDirty(land), periodTime(land), nextPeriodRemainingTime(land), nextPeriodTime(land) ), number, isExists(land) ); } function changeEraseSeconds(Land storage land, uint256 timer) internal { land.eraseTime = block.timestamp + timer; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"master_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"OwnershipRenounced","type":"event"},{"inputs":[],"name":"accountsOnLands","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"token2_","type":"address"}],"name":"changeErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"changeEthMasterFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chance","type":"uint256"}],"name":"changeLandEraseStartChance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"landPeriodWaitSecondsMin_","type":"uint256"},{"internalType":"uint256","name":"landPeriodWaitSecondsMax_","type":"uint256"}],"name":"changePeriodWaitSeconds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"changePrizePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"landTakeGoldSecondsMin_","type":"uint256"},{"internalType":"uint256","name":"landTakeGoldSecondsMax_","type":"uint256"}],"name":"changeTakeGoldSeconds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createNewLands","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ethMasterFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethOnLands","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethRewardsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"acc","type":"address"},{"internalType":"uint256","name":"landId","type":"uint256"}],"name":"getAccSlotForLand","outputs":[{"components":[{"internalType":"uint256","name":"landId","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"uint256","name":"takePeriod","type":"uint256"}],"internalType":"struct AccLandData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getAccSlots","outputs":[{"components":[{"internalType":"uint256","name":"landId","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"uint256","name":"takePeriod","type":"uint256"}],"internalType":"struct AccLandData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getLandById","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"creationTime","type":"uint256"},{"internalType":"uint256","name":"periodSeconds","type":"uint256"},{"internalType":"uint256","name":"takeGoldSeconds","type":"uint256"},{"internalType":"uint256","name":"eraseTime","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token1","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"},{"internalType":"uint256","name":"accountsCount","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"uint256","name":"takePeriodSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenStakedSnapshot","type":"uint256"},{"internalType":"uint256","name":"ethSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenSnapshot","type":"uint256"},{"internalType":"uint256","name":"token2Snapshot","type":"uint256"}],"internalType":"struct Land","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"number","type":"uint8"}],"name":"getLandByNumber","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"creationTime","type":"uint256"},{"internalType":"uint256","name":"periodSeconds","type":"uint256"},{"internalType":"uint256","name":"takeGoldSeconds","type":"uint256"},{"internalType":"uint256","name":"eraseTime","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token1","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"},{"internalType":"uint256","name":"accountsCount","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"uint256","name":"takePeriodSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenStakedSnapshot","type":"uint256"},{"internalType":"uint256","name":"ethSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenSnapshot","type":"uint256"},{"internalType":"uint256","name":"token2Snapshot","type":"uint256"}],"internalType":"struct Land","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"}],"name":"getLandData","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"creationTime","type":"uint256"},{"internalType":"uint256","name":"periodSeconds","type":"uint256"},{"internalType":"uint256","name":"takeGoldSeconds","type":"uint256"},{"internalType":"uint256","name":"eraseTime","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token1","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"},{"internalType":"uint256","name":"accountsCount","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"uint256","name":"takePeriodSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenStakedSnapshot","type":"uint256"},{"internalType":"uint256","name":"ethSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenSnapshot","type":"uint256"},{"internalType":"uint256","name":"token2Snapshot","type":"uint256"}],"internalType":"struct Land","name":"land","type":"tuple"},{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"bool","name":"isTakeTime","type":"bool"},{"internalType":"bool","name":"isDirty","type":"bool"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"remainingTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct Period","name":"period","type":"tuple"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"bool","name":"isExists","type":"bool"}],"internalType":"struct LandData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getLandNumberById","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"}],"name":"getLandTakePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLands","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"creationTime","type":"uint256"},{"internalType":"uint256","name":"periodSeconds","type":"uint256"},{"internalType":"uint256","name":"takeGoldSeconds","type":"uint256"},{"internalType":"uint256","name":"eraseTime","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token1","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"},{"internalType":"uint256","name":"accountsCount","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"uint256","name":"takePeriodSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenStakedSnapshot","type":"uint256"},{"internalType":"uint256","name":"ethSnapshot","type":"uint256"},{"internalType":"uint256","name":"tokenSnapshot","type":"uint256"},{"internalType":"uint256","name":"token2Snapshot","type":"uint256"}],"internalType":"struct Land","name":"land","type":"tuple"},{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"},{"internalType":"uint256","name":"tokenStaked","type":"uint256"},{"internalType":"bool","name":"isTakeTime","type":"bool"},{"internalType":"bool","name":"isDirty","type":"bool"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"remainingTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct Period","name":"period","type":"tuple"},{"internalType":"uint8","name":"number","type":"uint8"},{"internalType":"bool","name":"isExists","type":"bool"}],"internalType":"struct LandData[4]","name":"","type":"tuple[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"getRewardForAccount","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token1","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"},{"internalType":"uint256","name":"tokensCount","type":"uint256"}],"name":"getRewardForTokens","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token1","type":"uint256"},{"internalType":"uint256","name":"token2","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"},{"internalType":"uint256","name":"tokensCount","type":"uint256"}],"name":"goToLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInitialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isLandExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"landNumber","type":"uint8"}],"name":"isLandTakeSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landEraseStartChance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landEraseTimeMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landEraseTimeMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landPeriodWaitSecondsMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landPeriodWaitSecondsMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landRewardPercentMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landRewardPercentMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landTakeGoldSecondsMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landTakeGoldSecondsMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landsCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"landslCreatedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"}],"name":"leaveLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"master","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLandsCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newLandTimeMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newLandTimeMin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"number","type":"uint8"}],"name":"refreshLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"refreshLands","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"landId","type":"uint256"}],"name":"takeGold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token2","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token2OnLands","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token2RewardsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token2Total","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOnLands","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOnLandsRewardWithStacks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRewardsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenStacked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a060405260296001556001600355603d600755618ca160085560336009556101f5600a55603d600b55610259600c55601f600d55603d600e55610e11600f553480156200004c57600080fd5b50604051620047cc380380620047cc8339810160408190526200006f91620000a4565b600080546001600160a01b0319908116339081179092556001600160a01b03909216608052604d8054909216179055620000d6565b600060208284031215620000b757600080fd5b81516001600160a01b0381168114620000cf57600080fd5b9392505050565b6080516146d3620000f9600039600081816103a001526109ea01526146d36000f3fe6080604052600436106103795760003560e01c80639b773945116101d1578063dbea023811610102578063f094a45e116100a0578063f5dabbef1161006f578063f5dabbef14610a82578063fa71fbef14610a97578063fc54d97b14610ab7578063fe108c2514610acc57600080fd5b8063f094a45e14610a0c578063f13da00514610a2c578063f29b004c14610a4c578063f2fde38b14610a6257600080fd5b8063e4066536116100dc578063e406653614610983578063e5e75dcb146109a3578063e8701c33146109b8578063ee97f7f3146109d857600080fd5b8063dbea023814610943578063e3a6bcd514610959578063e3d258a51461096e57600080fd5b8063ba1c7b2e1161016f578063d0d7bef411610149578063d0d7bef4146108d0578063d21220a7146108f0578063d6156ca91461090e578063d9ced0da1461092357600080fd5b8063ba1c7b2e14610890578063c20741b6146108a6578063cfbc2fb2146108bb57600080fd5b8063a71dbec2116101ab578063a71dbec21461080d578063ab9e611f1461082d578063b451b0e11461085a578063b846199a1461087a57600080fd5b80639b773945146107ab5780639ddf9351146107cb578063a24a29d7146107f857600080fd5b80634966abb6116102ab57806368a2bffe11610249578063715018a611610223578063715018a614610734578063727c04c8146107495780638129fc1c146107765780638da5cb5b1461078b57600080fd5b806368a2bffe146106d25780636d36ec48146106f25780636fe0c9061461071257600080fd5b80635cbcc0e8116102855780635cbcc0e81461067c5780636669fdfa1461069257806366b2cac0146106a757806367056586146106bd57600080fd5b80634966abb61461063c5780634b02a6de1461065157806358b92a081461066657600080fd5b80632b97a8e51161031857806332845545116102f257806332845545146105a457806334c985da146105df578063392e53cd1461060c57806345b7f4061461062657600080fd5b80632b97a8e51461054f5780632d21c3fb146105645780632d84da7e1461058457600080fd5b80631c9afd0f116103545780631c9afd0f146104ca5780631d92620a146104f157806324194ef51461050757806325be124e1461051d57600080fd5b80623623e21461045c5780630d3823f2146104855780631328c519146104b557600080fd5b3661045757600060646001543461039091906141ae565b61039a91906141db565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168260405160006040518083038185875af1925050503d8060008114610409576040519150601f19603f3d011682016040523d82523d6000602084013e61040e565b606091505b505090508060405180604001604052806002815260200161233160f01b815250906104555760405162461bcd60e51b815260040161044c91906141ef565b60405180910390fd5b005b600080fd5b34801561046857600080fd5b50610472600a5481565b6040519081526020015b60405180910390f35b34801561049157600080fd5b506104a56104a036600461423e565b610aec565b604051901515815260200161047c565b3480156104c157600080fd5b50610455610baa565b3480156104d657600080fd5b506104df610bc4565b60405160ff909116815260200161047c565b3480156104fd57600080fd5b50610472600f5481565b34801561051357600080fd5b5061047260095481565b34801561052957600080fd5b506005546001600160a01b03165b6040516001600160a01b03909116815260200161047c565b34801561055b57600080fd5b50610472603c81565b34801561057057600080fd5b5061045561057f366004614257565b610c13565b34801561059057600080fd5b5061045561059f36600461423e565b610c30565b3480156105b057600080fd5b506105c46105bf366004614291565b610da0565b6040805193845260208401929092529082015260600161047c565b3480156105eb57600080fd5b506105ff6105fa3660046142bd565b61110f565b60405161047c91906142e7565b34801561061857600080fd5b506002546104a59060ff1681565b34801561063257600080fd5b5061047260075481565b34801561064857600080fd5b50610472611166565b34801561065d57600080fd5b50610472611250565b34801561067257600080fd5b50610472600c5481565b34801561068857600080fd5b50610472600e5481565b34801561069e57600080fd5b506104df600481565b3480156106b357600080fd5b5061047260085481565b3480156106c957600080fd5b50610455610bba565b3480156106de57600080fd5b506104556106ed366004614308565b6112bc565b3480156106fe57600080fd5b5061047261070d36600461423e565b6117ac565b34801561071e57600080fd5b50610727611864565b60405161047c9190614467565b34801561074057600080fd5b50610455611a47565b34801561075557600080fd5b5061076961076436600461423e565b611aaa565b60405161047c91906144a5565b34801561078257600080fd5b50610455611b66565b34801561079757600080fd5b50600054610537906001600160a01b031681565b3480156107b757600080fd5b506104556107c63660046144b4565b611bbf565b3480156107d757600080fd5b506107eb6107e63660046144de565b611c0d565b60405161047c91906144f9565b34801561080457600080fd5b50610472611dcf565b34801561081957600080fd5b506104df61082836600461423e565b611e55565b34801561083957600080fd5b5061084d61084836600461423e565b611eba565b60405161047c919061455b565b34801561086657600080fd5b50610455610875366004614308565b611f89565b34801561088657600080fd5b50610472600b5481565b34801561089c57600080fd5b50610472610e1081565b3480156108b257600080fd5b50610472612036565b3480156108c757600080fd5b5061047261204a565b3480156108dc57600080fd5b506104556108eb36600461423e565b612134565b3480156108fc57600080fd5b506004546001600160a01b0316610537565b34801561091a57600080fd5b50600154610472565b34801561092f57600080fd5b5061045561093e366004614308565b612167565b34801561094f57600080fd5b5061047260065481565b34801561096557600080fd5b506104726121e6565b34801561097a57600080fd5b506104726121f4565b34801561098f57600080fd5b5061045561099e36600461423e565b612261565b3480156109af57600080fd5b506104726123e2565b3480156109c457600080fd5b506107696109d3366004614257565b6124cc565b3480156109e457600080fd5b506105377f000000000000000000000000000000000000000000000000000000000000000081565b348015610a1857600080fd5b50610455610a27366004614308565b6124dd565b348015610a3857600080fd5b506105c4610a47366004614308565b61255c565b348015610a5857600080fd5b50610472600d5481565b348015610a6e57600080fd5b50610455610a7d3660046144de565b612789565b348015610a8e57600080fd5b506104726127ea565b348015610aa357600080fd5b506104a5610ab2366004614257565b61284e565b348015610ac357600080fd5b50610472612906565b348015610ad857600080fd5b50610455610ae736600461423e565b61294b565b6000610ba4610afa83612987565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c0820152612992565b92915050565b610bb26129b6565b610bba612a02565b610bc2612a3b565b565b60008060005b600460ff82161015610c0d57600060108260ff1660048110610bee57610bee61456a565b600f0201541115610c0557610c0282614580565b91505b600101610bca565b50919050565b610c25610c1f82612a76565b82612af5565b610c2d612a3b565b50565b600080610c3c83612b15565b91509150610c4a8282612b8f565b336000908152604c60205260408120610c6460018461459f565b60ff1660048110610c7757610c7761456a565b600302019050610d5281604051806060016040529081600082015481526020016001820154815260200160028201548152505084604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050612d7b565b60405180604001604052806002815260200161233760f01b81525090610d8b5760405162461bcd60e51b815260040161044c91906141ef565b50610d97338285612dbe565b50505050505050565b6000806000806000610db187612b15565b6001600160a01b0388166000908152604c6020526040812092945090925090610ddb60018461459f565b60ff1660048110610dee57610dee61456a565b6003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050610ec883604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050613294565b816040015103610ee5576000806000955095509550505050611108565b602080820151604080516101e081018252865481526001870154938101939093526002860154908301526003850154606083015260048501546080830152600585015460a0830152600685015460c0830152600785015460e083015260088501546101008301526009850154610120830152600a850154610140830152600b850154610160830152600c850154610180830152600d8501546101a0830152600e8501546101c0830152610f9891906132b5565b602080830151604080516101e081018252875481526001880154938101939093526002870154908301526003860154606083015260048601546080830152600586015460a0830152600686015460c0830152600786015460e083015260088601546101008301526009860154610120830152600a860154610140830152600b860154610160830152600c860154610180830152600d8601546101a0830152600e8601546101c083015291975061104d9161331c565b602080830151604080516101e081018252875481526001880154938101939093526002870154908301526003860154606083015260048601546080830152600586015460a0830152600686015460c0830152600786015460e083015260088601546101008301526009860154610120830152600a860154610140830152600b860154610160830152600c860154610180830152600d8601546101a0830152600e8601546101c083015291965061110291613367565b93505050505b9250925092565b61113360405180606001604052806000815260200160008152602001600081525090565b61113d83836133b2565b604080516060810182528254815260018301546020820152600290920154908201529392505050565b60008060005b600460ff82161015610c0d5761123c60108260ff16600481106111915761119161456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e820154815250506134c5565b61124690836145b8565b915060010161116c565b60008060005b600460ff82161015610c0d5760108160ff16600481106112785761127861456a565b600f02016009015460108260ff16600481106112965761129661456a565b600f0201600601546112a891906145b8565b6112b290836145b8565b9150600101611256565b60028054604080518082019091529182526108cd60f21b602083015260ff166112f85760405162461bcd60e51b815260040161044c91906141ef565b5060008061130584612b15565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c082015291935091506113b790612992565b60405180604001604052806002815260200161233560f01b815250906113f05760405162461bcd60e51b815260040161044c91906141ef565b506113fb82826134e4565b506114068282612af5565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c08201526114b390612992565b60405180604001604052806002815260200161233560f01b815250906114ec5760405162461bcd60e51b815260040161044c91906141ef565b50600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561153b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155f91906145cb565b600480546040516323b872dd60e01b81523392810192909252306024830152604482018790529192506001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e091906145e4565b50600480546040516370a0823160e01b8152309281019290925260009183916001600160a01b0316906370a0823190602401602060405180830381865afa15801561162f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165391906145cb565b61165d9190614606565b336000908152604c602052604081209192509061167b60018661459f565b60ff166004811061168e5761168e61456a565b60030201905084600001548160000154146116b95784600801600081546116b490614619565b909155505b8454808255604080516101e081018252918252600187015460208301526002870154908201526003860154606082015260048601546080820152600586015460a0820152600686015460c0820152600786015460e082015260088601546101008201526009860154610120820152600a860154610140820152600b860154610160820152600c860154610180820152600d8601546101a0820152600e8601546101c082015261176790613294565b81600201819055508181600101600082825461178391906145b8565b925050819055508185600901600082825461179e91906145b8565b909155505050505050505050565b6000610ba46117ba83612987565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c0820152613294565b61186c61406f565b61187461406f565b60005b600460ff82161015610c0d5761194760108260ff166004811061189c5761189c61456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050612992565b15611a3f57611a2461195a826001614632565b60108360ff16600481106119705761197061456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e8201548152505061373390919063ffffffff16565b828260ff1660048110611a3957611a3961456a565b60200201525b600101611877565b6000546001600160a01b03163314611a715760405162461bcd60e51b815260040161044c9061464b565b600080546001600160a01b03191681556040517fd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce9190a1565b611ab261409c565b611abb82612987565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c082015292915050565b6000546001600160a01b03163314611b905760405162461bcd60e51b815260040161044c9061464b565b611b98613807565b60015b600260ff821611610c2d57611baf81613854565b611bb881614580565b9050611b9b565b604d546001600160a01b03163314611bd657600080fd5b604d80546001600160a01b0319908116909155600480546001600160a01b0394851690831617905560058054929093169116179055565b60408051600480825260a0820190925260609160009190816020015b611c4d60405180606001604052806000815260200160008152602001600081525090565b815260200190600190039081611c2957905050905060005b600460ff82161015611dc8576001600160a01b0384166000908152604c6020526040812060ff831660048110611c9d57611c9d61456a565b600302019050600060108360ff1660048110611cbb57611cbb61456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e820154815250509050611d6c81612992565b611d77575050611dc0565b6040805160608101825283548152600184015460208201526002840154918101919091528451859060ff8616908110611db257611db261456a565b602002602001018190525050505b600101611c65565b5092915050565b6000611dd9611250565b600480546040516370a0823160e01b815230928101929092526001600160a01b0316906370a0823190602401602060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4691906145cb565b611e509190614606565b905090565b600081600003611e6757506000919050565b60005b600460ff82161015611eb1578260108260ff1660048110611e8d57611e8d61456a565b600f02015403611ea957611ea2816001614632565b9392505050565b600101611e6a565b50600092915050565b611ec2614112565b600080611ece84612b15565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c08201529193509150611f819082613733565b949350505050565b6000546001600160a01b03163314611fb35760405162461bcd60e51b815260040161044c9061464b565b604080518082019091526002815261233360f01b602082015281831115611fed5760405162461bcd60e51b815260040161044c91906141ef565b50604080518082019091526002815261233360f01b60208201526103e882111561202a5760405162461bcd60e51b815260040161044c91906141ef565b50600991909155600a55565b6000612040611166565b611e509047614606565b60008060005b600460ff82161015610c0d5761212060108260ff16600481106120755761207561456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e820154815250506138e2565b61212a90836145b8565b9150600101612050565b6000546001600160a01b0316331461215e5760405162461bcd60e51b815260040161044c9061464b565b610c2d8161391d565b6000546001600160a01b031633146121915760405162461bcd60e51b815260040161044c9061464b565b6000821180156121a15750808211155b60405180604001604052806002815260200161233360f01b815250906121da5760405162461bcd60e51b815260040161044c91906141ef565b50600791909155600855565b60006121f06123e2565b611e465b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561223d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5091906145cb565b60008061226d83612b15565b9150915061227b8282612b8f565b336000908152604c6020526040812061229560018461459f565b60ff16600481106122a8576122a861456a565b600302018054604080518082019091526002815261119b60f11b60208201529192506122e75760405162461bcd60e51b815260040161044c91906141ef565b5060048054600183015460405163a9059cbb60e01b8152339381019390935260248301526001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561233d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061236191906145e4565b50826008016000815461237390614672565b909155506001810154600984018054600090612390908490614606565b9091555050336000908152604c602052604090206123af60018461459f565b60ff16600481106123c2576123c261456a565b600060039190910291909101818155600181018290556002015550505050565b60008060005b600460ff82161015610c0d576124b860108260ff166004811061240d5761240d61456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050613930565b6124c290836145b8565b91506001016123e8565b6124d461409c565b611abb82612a76565b6000546001600160a01b031633146125075760405162461bcd60e51b815260040161044c9061464b565b6000821180156125175750808211155b60405180604001604052806002815260200161233360f01b815250906125505760405162461bcd60e51b815260040161044c91906141ef565b50600e91909155600f55565b60008060008061256b86612b15565b50604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c082015290915061261d908661394f565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c08201529094506126ce90866139a9565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c082015290935061277f90866139f9565b9150509250925092565b6000546001600160a01b031633146127b35760405162461bcd60e51b815260040161044c9061464b565b6000546001600160a01b03166127c857600080fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008060005b600460ff82161015610c0d5761281560108260ff166004811061189c5761189c61456a565b156128465760108160ff16600481106128305761283061456a565b600f0201600901548261284391906145b8565b91505b6001016127f0565b6000610ba461285c83612a76565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c0820152613a49565b60008060005b600460ff82161015610c0d5760108160ff166004811061292e5761292e61456a565b600f0201600801548261294191906145b8565b915060010161290c565b6000546001600160a01b031633146129755760405162461bcd60e51b815260040161044c9061464b565b6001811161298257600080fd5b600d55565b6000611dc882612b15565b805160009015801590610ba4575060808201511580610ba457505060800151421090565b60015b600460ff821611610c2d576129f160106129d460018461459f565b60ff16600481106129e7576129e761456a565b600f0201826134e4565b506129fb81614580565b90506129b9565b60005b600460ff82161015610c2d57612a3360108260ff1660048110612a2a57612a2a61456a565b600f0201613a60565b600101612a05565b60025460ff16612a4757565b604e54421015612a5357565b6000612a5d613cbc565b90508060ff16600003612a6d5750565b610c2d81613854565b600060018260ff1610158015612a905750600460ff831611155b6040518060400160405280600381526020016202331360ec1b81525090612aca5760405162461bcd60e51b815260040161044c91906141ef565b506010612ad860018461459f565b60ff1660048110612aeb57612aeb61456a565b600f020192915050565b612aff82826134e4565b15612b08575050565b612b1182613a60565b5050565b600080612b2183611e55565b905060008160ff161160405180604001604052806002815260200161046760f31b81525090612b635760405162461bcd60e51b815260040161044c91906141ef565b506010612b7160018361459f565b60ff1660048110612b8457612b8461456a565b600f02019150915091565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c0820152612c3c90612992565b60405180604001604052806002815260200161233560f01b81525090612c755760405162461bcd60e51b815260040161044c91906141ef565b50612c7e6129b6565b612c888282612af5565b612c90612a3b565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c0820152612d3d90612992565b60405180604001604052806002815260200161233560f01b81525090612d765760405162461bcd60e51b815260040161044c91906141ef565b505050565b6000612d8682612992565b8015612d965750612d9682613d0f565b8015611ea25750612da682613294565b6040840151612db69060016145b8565b109392505050565b6000806000612dcc84613a60565b600180860154604080516101e081018252875481529287015460208401526002870154908301526003860154606083015260048601546080830152600586015460a0830152600686015460c0830152600786015460e083015260088601546101008301526009860154610120830152600a860154610140830152600b860154610160830152600c860154610180830152600d8601546101a0830152600e8601546101c0830152612e7c91906132b5565b600180870154604080516101e081018252885481529288015460208401526002880154908301526003870154606083015260048701546080830152600587015460a0830152600687015460c0830152600787015460e083015260088701546101008301526009870154610120830152600a870154610140830152600b870154610160830152600c870154610180830152600d8701546101a0830152600e8701546101c0830152919450612f2e9161331c565b600180870154604080516101e081018252885481529288015460208401526002880154908301526003870154606083015260048701546080830152600587015460a0830152600687015460c0830152600787015460e083015260088701546101008301526009870154610120830152600a870154610140830152600b870154610160830152600c870154610180830152600d8701546101a0830152600e8701546101c0830152919350612fe091613367565b9050600161308f85604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050613294565b6130999190614606565b60028601558215613150576000866001600160a01b03168460405160006040518083038185875af1925050503d80600081146130f1576040519150601f19603f3d011682016040523d82523d6000602084013e6130f6565b606091505b505090508060405180604001604052806002815260200161233960f01b815250906131345760405162461bcd60e51b815260040161044c91906141ef565b50838560050160008282546131499190614606565b9091555050505b81156131ea576004805460405163a9059cbb60e01b81526001600160a01b03898116938201939093526024810185905291169063a9059cbb906044016020604051808303816000875af11580156131ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131cf91906145e4565b50818460060160008282546131e49190614606565b90915550505b80156132825760055460405163a9059cbb60e01b81526001600160a01b038881166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af1158015613243573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061326791906145e4565b508084600701600082825461327c9190614606565b90915550505b61328b84613d26565b93509350939050565b600081604001518260200151426132ab9190614606565b610ba491906141db565b60008115806132ca57506132c883612992565b155b156132d757506000610ba4565b60006132e284613e24565b9050806000036132fd576132f584613e46565b915050610ba4565b808361330886613e46565b61331291906141ae565b611f8191906141db565b6000811580613331575061332f83612992565b155b1561333e57506000610ba4565b600061334984613e24565b90508060000361335c576132f5846138e2565b8083613308866138e2565b600081158061337c575061337a83612992565b155b1561338957506000610ba4565b600061339484613e24565b9050806000036133a7576132f584613e7c565b808361330886613e7c565b600080821160405180604001604052806002815260200161233560f01b815250906133f05760405162461bcd60e51b815260040161044c91906141ef565b5060005b600460ff82161015613494576001600160a01b0384166000908152604c6020526040812060ff83166004811061342c5761342c61456a565b6003020190508381600001540361348b57805461344890610aec565b60405180604001604052806002815260200161119b60f11b815250906134815760405162461bcd60e51b815260040161044c91906141ef565b509150610ba49050565b506001016133f4565b506040805180820182526002815261119b60f11b6020820152905162461bcd60e51b815261044c91906004016141ef565b60006134d082612992565b6134dc57506000919050565b5060a0015190565b600060018260ff16101580156134fe5750600460ff831611155b6040518060400160405280600381526020016202331360ec1b815250906135385760405162461bcd60e51b815260040161044c91906141ef565b50604080516101e08101825284548152600185015460208201526002850154918101919091526003840154606082015260048401546080820152600584015460a0820152600684015460c0820152600784015460e082015260088401546101008201526009840154610120820152600a840154610140820152600b840154610160820152600c840154610180820152600d8401546101a0820152600e8401546101c08201526135e690613eb2565b6135f257506000610ba4565b60008360090154846006015461360891906145b8565b90508015613689576004805460405163a9059cbb60e01b8152600092810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015613663573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368791906145e4565b505b601061369660018561459f565b60ff16600481106136a9576136a961456a565b600f0201600080820160009055600182016000905560028201600090556003820160009055600482016000905560058201600090556006820160009055600782016000905560088201600090556009820160009055600a820160009055600b820160009055600c820160009055600d820160009055600e8201600090555050600191505092915050565b61373b614112565b604051806080016040528084815260200160405180610140016040528061376187613294565b815260200161376f87613e46565b815260200161377d876138e2565b815260200161378b87613e7c565b815260200161379987613e24565b81526020016137a787613d0f565b151581526020016137b787613ed0565b151581526020016137c787613eea565b81526020016137d587613f0b565b81526020016137e387613f25565b9052815260ff841660208201526040016137fc85612992565b151590529392505050565b600280546040805180820190915291825261119960f11b602083015260ff16156138445760405162461bcd60e51b815260040161044c91906141ef565b506002805460ff19166001179055565b600061385f82612a76565b905060066000815461387090614619565b91829055508155600e54600f5460009161388991613f3a565b9050600061389b600754600854613f3a565b90506138a781836145b8565b6002840155600383018290554260018401556138c283613f6d565b6138cf603c610e10613f3a565b6138d990426145b8565b604e5550505050565b60006138ed82612992565b6138f957506000919050565b61390282613ed0565b1561390f575060c0015190565b506101a0015190565b919050565b603381111561392b57600080fd5b600155565b600061393b82612992565b61394757506000919050565b5060e0015190565b6000811580613964575061396283612992565b155b1561397157506000610ba4565b826101200151600003613989575060a0820151610ba4565b826101200151828460a0015161399f91906141ae565b611ea291906141db565b60008115806139be57506139bc83612992565b155b156139cb57506000610ba4565b8261012001516000036139e3575060c0820151610ba4565b826101200151828460c0015161399f91906141ae565b6000811580613a0e5750613a0c83612992565b155b15613a1b57506000610ba4565b826101200151600003613a33575060e0820151610ba4565b826101200151828460e0015161399f91906141ae565b805160009015801590610ba45750610ba482613d0f565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613b0d90612992565b1580613b1c5750600481015415155b80613bd15750604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613bcf90613ed0565b155b15613bd95750565b613be281613f6d565b6009810154600b8201819055604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526101208101829052600a830154610140820152610160810191909152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613c9690613294565b600a8201556005810154600c8201556006810154600d8201556007810154600e90910155565b6000805b600460ff82161015613d075760108160ff1660048110613ce257613ce261456a565b600f020154600003613cff57613cf9816001614632565b91505090565b600101613cc0565b506000905090565b60008160600151613d1f83613eea565b1092915050565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613dd390612992565b1580613de25750600481015415155b15613dea5750565b600d54613df8600182613f3a565b613e029190614689565b600114613e0c5750565b610c2d613e1d600b54600c54613f3a565b8290613fd2565b6000613e2f82613ed0565b15613e3d5750610120015190565b50610160015190565b6000613e5182612992565b613e5d57506000919050565b613e6682613ed0565b15613e73575060a0015190565b50610180015190565b6000613e8782612992565b613e9357506000919050565b613e9c82613ed0565b15613ea9575060e0015190565b506101c0015190565b805160009015801590610ba45750613ec982612992565b1592915050565b6000613edb82613294565b82610140015114159050919050565b60008160400151826020015142613f019190614606565b610ba49190614689565b6000613f1682613eea565b8260400151610ba49190614606565b6000613f3082613f0b565b610ba490426145b8565b6000613f468383614606565b613f519060016145b8565b613f59613fe8565b613f639190614689565b611ea290846145b8565b613f7561400a565b816005016000828254613f8891906145b8565b90915550613f969050614039565b816006016000828254613fa991906145b8565b90915550613fb79050614054565b816007016000828254613fca91906145b8565b909155505050565b613fdc81426145b8565b82600401819055505050565b6003805460009143919083613ffc83614619565b91905055611e5091906141ae565b60006103e861401d600954600a54613f3a565b614025612036565b61402f91906141ae565b611e5091906141db565b60006103e861404c600954600a54613f3a565b614025611dcf565b60006103e8614067600954600a54613f3a565b6140256121e6565b60405180608001604052806004905b614086614112565b81526020019060019003908161407e5790505090565b604051806101e001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806080016040528061412561409c565b815260200161418460405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581526020016000815260200160008152602001600081525090565b815260006020820181905260409091015290565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ba457610ba4614198565b634e487b7160e01b600052601260045260246000fd5b6000826141ea576141ea6141c5565b500490565b60006020808352835180602085015260005b8181101561421d57858101830151858201604001528201614201565b506000604082860101526040601f19601f8301168501019250505092915050565b60006020828403121561425057600080fd5b5035919050565b60006020828403121561426957600080fd5b813560ff81168114611ea257600080fd5b80356001600160a01b038116811461391857600080fd5b600080604083850312156142a457600080fd5b823591506142b46020840161427a565b90509250929050565b600080604083850312156142d057600080fd5b6142d98361427a565b946020939093013593505050565b81518152602080830151908201526040808301519082015260608101610ba4565b6000806040838503121561431b57600080fd5b50508035926020909101359150565b805182526020808201519083015260408082015190830152606080820151908301526080808201519083015260a0808201519083015260c0808201519083015260e08082015190830152610100808201519083015261012080820151908301526101408082015190830152610160808201519083015261018080820151908301526101a080820151908301526101c090810151910152565b6143cd82825161432a565b602081015180516101e0840152602081015161020084015260408101516102208401526060810151610240840152608081015161026084015260a081015161441a61028085018215159052565b5060c081015115156102a084015260e08101516102c08401526101008101516102e08401526101200151610300830152604081015160ff1661032083015260600151151561034090910152565b610d808101818360005b600481101561449c576144858383516143c2565b610360929092019160209190910190600101614471565b50505092915050565b6101e08101610ba4828461432a565b600080604083850312156144c757600080fd5b6144d08361427a565b91506142b46020840161427a565b6000602082840312156144f057600080fd5b611ea28261427a565b6020808252825182820181905260009190848201906040850190845b8181101561454f5761453c8385518051825260208082015190830152604090810151910152565b9284019260609290920191600101614515565b50909695505050505050565b6103608101610ba482846143c2565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff810361459657614596614198565b60010192915050565b60ff8281168282160390811115610ba457610ba4614198565b80820180821115610ba457610ba4614198565b6000602082840312156145dd57600080fd5b5051919050565b6000602082840312156145f657600080fd5b81518015158114611ea257600080fd5b81810381811115610ba457610ba4614198565b60006001820161462b5761462b614198565b5060010190565b60ff8181168382160190811115610ba457610ba4614198565b6020808252600d908201526c3737ba103a34329037bbb732b960991b604082015260600190565b60008161468157614681614198565b506000190190565b600082614698576146986141c5565b50069056fea2646970667358221220a2d1618d217be7f908dd9c1c54ceb8b879050d28f6b5ed26c057f92fdb70f33564736f6c6343000817003300000000000000000000000056098bac3e8de316bcf1241143316f8b846c79cb
Deployed Bytecode
0x6080604052600436106103795760003560e01c80639b773945116101d1578063dbea023811610102578063f094a45e116100a0578063f5dabbef1161006f578063f5dabbef14610a82578063fa71fbef14610a97578063fc54d97b14610ab7578063fe108c2514610acc57600080fd5b8063f094a45e14610a0c578063f13da00514610a2c578063f29b004c14610a4c578063f2fde38b14610a6257600080fd5b8063e4066536116100dc578063e406653614610983578063e5e75dcb146109a3578063e8701c33146109b8578063ee97f7f3146109d857600080fd5b8063dbea023814610943578063e3a6bcd514610959578063e3d258a51461096e57600080fd5b8063ba1c7b2e1161016f578063d0d7bef411610149578063d0d7bef4146108d0578063d21220a7146108f0578063d6156ca91461090e578063d9ced0da1461092357600080fd5b8063ba1c7b2e14610890578063c20741b6146108a6578063cfbc2fb2146108bb57600080fd5b8063a71dbec2116101ab578063a71dbec21461080d578063ab9e611f1461082d578063b451b0e11461085a578063b846199a1461087a57600080fd5b80639b773945146107ab5780639ddf9351146107cb578063a24a29d7146107f857600080fd5b80634966abb6116102ab57806368a2bffe11610249578063715018a611610223578063715018a614610734578063727c04c8146107495780638129fc1c146107765780638da5cb5b1461078b57600080fd5b806368a2bffe146106d25780636d36ec48146106f25780636fe0c9061461071257600080fd5b80635cbcc0e8116102855780635cbcc0e81461067c5780636669fdfa1461069257806366b2cac0146106a757806367056586146106bd57600080fd5b80634966abb61461063c5780634b02a6de1461065157806358b92a081461066657600080fd5b80632b97a8e51161031857806332845545116102f257806332845545146105a457806334c985da146105df578063392e53cd1461060c57806345b7f4061461062657600080fd5b80632b97a8e51461054f5780632d21c3fb146105645780632d84da7e1461058457600080fd5b80631c9afd0f116103545780631c9afd0f146104ca5780631d92620a146104f157806324194ef51461050757806325be124e1461051d57600080fd5b80623623e21461045c5780630d3823f2146104855780631328c519146104b557600080fd5b3661045757600060646001543461039091906141ae565b61039a91906141db565b905060007f00000000000000000000000056098bac3e8de316bcf1241143316f8b846c79cb6001600160a01b03168260405160006040518083038185875af1925050503d8060008114610409576040519150601f19603f3d011682016040523d82523d6000602084013e61040e565b606091505b505090508060405180604001604052806002815260200161233160f01b815250906104555760405162461bcd60e51b815260040161044c91906141ef565b60405180910390fd5b005b600080fd5b34801561046857600080fd5b50610472600a5481565b6040519081526020015b60405180910390f35b34801561049157600080fd5b506104a56104a036600461423e565b610aec565b604051901515815260200161047c565b3480156104c157600080fd5b50610455610baa565b3480156104d657600080fd5b506104df610bc4565b60405160ff909116815260200161047c565b3480156104fd57600080fd5b50610472600f5481565b34801561051357600080fd5b5061047260095481565b34801561052957600080fd5b506005546001600160a01b03165b6040516001600160a01b03909116815260200161047c565b34801561055b57600080fd5b50610472603c81565b34801561057057600080fd5b5061045561057f366004614257565b610c13565b34801561059057600080fd5b5061045561059f36600461423e565b610c30565b3480156105b057600080fd5b506105c46105bf366004614291565b610da0565b6040805193845260208401929092529082015260600161047c565b3480156105eb57600080fd5b506105ff6105fa3660046142bd565b61110f565b60405161047c91906142e7565b34801561061857600080fd5b506002546104a59060ff1681565b34801561063257600080fd5b5061047260075481565b34801561064857600080fd5b50610472611166565b34801561065d57600080fd5b50610472611250565b34801561067257600080fd5b50610472600c5481565b34801561068857600080fd5b50610472600e5481565b34801561069e57600080fd5b506104df600481565b3480156106b357600080fd5b5061047260085481565b3480156106c957600080fd5b50610455610bba565b3480156106de57600080fd5b506104556106ed366004614308565b6112bc565b3480156106fe57600080fd5b5061047261070d36600461423e565b6117ac565b34801561071e57600080fd5b50610727611864565b60405161047c9190614467565b34801561074057600080fd5b50610455611a47565b34801561075557600080fd5b5061076961076436600461423e565b611aaa565b60405161047c91906144a5565b34801561078257600080fd5b50610455611b66565b34801561079757600080fd5b50600054610537906001600160a01b031681565b3480156107b757600080fd5b506104556107c63660046144b4565b611bbf565b3480156107d757600080fd5b506107eb6107e63660046144de565b611c0d565b60405161047c91906144f9565b34801561080457600080fd5b50610472611dcf565b34801561081957600080fd5b506104df61082836600461423e565b611e55565b34801561083957600080fd5b5061084d61084836600461423e565b611eba565b60405161047c919061455b565b34801561086657600080fd5b50610455610875366004614308565b611f89565b34801561088657600080fd5b50610472600b5481565b34801561089c57600080fd5b50610472610e1081565b3480156108b257600080fd5b50610472612036565b3480156108c757600080fd5b5061047261204a565b3480156108dc57600080fd5b506104556108eb36600461423e565b612134565b3480156108fc57600080fd5b506004546001600160a01b0316610537565b34801561091a57600080fd5b50600154610472565b34801561092f57600080fd5b5061045561093e366004614308565b612167565b34801561094f57600080fd5b5061047260065481565b34801561096557600080fd5b506104726121e6565b34801561097a57600080fd5b506104726121f4565b34801561098f57600080fd5b5061045561099e36600461423e565b612261565b3480156109af57600080fd5b506104726123e2565b3480156109c457600080fd5b506107696109d3366004614257565b6124cc565b3480156109e457600080fd5b506105377f00000000000000000000000056098bac3e8de316bcf1241143316f8b846c79cb81565b348015610a1857600080fd5b50610455610a27366004614308565b6124dd565b348015610a3857600080fd5b506105c4610a47366004614308565b61255c565b348015610a5857600080fd5b50610472600d5481565b348015610a6e57600080fd5b50610455610a7d3660046144de565b612789565b348015610a8e57600080fd5b506104726127ea565b348015610aa357600080fd5b506104a5610ab2366004614257565b61284e565b348015610ac357600080fd5b50610472612906565b348015610ad857600080fd5b50610455610ae736600461423e565b61294b565b6000610ba4610afa83612987565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c0820152612992565b92915050565b610bb26129b6565b610bba612a02565b610bc2612a3b565b565b60008060005b600460ff82161015610c0d57600060108260ff1660048110610bee57610bee61456a565b600f0201541115610c0557610c0282614580565b91505b600101610bca565b50919050565b610c25610c1f82612a76565b82612af5565b610c2d612a3b565b50565b600080610c3c83612b15565b91509150610c4a8282612b8f565b336000908152604c60205260408120610c6460018461459f565b60ff1660048110610c7757610c7761456a565b600302019050610d5281604051806060016040529081600082015481526020016001820154815260200160028201548152505084604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050612d7b565b60405180604001604052806002815260200161233760f01b81525090610d8b5760405162461bcd60e51b815260040161044c91906141ef565b50610d97338285612dbe565b50505050505050565b6000806000806000610db187612b15565b6001600160a01b0388166000908152604c6020526040812092945090925090610ddb60018461459f565b60ff1660048110610dee57610dee61456a565b6003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050610ec883604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050613294565b816040015103610ee5576000806000955095509550505050611108565b602080820151604080516101e081018252865481526001870154938101939093526002860154908301526003850154606083015260048501546080830152600585015460a0830152600685015460c0830152600785015460e083015260088501546101008301526009850154610120830152600a850154610140830152600b850154610160830152600c850154610180830152600d8501546101a0830152600e8501546101c0830152610f9891906132b5565b602080830151604080516101e081018252875481526001880154938101939093526002870154908301526003860154606083015260048601546080830152600586015460a0830152600686015460c0830152600786015460e083015260088601546101008301526009860154610120830152600a860154610140830152600b860154610160830152600c860154610180830152600d8601546101a0830152600e8601546101c083015291975061104d9161331c565b602080830151604080516101e081018252875481526001880154938101939093526002870154908301526003860154606083015260048601546080830152600586015460a0830152600686015460c0830152600786015460e083015260088601546101008301526009860154610120830152600a860154610140830152600b860154610160830152600c860154610180830152600d8601546101a0830152600e8601546101c083015291965061110291613367565b93505050505b9250925092565b61113360405180606001604052806000815260200160008152602001600081525090565b61113d83836133b2565b604080516060810182528254815260018301546020820152600290920154908201529392505050565b60008060005b600460ff82161015610c0d5761123c60108260ff16600481106111915761119161456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e820154815250506134c5565b61124690836145b8565b915060010161116c565b60008060005b600460ff82161015610c0d5760108160ff16600481106112785761127861456a565b600f02016009015460108260ff16600481106112965761129661456a565b600f0201600601546112a891906145b8565b6112b290836145b8565b9150600101611256565b60028054604080518082019091529182526108cd60f21b602083015260ff166112f85760405162461bcd60e51b815260040161044c91906141ef565b5060008061130584612b15565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c082015291935091506113b790612992565b60405180604001604052806002815260200161233560f01b815250906113f05760405162461bcd60e51b815260040161044c91906141ef565b506113fb82826134e4565b506114068282612af5565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c08201526114b390612992565b60405180604001604052806002815260200161233560f01b815250906114ec5760405162461bcd60e51b815260040161044c91906141ef565b50600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561153b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155f91906145cb565b600480546040516323b872dd60e01b81523392810192909252306024830152604482018790529192506001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e091906145e4565b50600480546040516370a0823160e01b8152309281019290925260009183916001600160a01b0316906370a0823190602401602060405180830381865afa15801561162f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165391906145cb565b61165d9190614606565b336000908152604c602052604081209192509061167b60018661459f565b60ff166004811061168e5761168e61456a565b60030201905084600001548160000154146116b95784600801600081546116b490614619565b909155505b8454808255604080516101e081018252918252600187015460208301526002870154908201526003860154606082015260048601546080820152600586015460a0820152600686015460c0820152600786015460e082015260088601546101008201526009860154610120820152600a860154610140820152600b860154610160820152600c860154610180820152600d8601546101a0820152600e8601546101c082015261176790613294565b81600201819055508181600101600082825461178391906145b8565b925050819055508185600901600082825461179e91906145b8565b909155505050505050505050565b6000610ba46117ba83612987565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c0820152613294565b61186c61406f565b61187461406f565b60005b600460ff82161015610c0d5761194760108260ff166004811061189c5761189c61456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050612992565b15611a3f57611a2461195a826001614632565b60108360ff16600481106119705761197061456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e8201548152505061373390919063ffffffff16565b828260ff1660048110611a3957611a3961456a565b60200201525b600101611877565b6000546001600160a01b03163314611a715760405162461bcd60e51b815260040161044c9061464b565b600080546001600160a01b03191681556040517fd1f66c3d2bc1993a86be5e3d33709d98f0442381befcedd29f578b9b2506b1ce9190a1565b611ab261409c565b611abb82612987565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c082015292915050565b6000546001600160a01b03163314611b905760405162461bcd60e51b815260040161044c9061464b565b611b98613807565b60015b600260ff821611610c2d57611baf81613854565b611bb881614580565b9050611b9b565b604d546001600160a01b03163314611bd657600080fd5b604d80546001600160a01b0319908116909155600480546001600160a01b0394851690831617905560058054929093169116179055565b60408051600480825260a0820190925260609160009190816020015b611c4d60405180606001604052806000815260200160008152602001600081525090565b815260200190600190039081611c2957905050905060005b600460ff82161015611dc8576001600160a01b0384166000908152604c6020526040812060ff831660048110611c9d57611c9d61456a565b600302019050600060108360ff1660048110611cbb57611cbb61456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e820154815250509050611d6c81612992565b611d77575050611dc0565b6040805160608101825283548152600184015460208201526002840154918101919091528451859060ff8616908110611db257611db261456a565b602002602001018190525050505b600101611c65565b5092915050565b6000611dd9611250565b600480546040516370a0823160e01b815230928101929092526001600160a01b0316906370a0823190602401602060405180830381865afa158015611e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4691906145cb565b611e509190614606565b905090565b600081600003611e6757506000919050565b60005b600460ff82161015611eb1578260108260ff1660048110611e8d57611e8d61456a565b600f02015403611ea957611ea2816001614632565b9392505050565b600101611e6a565b50600092915050565b611ec2614112565b600080611ece84612b15565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c08201529193509150611f819082613733565b949350505050565b6000546001600160a01b03163314611fb35760405162461bcd60e51b815260040161044c9061464b565b604080518082019091526002815261233360f01b602082015281831115611fed5760405162461bcd60e51b815260040161044c91906141ef565b50604080518082019091526002815261233360f01b60208201526103e882111561202a5760405162461bcd60e51b815260040161044c91906141ef565b50600991909155600a55565b6000612040611166565b611e509047614606565b60008060005b600460ff82161015610c0d5761212060108260ff16600481106120755761207561456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e820154815250506138e2565b61212a90836145b8565b9150600101612050565b6000546001600160a01b0316331461215e5760405162461bcd60e51b815260040161044c9061464b565b610c2d8161391d565b6000546001600160a01b031633146121915760405162461bcd60e51b815260040161044c9061464b565b6000821180156121a15750808211155b60405180604001604052806002815260200161233360f01b815250906121da5760405162461bcd60e51b815260040161044c91906141ef565b50600791909155600855565b60006121f06123e2565b611e465b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561223d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5091906145cb565b60008061226d83612b15565b9150915061227b8282612b8f565b336000908152604c6020526040812061229560018461459f565b60ff16600481106122a8576122a861456a565b600302018054604080518082019091526002815261119b60f11b60208201529192506122e75760405162461bcd60e51b815260040161044c91906141ef565b5060048054600183015460405163a9059cbb60e01b8152339381019390935260248301526001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561233d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061236191906145e4565b50826008016000815461237390614672565b909155506001810154600984018054600090612390908490614606565b9091555050336000908152604c602052604090206123af60018461459f565b60ff16600481106123c2576123c261456a565b600060039190910291909101818155600181018290556002015550505050565b60008060005b600460ff82161015610c0d576124b860108260ff166004811061240d5761240d61456a565b600f0201604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050613930565b6124c290836145b8565b91506001016123e8565b6124d461409c565b611abb82612a76565b6000546001600160a01b031633146125075760405162461bcd60e51b815260040161044c9061464b565b6000821180156125175750808211155b60405180604001604052806002815260200161233360f01b815250906125505760405162461bcd60e51b815260040161044c91906141ef565b50600e91909155600f55565b60008060008061256b86612b15565b50604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c082015290915061261d908661394f565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c08201529094506126ce90866139a9565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c082015290935061277f90866139f9565b9150509250925092565b6000546001600160a01b031633146127b35760405162461bcd60e51b815260040161044c9061464b565b6000546001600160a01b03166127c857600080fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008060005b600460ff82161015610c0d5761281560108260ff166004811061189c5761189c61456a565b156128465760108160ff16600481106128305761283061456a565b600f0201600901548261284391906145b8565b91505b6001016127f0565b6000610ba461285c83612a76565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e909101546101c0820152613a49565b60008060005b600460ff82161015610c0d5760108160ff166004811061292e5761292e61456a565b600f0201600801548261294191906145b8565b915060010161290c565b6000546001600160a01b031633146129755760405162461bcd60e51b815260040161044c9061464b565b6001811161298257600080fd5b600d55565b6000611dc882612b15565b805160009015801590610ba4575060808201511580610ba457505060800151421090565b60015b600460ff821611610c2d576129f160106129d460018461459f565b60ff16600481106129e7576129e761456a565b600f0201826134e4565b506129fb81614580565b90506129b9565b60005b600460ff82161015610c2d57612a3360108260ff1660048110612a2a57612a2a61456a565b600f0201613a60565b600101612a05565b60025460ff16612a4757565b604e54421015612a5357565b6000612a5d613cbc565b90508060ff16600003612a6d5750565b610c2d81613854565b600060018260ff1610158015612a905750600460ff831611155b6040518060400160405280600381526020016202331360ec1b81525090612aca5760405162461bcd60e51b815260040161044c91906141ef565b506010612ad860018461459f565b60ff1660048110612aeb57612aeb61456a565b600f020192915050565b612aff82826134e4565b15612b08575050565b612b1182613a60565b5050565b600080612b2183611e55565b905060008160ff161160405180604001604052806002815260200161046760f31b81525090612b635760405162461bcd60e51b815260040161044c91906141ef565b506010612b7160018361459f565b60ff1660048110612b8457612b8461456a565b600f02019150915091565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c0820152612c3c90612992565b60405180604001604052806002815260200161233560f01b81525090612c755760405162461bcd60e51b815260040161044c91906141ef565b50612c7e6129b6565b612c888282612af5565b612c90612a3b565b604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526009830154610120820152600a830154610140820152600b830154610160820152600c830154610180820152600d8301546101a0820152600e8301546101c0820152612d3d90612992565b60405180604001604052806002815260200161233560f01b81525090612d765760405162461bcd60e51b815260040161044c91906141ef565b505050565b6000612d8682612992565b8015612d965750612d9682613d0f565b8015611ea25750612da682613294565b6040840151612db69060016145b8565b109392505050565b6000806000612dcc84613a60565b600180860154604080516101e081018252875481529287015460208401526002870154908301526003860154606083015260048601546080830152600586015460a0830152600686015460c0830152600786015460e083015260088601546101008301526009860154610120830152600a860154610140830152600b860154610160830152600c860154610180830152600d8601546101a0830152600e8601546101c0830152612e7c91906132b5565b600180870154604080516101e081018252885481529288015460208401526002880154908301526003870154606083015260048701546080830152600587015460a0830152600687015460c0830152600787015460e083015260088701546101008301526009870154610120830152600a870154610140830152600b870154610160830152600c870154610180830152600d8701546101a0830152600e8701546101c0830152919450612f2e9161331c565b600180870154604080516101e081018252885481529288015460208401526002880154908301526003870154606083015260048701546080830152600587015460a0830152600687015460c0830152600787015460e083015260088701546101008301526009870154610120830152600a870154610140830152600b870154610160830152600c870154610180830152600d8701546101a0830152600e8701546101c0830152919350612fe091613367565b9050600161308f85604051806101e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a8201548152602001600b8201548152602001600c8201548152602001600d8201548152602001600e82015481525050613294565b6130999190614606565b60028601558215613150576000866001600160a01b03168460405160006040518083038185875af1925050503d80600081146130f1576040519150601f19603f3d011682016040523d82523d6000602084013e6130f6565b606091505b505090508060405180604001604052806002815260200161233960f01b815250906131345760405162461bcd60e51b815260040161044c91906141ef565b50838560050160008282546131499190614606565b9091555050505b81156131ea576004805460405163a9059cbb60e01b81526001600160a01b03898116938201939093526024810185905291169063a9059cbb906044016020604051808303816000875af11580156131ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131cf91906145e4565b50818460060160008282546131e49190614606565b90915550505b80156132825760055460405163a9059cbb60e01b81526001600160a01b038881166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af1158015613243573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061326791906145e4565b508084600701600082825461327c9190614606565b90915550505b61328b84613d26565b93509350939050565b600081604001518260200151426132ab9190614606565b610ba491906141db565b60008115806132ca57506132c883612992565b155b156132d757506000610ba4565b60006132e284613e24565b9050806000036132fd576132f584613e46565b915050610ba4565b808361330886613e46565b61331291906141ae565b611f8191906141db565b6000811580613331575061332f83612992565b155b1561333e57506000610ba4565b600061334984613e24565b90508060000361335c576132f5846138e2565b8083613308866138e2565b600081158061337c575061337a83612992565b155b1561338957506000610ba4565b600061339484613e24565b9050806000036133a7576132f584613e7c565b808361330886613e7c565b600080821160405180604001604052806002815260200161233560f01b815250906133f05760405162461bcd60e51b815260040161044c91906141ef565b5060005b600460ff82161015613494576001600160a01b0384166000908152604c6020526040812060ff83166004811061342c5761342c61456a565b6003020190508381600001540361348b57805461344890610aec565b60405180604001604052806002815260200161119b60f11b815250906134815760405162461bcd60e51b815260040161044c91906141ef565b509150610ba49050565b506001016133f4565b506040805180820182526002815261119b60f11b6020820152905162461bcd60e51b815261044c91906004016141ef565b60006134d082612992565b6134dc57506000919050565b5060a0015190565b600060018260ff16101580156134fe5750600460ff831611155b6040518060400160405280600381526020016202331360ec1b815250906135385760405162461bcd60e51b815260040161044c91906141ef565b50604080516101e08101825284548152600185015460208201526002850154918101919091526003840154606082015260048401546080820152600584015460a0820152600684015460c0820152600784015460e082015260088401546101008201526009840154610120820152600a840154610140820152600b840154610160820152600c840154610180820152600d8401546101a0820152600e8401546101c08201526135e690613eb2565b6135f257506000610ba4565b60008360090154846006015461360891906145b8565b90508015613689576004805460405163a9059cbb60e01b8152600092810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015613663573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368791906145e4565b505b601061369660018561459f565b60ff16600481106136a9576136a961456a565b600f0201600080820160009055600182016000905560028201600090556003820160009055600482016000905560058201600090556006820160009055600782016000905560088201600090556009820160009055600a820160009055600b820160009055600c820160009055600d820160009055600e8201600090555050600191505092915050565b61373b614112565b604051806080016040528084815260200160405180610140016040528061376187613294565b815260200161376f87613e46565b815260200161377d876138e2565b815260200161378b87613e7c565b815260200161379987613e24565b81526020016137a787613d0f565b151581526020016137b787613ed0565b151581526020016137c787613eea565b81526020016137d587613f0b565b81526020016137e387613f25565b9052815260ff841660208201526040016137fc85612992565b151590529392505050565b600280546040805180820190915291825261119960f11b602083015260ff16156138445760405162461bcd60e51b815260040161044c91906141ef565b506002805460ff19166001179055565b600061385f82612a76565b905060066000815461387090614619565b91829055508155600e54600f5460009161388991613f3a565b9050600061389b600754600854613f3a565b90506138a781836145b8565b6002840155600383018290554260018401556138c283613f6d565b6138cf603c610e10613f3a565b6138d990426145b8565b604e5550505050565b60006138ed82612992565b6138f957506000919050565b61390282613ed0565b1561390f575060c0015190565b506101a0015190565b919050565b603381111561392b57600080fd5b600155565b600061393b82612992565b61394757506000919050565b5060e0015190565b6000811580613964575061396283612992565b155b1561397157506000610ba4565b826101200151600003613989575060a0820151610ba4565b826101200151828460a0015161399f91906141ae565b611ea291906141db565b60008115806139be57506139bc83612992565b155b156139cb57506000610ba4565b8261012001516000036139e3575060c0820151610ba4565b826101200151828460c0015161399f91906141ae565b6000811580613a0e5750613a0c83612992565b155b15613a1b57506000610ba4565b826101200151600003613a33575060e0820151610ba4565b826101200151828460e0015161399f91906141ae565b805160009015801590610ba45750610ba482613d0f565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613b0d90612992565b1580613b1c5750600481015415155b80613bd15750604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613bcf90613ed0565b155b15613bd95750565b613be281613f6d565b6009810154600b8201819055604080516101e08101825283548152600184015460208201526002840154918101919091526003830154606082015260048301546080820152600583015460a0820152600683015460c0820152600783015460e082015260088301546101008201526101208101829052600a830154610140820152610160810191909152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613c9690613294565b600a8201556005810154600c8201556006810154600d8201556007810154600e90910155565b6000805b600460ff82161015613d075760108160ff1660048110613ce257613ce261456a565b600f020154600003613cff57613cf9816001614632565b91505090565b600101613cc0565b506000905090565b60008160600151613d1f83613eea565b1092915050565b604080516101e08101825282548152600183015460208201526002830154918101919091526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c820154610180820152600d8201546101a0820152600e8201546101c0820152613dd390612992565b1580613de25750600481015415155b15613dea5750565b600d54613df8600182613f3a565b613e029190614689565b600114613e0c5750565b610c2d613e1d600b54600c54613f3a565b8290613fd2565b6000613e2f82613ed0565b15613e3d5750610120015190565b50610160015190565b6000613e5182612992565b613e5d57506000919050565b613e6682613ed0565b15613e73575060a0015190565b50610180015190565b6000613e8782612992565b613e9357506000919050565b613e9c82613ed0565b15613ea9575060e0015190565b506101c0015190565b805160009015801590610ba45750613ec982612992565b1592915050565b6000613edb82613294565b82610140015114159050919050565b60008160400151826020015142613f019190614606565b610ba49190614689565b6000613f1682613eea565b8260400151610ba49190614606565b6000613f3082613f0b565b610ba490426145b8565b6000613f468383614606565b613f519060016145b8565b613f59613fe8565b613f639190614689565b611ea290846145b8565b613f7561400a565b816005016000828254613f8891906145b8565b90915550613f969050614039565b816006016000828254613fa991906145b8565b90915550613fb79050614054565b816007016000828254613fca91906145b8565b909155505050565b613fdc81426145b8565b82600401819055505050565b6003805460009143919083613ffc83614619565b91905055611e5091906141ae565b60006103e861401d600954600a54613f3a565b614025612036565b61402f91906141ae565b611e5091906141db565b60006103e861404c600954600a54613f3a565b614025611dcf565b60006103e8614067600954600a54613f3a565b6140256121e6565b60405180608001604052806004905b614086614112565b81526020019060019003908161407e5790505090565b604051806101e001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051806080016040528061412561409c565b815260200161418460405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581526020016000815260200160008152602001600081525090565b815260006020820181905260409091015290565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ba457610ba4614198565b634e487b7160e01b600052601260045260246000fd5b6000826141ea576141ea6141c5565b500490565b60006020808352835180602085015260005b8181101561421d57858101830151858201604001528201614201565b506000604082860101526040601f19601f8301168501019250505092915050565b60006020828403121561425057600080fd5b5035919050565b60006020828403121561426957600080fd5b813560ff81168114611ea257600080fd5b80356001600160a01b038116811461391857600080fd5b600080604083850312156142a457600080fd5b823591506142b46020840161427a565b90509250929050565b600080604083850312156142d057600080fd5b6142d98361427a565b946020939093013593505050565b81518152602080830151908201526040808301519082015260608101610ba4565b6000806040838503121561431b57600080fd5b50508035926020909101359150565b805182526020808201519083015260408082015190830152606080820151908301526080808201519083015260a0808201519083015260c0808201519083015260e08082015190830152610100808201519083015261012080820151908301526101408082015190830152610160808201519083015261018080820151908301526101a080820151908301526101c090810151910152565b6143cd82825161432a565b602081015180516101e0840152602081015161020084015260408101516102208401526060810151610240840152608081015161026084015260a081015161441a61028085018215159052565b5060c081015115156102a084015260e08101516102c08401526101008101516102e08401526101200151610300830152604081015160ff1661032083015260600151151561034090910152565b610d808101818360005b600481101561449c576144858383516143c2565b610360929092019160209190910190600101614471565b50505092915050565b6101e08101610ba4828461432a565b600080604083850312156144c757600080fd5b6144d08361427a565b91506142b46020840161427a565b6000602082840312156144f057600080fd5b611ea28261427a565b6020808252825182820181905260009190848201906040850190845b8181101561454f5761453c8385518051825260208082015190830152604090810151910152565b9284019260609290920191600101614515565b50909695505050505050565b6103608101610ba482846143c2565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff810361459657614596614198565b60010192915050565b60ff8281168282160390811115610ba457610ba4614198565b80820180821115610ba457610ba4614198565b6000602082840312156145dd57600080fd5b5051919050565b6000602082840312156145f657600080fd5b81518015158114611ea257600080fd5b81810381811115610ba457610ba4614198565b60006001820161462b5761462b614198565b5060010190565b60ff8181168382160190811115610ba457610ba4614198565b6020808252600d908201526c3737ba103a34329037bbb732b960991b604082015260600190565b60008161468157614681614198565b506000190190565b600082614698576146986141c5565b50069056fea2646970667358221220a2d1618d217be7f908dd9c1c54ceb8b879050d28f6b5ed26c057f92fdb70f33564736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000056098bac3e8de316bcf1241143316f8b846c79cb
-----Decoded View---------------
Arg [0] : master_ (address): 0x56098bAc3e8DE316bcf1241143316F8b846c79Cb
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000056098bac3e8de316bcf1241143316f8b846c79cb
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.