Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 14969662 | 893 days ago | IN | 0 ETH | 0.2805516 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NodePackV4
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./lib/AdminAccess.sol"; import "./interfaces/IERC20.sol"; import "./interfaces/INodePackV3.sol"; import "./interfaces/IStrongPool.sol"; import "./interfaces/IStrongNFTPackBonus.sol"; import "./lib/InternalCalls.sol"; import "./lib/SbMath.sol"; contract NodePackV4 is AdminAccess, INodePackV3, InternalCalls { uint constant public PACK_TYPE_NODE_REWARD_LIFETIME = 0; uint constant public PACK_TYPE_NODE_REWARD_PER_SECOND = 1; uint constant public PACK_TYPE_FEE_STRONG = 2; uint constant public PACK_TYPE_FEE_CREATE = 3; uint constant public PACK_TYPE_FEE_RECURRING = 4; uint constant public PACK_TYPE_FEE_CLAIMING_NUMERATOR = 5; uint constant public PACK_TYPE_FEE_CLAIMING_DENOMINATOR = 6; uint constant public PACK_TYPE_RECURRING_CYCLE_SECONDS = 7; uint constant public PACK_TYPE_GRACE_PERIOD_SECONDS = 8; uint constant public PACK_TYPE_PAY_CYCLES_LIMIT = 9; uint constant public PACK_TYPE_NODES_LIMIT = 10; event Created(address indexed entity, uint packType, uint nodesCount, bool usedCredit, uint timestamp, address migratedFrom); event AddedNodes(address indexed entity, uint packType, uint nodesCount, uint totalNodesCount, bool usedCredit, uint timestamp, address migratedFrom); event MaturedNodes(address indexed entity, uint packType, uint maturedCount); event Paid(address indexed entity, uint packType, uint timestamp); event Claimed(address indexed entity, uint packType, uint reward); event SetNodeFeeCollector(address payable collector); event SetFeeCollector(address payable collector); event SetTakeStrongBips(uint bips); event SetNFTBonusContract(address strongNFTBonus); event SetServiceContractEnabled(address service, bool enabled); event SetPackTypeActive(uint packType, bool active); event SetPackTypeSetting(uint packType, uint settingId, uint value); event SetPackTypeHasSettings(uint packType, bool hasSettings); IERC20 public strongToken; IStrongNFTPackBonus public strongNFTBonus; uint public totalNodes; uint public totalMaturedNodes; uint public totalPacks; uint public totalPackTypes; uint public takeStrongBips; address payable public claimFeeCollector; address payable public nodeFeeCollector; mapping(address => uint) public entityNodeCount; mapping(address => uint) public entityCreditUsed; mapping(bytes => uint) public entityPackCreatedAt; mapping(bytes => uint) public entityPackLastPaidAt; mapping(bytes => uint) public entityPackLastClaimedAt; mapping(bytes => uint) public entityPackTotalNodeCount; mapping(bytes => uint) public entityPackMaturedNodeCount; mapping(bytes => uint) public entityPackRewardDue; mapping(bytes => uint) public entityPackClaimedTotal; mapping(bytes => uint) public entityPackClaimedMatured; mapping(uint => bool) public packTypeActive; mapping(uint => bool) public packTypeHasSettings; mapping(uint => mapping(uint => uint)) public packTypeSettings; mapping(address => bool) private serviceContractEnabled; function init( IERC20 _strongToken, IStrongNFTPackBonus _strongNFTBonus, address payable _nodeFeeCollector, address payable _claimFeeCollector ) external onlyRole(adminControl.SUPER_ADMIN()) { require(_claimFeeCollector != address(0), "no address"); strongToken = _strongToken; strongNFTBonus = _strongNFTBonus; nodeFeeCollector = _nodeFeeCollector; claimFeeCollector = _claimFeeCollector; InternalCalls.init(); } // // Getters // ------------------------------------------------------------------------------------------------------------------- function canPackBePaid(address _entity, uint _packType) public view returns (bool) { return doesPackExist(_entity, _packType) && !hasPackExpired(_entity, _packType) && !hasMaxPayments(_entity, _packType); } function doesPackExist(address _entity, uint _packType) public view returns (bool) { return entityPackLastPaidAt[getPackId(_entity, _packType)] > 0; } function isPackPastDue(address _entity, uint _packType) public view returns (bool) { bytes memory id = getPackId(_entity, _packType); uint lastPaidAt = entityPackLastPaidAt[id]; return block.timestamp > (lastPaidAt + getRecurringPaymentCycle(_packType)); } function hasMaxPayments(address _entity, uint _packType) public view returns (bool) { bytes memory id = getPackId(_entity, _packType); uint lastPaidAt = entityPackLastPaidAt[id]; uint recurringPaymentCycle = getRecurringPaymentCycle(_packType); uint limit = block.timestamp + recurringPaymentCycle * getPayCyclesLimit(_packType); return lastPaidAt + recurringPaymentCycle >= limit; } function hasPackExpired(address _entity, uint _packType) public view returns (bool) { bytes memory id = getPackId(_entity, _packType); uint lastPaidAt = entityPackLastPaidAt[id]; if (lastPaidAt == 0) return true; return block.timestamp > (lastPaidAt + getRecurringPaymentCycle(_packType) + getGracePeriod(_packType)); } function getClaimingFee(address _entity, uint _packType, uint _timestamp) public view returns (uint) { return getRewardAt(_entity, _packType, _timestamp, true) * getClaimingFeeNumerator(_packType) / getClaimingFeeDenominator(_packType); } function getPacksClaimingFee(address _entity, uint _timestamp) external view returns (uint) { uint fee = 0; for (uint packType = 1; packType <= totalPackTypes; packType++) { fee = fee + getClaimingFee(_entity, packType, _timestamp); } return fee; } function getPackId(address _entity, uint _packType) public pure returns (bytes memory) { uint id = _packType != 0 ? _packType : 1; return abi.encodePacked(_entity, uint32(id), uint64(1)); } function getEntityPackTotalNodeCount(address _entity, uint _packType) external view returns (uint) { return entityPackTotalNodeCount[getPackId(_entity, _packType)]; } function getEntityPackMaturedNodeCount(address _entity, uint _packType) external view returns (uint) { return entityPackMaturedNodeCount[getPackId(_entity, _packType)]; } function getEntityPackActiveNodeCount(address _entity, uint _packType) public view returns (uint) { bytes memory id = getPackId(_entity, _packType); return entityPackTotalNodeCount[id] - entityPackMaturedNodeCount[id]; } function getEntityPackLifetimeRewards(address _entity, uint _packType) public view returns (uint) { return getNodeRewardLifetime(_packType) * entityPackTotalNodeCount[getPackId(_entity, _packType)]; } function getEntityPackClaimedMaturedRewards(address _entity, uint _packType) public view returns (uint) { return entityPackClaimedMatured[getPackId(_entity, _packType)]; } function getEntityPackClaimedTotalRewards(address _entity, uint _packType) public view returns (uint) { return entityPackClaimedTotal[getPackId(_entity, _packType)]; } function getEntityPackAccruedTotalRewards(address _entity, uint _packType) public view returns (uint) { return entityPackClaimedTotal[getPackId(_entity, _packType)] + getRewardAt(_entity, _packType, block.timestamp, true); } function getPackLastPaidAt(address _entity, uint _packType) external view returns (uint) { return entityPackLastPaidAt[getPackId(_entity, _packType)]; } function getNodeCreateFee(address _entity, uint _packType) public view returns (uint) { uint fee = getCreatingFeeInWei(_packType); uint lastPaidAt = entityPackLastPaidAt[getPackId(_entity, _packType)]; if (lastPaidAt == 0) return fee; if (isPackPastDue(_entity, _packType)) return fee; if (hasPackExpired(_entity, _packType)) return 0; uint payCycleSeconds = getRecurringPaymentCycle(_packType); uint dueInSeconds = lastPaidAt + payCycleSeconds - block.timestamp; return dueInSeconds * fee / payCycleSeconds; } function getRecurringFee(address _entity, uint _packType) public view returns (uint) { return getRecurringFeeInWei(_packType) * getEntityPackActiveNodeCount(_entity, _packType); } function getPacksRecurringFee(address _entity) external view returns (uint) { uint fee = 0; for (uint packType = 1; packType <= totalPackTypes; packType++) { if (canPackBePaid(_entity, packType)) fee = fee + getRecurringFee(_entity, packType); } return fee; } function getReward(address _entity, uint _packType) external view returns (uint) { return getRewardAt(_entity, _packType, block.timestamp, true); } function getRewardAt(address _entity, uint _packType, uint _timestamp, bool _addBonus) public view returns (uint) { bytes memory id = getPackId(_entity, _packType); uint lastClaimedAt = entityPackLastClaimedAt[id]; uint registeredAt = entityPackCreatedAt[id]; if (!doesPackExist(_entity, _packType)) return 0; if (hasPackExpired(_entity, _packType)) return 0; if (_timestamp > block.timestamp) return 0; if (_timestamp < lastClaimedAt) return 0; if (_timestamp <= registeredAt) return 0; uint secondsPassed = lastClaimedAt > 0 ? _timestamp - lastClaimedAt : _timestamp - registeredAt; uint maxReward = getEntityPackLifetimeRewards(_entity, _packType); uint reward = secondsPassed * getNodeRewardPerSecond(_packType) * getEntityPackActiveNodeCount(_entity, _packType); uint bonus = _addBonus ? getBonusAt(_entity, _packType, _timestamp) : 0; uint totalReward = reward + bonus + entityPackRewardDue[id]; if (entityPackClaimedTotal[id] >= maxReward) { return 0; } if ((entityPackClaimedTotal[id] + totalReward) >= maxReward) { totalReward = maxReward - entityPackClaimedTotal[id]; } return totalReward; } function getBonusAt(address _entity, uint _packType, uint _timestamp) public view returns (uint) { if (address(strongNFTBonus) == address(0)) return 0; bytes memory id = getPackId(_entity, _packType); uint lastClaimedAt = entityPackLastClaimedAt[id] != 0 ? entityPackLastClaimedAt[id] : entityPackCreatedAt[id]; return strongNFTBonus.getBonus(_entity, _packType, lastClaimedAt, _timestamp); } function getEntityRewards(address _entity, uint _timestamp) public view returns (uint) { uint reward = 0; for (uint packType = 1; packType <= totalPackTypes; packType++) { reward = reward + getRewardAt(_entity, packType, _timestamp > 0 ? _timestamp : block.timestamp, true); } return reward; } function getEntityCreditAvailable(address _entity, uint _timestamp) public view returns (uint) { return getEntityRewards(_entity, _timestamp) - entityCreditUsed[_entity]; } function getRewardBalance() external view returns (uint) { return strongToken.balanceOf(address(this)); } // // Actions // ------------------------------------------------------------------------------------------------------------------- function create(uint _packType, uint _nodeCount, bool _useCredit) external payable { uint fee = getNodeCreateFee(msg.sender, _packType) * _nodeCount; uint strongFee = getStrongFeeInWei(_packType) * _nodeCount; uint packTypeLimit = getNodesLimit(_packType); uint timestamp = block.timestamp; bytes memory id = getPackId(msg.sender, _packType); require(packTypeActive[_packType], "invalid type"); require(packTypeLimit == 0 || (entityPackTotalNodeCount[id] + _nodeCount) <= packTypeLimit, "over limit"); require(_nodeCount >= 1, "invalid node count"); require(msg.value >= fee, "invalid fee"); if (address(strongNFTBonus) != address(0)) { strongNFTBonus.setEntityPackBonusSaved(msg.sender, _packType); } totalNodes += _nodeCount; entityNodeCount[msg.sender] += _nodeCount; if (entityPackTotalNodeCount[id] == 0) { entityPackCreatedAt[id] = timestamp; entityPackLastPaidAt[id] = timestamp; entityPackTotalNodeCount[id] += _nodeCount; totalPacks += 1; emit Created(msg.sender, _packType, _nodeCount, _useCredit, block.timestamp, address(0)); } else { require(!hasPackExpired(msg.sender, _packType), "pack expired"); updatePackState(msg.sender, _packType, true); entityPackTotalNodeCount[id] += _nodeCount; emit AddedNodes(msg.sender, _packType, _nodeCount, entityPackTotalNodeCount[id], _useCredit, block.timestamp, address(0)); } if (_useCredit) { require(getEntityCreditAvailable(msg.sender, block.timestamp) >= strongFee, "not enough"); entityCreditUsed[msg.sender] += strongFee; } else { uint takeStrong = strongFee * takeStrongBips / 10000; if (takeStrong > 0) { require(strongToken.transferFrom(msg.sender, nodeFeeCollector, takeStrong), "transfer failed"); } if (strongFee > takeStrong) { require(strongToken.transferFrom(msg.sender, address(this), strongFee - takeStrong), "transfer failed"); } } sendValue(nodeFeeCollector, fee); if (msg.value > fee) sendValue(payable(msg.sender), msg.value - fee); } function claim(uint _packType, uint _timestamp, address _toStrongPool) public payable returns (uint) { address entity = msg.sender == address(strongNFTBonus) ? tx.origin : msg.sender; bytes memory id = getPackId(entity, _packType); uint lastClaimedAt = entityPackLastClaimedAt[id] != 0 ? entityPackLastClaimedAt[id] : entityPackCreatedAt[id]; require(doesPackExist(entity, _packType), "doesnt exist"); require(!hasPackExpired(entity, _packType), "pack expired"); require(!isPackPastDue(entity, _packType), "past due"); require(_timestamp <= block.timestamp, "bad timestamp"); require(lastClaimedAt + 900 < _timestamp, "too soon"); uint reward = getRewardAt(entity, _packType, _timestamp, true); require(reward > 0, "no reward"); require(strongToken.balanceOf(address(this)) >= reward, "over balance"); uint fee = reward * getClaimingFeeNumerator(_packType) / getClaimingFeeDenominator(_packType); require(msg.value >= fee, "invalid fee"); entityPackLastClaimedAt[id] = _timestamp; entityPackClaimedTotal[id] += reward; entityPackRewardDue[id] = 0; emit Claimed(entity, _packType, reward); if (entityCreditUsed[msg.sender] > 0) { if (entityCreditUsed[msg.sender] > reward) { entityCreditUsed[msg.sender] = entityCreditUsed[msg.sender] - reward; reward = 0; } else { reward = reward - entityCreditUsed[msg.sender]; entityCreditUsed[msg.sender] = 0; } } updatePackState(msg.sender, _packType, false); if (address(strongNFTBonus) != address(0)) { strongNFTBonus.resetEntityPackBonusSaved(id); } if (reward > 0) { if (_toStrongPool != address(0)) IStrongPool(_toStrongPool).mineFor(entity, reward); else require(strongToken.transfer(entity, reward), "transfer failed"); } sendValue(claimFeeCollector, fee); if (isUserCall() && msg.value > fee) sendValue(payable(msg.sender), msg.value - fee); return fee; } function claimAll(uint _timestamp, address _toStrongPool) external payable makesInternalCalls { require(entityNodeCount[msg.sender] > 0, "no nodes"); uint valueLeft = msg.value; for (uint packType = 1; packType <= totalPackTypes; packType++) { uint reward = getRewardAt(msg.sender, packType, _timestamp, true); if (reward > 0) { require(valueLeft >= 0, "not enough"); uint paid = claim(packType, _timestamp, _toStrongPool); valueLeft = valueLeft - paid; } } if (valueLeft > 0) sendValue(payable(msg.sender), valueLeft); } function pay(uint _packType) public payable returns (uint) { require(canPackBePaid(msg.sender, _packType), "cant pay"); updatePackState(msg.sender, _packType, true); bytes memory id = getPackId(msg.sender, _packType); uint fee = getRecurringFeeInWei(_packType) * getEntityPackActiveNodeCount(msg.sender, _packType); require(msg.value >= fee, "invalid fee"); entityPackLastPaidAt[id] = entityPackLastPaidAt[id] + getRecurringPaymentCycle(_packType); emit Paid(msg.sender, _packType, entityPackLastPaidAt[id]); sendValue(nodeFeeCollector, fee); if (isUserCall() && msg.value > fee) sendValue(payable(msg.sender), msg.value - fee); return fee; } function payAll() external payable makesInternalCalls { require(entityNodeCount[msg.sender] > 0, "no packs"); uint valueLeft = msg.value; for (uint packType = 1; packType <= totalPackTypes; packType++) { if (!canPackBePaid(msg.sender, packType)) continue; require(valueLeft > 0, "not enough"); uint paid = pay(packType); valueLeft = valueLeft - paid; } if (valueLeft > 0) sendValue(payable(msg.sender), valueLeft); } // // Admin // ------------------------------------------------------------------------------------------------------------------- function deposit(uint _amount) external onlyRole(adminControl.SUPER_ADMIN()) { require(_amount > 0); require(strongToken.transferFrom(msg.sender, address(this), _amount), "transfer failed"); } function withdraw(address _destination, uint _amount) external onlyRole(adminControl.SUPER_ADMIN()) { require(_amount > 0); require(strongToken.balanceOf(address(this)) >= _amount, "over balance"); require(strongToken.transfer(_destination, _amount), "transfer failed"); } function approveStrongPool(IStrongPool _strongPool, uint _amount) external onlyRole(adminControl.SUPER_ADMIN()) { require(strongToken.approve(address(_strongPool), _amount), "approve failed"); } function setNodeFeeCollector(address payable _nodeFeeCollector) external onlyRole(adminControl.SUPER_ADMIN()) { require(_nodeFeeCollector != address(0)); nodeFeeCollector = _nodeFeeCollector; emit SetNodeFeeCollector(_nodeFeeCollector); } function setClaimFeeCollector(address payable _claimFeeCollector) external onlyRole(adminControl.SUPER_ADMIN()) { require(_claimFeeCollector != address(0)); claimFeeCollector = _claimFeeCollector; emit SetFeeCollector(_claimFeeCollector); } function setNFTBonusContract(address _contract) external onlyRole(adminControl.SERVICE_ADMIN()) { strongNFTBonus = IStrongNFTPackBonus(_contract); emit SetNFTBonusContract(_contract); } function setTakeStrongBips(uint _bips) external onlyRole(adminControl.SUPER_ADMIN()) { require(_bips <= 10000, "invalid value"); takeStrongBips = _bips; emit SetTakeStrongBips(_bips); } // // Settings // ------------------------------------------------------------------------------------------------------------------- function getCustomSettingOrDefaultIfZero(uint _packType, uint _setting) internal view returns (uint) { return packTypeHasSettings[_packType] && packTypeSettings[_packType][_setting] > 0 ? packTypeSettings[_packType][_setting] : packTypeSettings[0][_setting]; } function getNodeRewardLifetime(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_NODE_REWARD_LIFETIME); } function getNodeRewardPerSecond(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_NODE_REWARD_PER_SECOND); } function getClaimingFeeNumerator(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_FEE_CLAIMING_NUMERATOR); } function getClaimingFeeDenominator(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_FEE_CLAIMING_DENOMINATOR); } function getCreatingFeeInWei(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_FEE_CREATE); } function getRecurringFeeInWei(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_FEE_RECURRING); } function getStrongFeeInWei(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_FEE_STRONG); } function getRecurringPaymentCycle(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_RECURRING_CYCLE_SECONDS); } function getGracePeriod(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_GRACE_PERIOD_SECONDS); } function getPayCyclesLimit(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_PAY_CYCLES_LIMIT); } function getNodesLimit(uint _packType) public view returns (uint) { return getCustomSettingOrDefaultIfZero(_packType, PACK_TYPE_NODES_LIMIT); } // ------------------------------------------------------------------------------------------------------------------- function setPackTypeActive(uint _packType, bool _active) external onlyRole(adminControl.SERVICE_ADMIN()) { // Pack type 0 is being used as a placeholder for the default settings for pack types that don't have custom ones, // So it shouldn't be activated and used to create nodes require(_packType > 0, "invalid type"); packTypeActive[_packType] = _active; if (totalPackTypes < _packType && _active) { totalPackTypes = _packType; } emit SetPackTypeActive(_packType, _active); } function setPackTypeHasSettings(uint _packType, bool _hasSettings) external onlyRole(adminControl.SERVICE_ADMIN()) { packTypeHasSettings[_packType] = _hasSettings; emit SetPackTypeHasSettings(_packType, _hasSettings); } function setPackTypeSetting(uint _packType, uint _settingId, uint _value) external onlyRole(adminControl.SERVICE_ADMIN()) { packTypeHasSettings[_packType] = true; packTypeSettings[_packType][_settingId] = _value; emit SetPackTypeSetting(_packType, _settingId, _value); } function setServiceContractEnabled(address _contract, bool _enabled) external onlyRole(adminControl.SERVICE_ADMIN()) { serviceContractEnabled[_contract] = _enabled; emit SetServiceContractEnabled(_contract, _enabled); } // ------------------------------------------------------------------------------------------------------------------- function sendValue(address payable recipient, uint amount) internal { require(address(this).balance >= amount, "insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success,) = recipient.call{value : amount}(""); require(success, "send failed"); } function updatePackState(address _entity, uint _packType) external { require(msg.sender == address(strongNFTBonus), "invalid sender"); updatePackState(_entity, _packType, true); } function updatePackState(address _entity, uint _packType, bool _saveRewardsDue) internal { bytes memory id = getPackId(_entity, _packType); uint rewardDue = getRewardAt(_entity, _packType, block.timestamp, false); uint accruedTotal = entityPackClaimedTotal[id] + rewardDue; uint nodeLifetimeReward = getNodeRewardLifetime(_packType); uint maturedNodesTotal = accruedTotal / nodeLifetimeReward; uint maturedNodesNew = maturedNodesTotal > entityPackMaturedNodeCount[id] ? maturedNodesTotal - entityPackMaturedNodeCount[id] : 0; if (_saveRewardsDue) { entityPackRewardDue[id] = rewardDue; entityPackLastClaimedAt[id] = block.timestamp; } if (maturedNodesNew > 0) { entityPackMaturedNodeCount[id] += maturedNodesNew; entityPackClaimedMatured[id] += maturedNodesNew * nodeLifetimeReward; totalMaturedNodes += maturedNodesNew; emit MaturedNodes(_entity, _packType, maturedNodesNew); } } // // Migration // ------------------------------------------------------------------------------------------------------------------- function migrateNodes(address _entity, uint _packType, uint _nodeCount, uint _lastPaidAt, uint _rewardsDue, uint _totalClaimed) external returns (bool) { require(serviceContractEnabled[msg.sender], "no service"); require(packTypeActive[_packType], "invalid type"); require(!doesPackExist(_entity, _packType) || !hasPackExpired(_entity, _packType), "pack expired"); bytes memory id = getPackId(_entity, _packType); totalNodes += _nodeCount; entityNodeCount[_entity] += _nodeCount; if (entityPackCreatedAt[id] == 0) { entityPackCreatedAt[id] = block.timestamp; entityPackLastPaidAt[id] = _lastPaidAt > 0 ? _lastPaidAt : block.timestamp; totalPacks += 1; emit Created(_entity, _packType, _nodeCount, false, block.timestamp, msg.sender); } else { updatePackState(_entity, _packType, true); emit AddedNodes(_entity, _packType, _nodeCount, entityPackTotalNodeCount[id], false, block.timestamp, msg.sender); } entityPackTotalNodeCount[id] += _nodeCount; entityPackClaimedTotal[id] += _totalClaimed; entityPackRewardDue[id] += _rewardsDue; if (entityPackTotalNodeCount[id] > _nodeCount) { updatePackState(_entity, _packType, true); } return true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; import "../interfaces/IAdminControl.sol"; abstract contract AdminAccess { IAdminControl public adminControl; modifier onlyRole(uint8 _role) { require(address(adminControl) == address(0) || adminControl.hasRole(_role, msg.sender), "no access"); _; } function addAdminControlContract(IAdminControl _contract) external onlyRole(0) { adminControl = _contract; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; interface INodePackV3 { function doesPackExist(address entity, uint packId) external view returns (bool); function hasPackExpired(address entity, uint packId) external view returns (bool); function claim(uint packId, uint timestamp, address toStrongPool) external payable returns (uint); // function getBonusAt(address _entity, uint _packType, uint _timestamp) external view returns (uint); function getPackId(address _entity, uint _packType) external pure returns (bytes memory); function getEntityPackTotalNodeCount(address _entity, uint _packType) external view returns (uint); function getEntityPackActiveNodeCount(address _entity, uint _packType) external view returns (uint); function migrateNodes(address _entity, uint _nodeType, uint _nodeCount, uint _lastPaidAt, uint _rewardsDue, uint _totalClaimed) external returns (bool); // function addPackRewardDue(address _entity, uint _packType, uint _rewardDue) external; function updatePackState(address _entity, uint _packType) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; interface IStrongPool { function mineFor(address miner, uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; interface IStrongNFTPackBonus { function getBonus(address _entity, uint _packType, uint _from, uint _to) external view returns (uint); function setEntityPackBonusSaved(address _entity, uint _packType) external; function resetEntityPackBonusSaved(bytes memory _packId) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; import "./Context.sol"; abstract contract InternalCalls is Context { uint private constant _NOT_MAKING_INTERNAL_CALLS = 1; uint private constant _MAKING_INTERNAL_CALLS = 2; uint private _internal_calls_status; modifier makesInternalCalls() { _internal_calls_status = _MAKING_INTERNAL_CALLS; _; _internal_calls_status = _NOT_MAKING_INTERNAL_CALLS; } function init() internal { _internal_calls_status = _NOT_MAKING_INTERNAL_CALLS; } function isInternalCall() internal view returns (bool) { return _internal_calls_status == _MAKING_INTERNAL_CALLS; } function isContractCall() internal view returns (bool) { return _msgSender() != tx.origin; } function isUserCall() internal view returns (bool) { return !isInternalCall() && !isContractCall(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; library SbMath { uint internal constant DECIMAL_PRECISION = 1e18; /* * Multiply two decimal numbers and use normal rounding rules: * -round product up if 19'th mantissa digit >= 5 * -round product down if 19'th mantissa digit < 5 * * Used only inside the exponentiation, _decPow(). */ function decMul(uint x, uint y) internal pure returns (uint decProd) { uint prod_xy = x * y; decProd = (prod_xy + (DECIMAL_PRECISION / 2)) / DECIMAL_PRECISION; } /* * _decPow: Exponentiation function for 18-digit decimal base, and integer exponent n. * * Uses the efficient "exponentiation by squaring" algorithm. O(log(n)) complexity. * * The exponent is capped to avoid reverting due to overflow. The cap 525600000 equals * "minutes in 1000 years": 60 * 24 * 365 * 1000 */ function _decPow(uint _base, uint _minutes) internal pure returns (uint) { if (_minutes > 525_600_000) _minutes = 525_600_000; // cap to avoid overflow if (_minutes == 0) return DECIMAL_PRECISION; uint y = DECIMAL_PRECISION; uint x = _base; uint n = _minutes; // Exponentiation-by-squaring while (n > 1) { if (n % 2 == 0) { x = decMul(x, x); n = n / 2; } else { // if (n % 2 != 0) y = decMul(x, y); x = decMul(x, x); n = (n - 1) / 2; } } return decMul(x, y); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; interface IAdminControl { function hasRole(uint8 _role, address _account) external view returns (bool); function SUPER_ADMIN() external view returns (uint8); function ADMIN() external view returns (uint8); function SERVICE_ADMIN() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"entity","type":"address"},{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nodesCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalNodesCount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"usedCredit","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"migratedFrom","type":"address"}],"name":"AddedNodes","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"entity","type":"address"},{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"entity","type":"address"},{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nodesCount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"usedCredit","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"address","name":"migratedFrom","type":"address"}],"name":"Created","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"entity","type":"address"},{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maturedCount","type":"uint256"}],"name":"MaturedNodes","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"entity","type":"address"},{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Paid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable","name":"collector","type":"address"}],"name":"SetFeeCollector","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"strongNFTBonus","type":"address"}],"name":"SetNFTBonusContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable","name":"collector","type":"address"}],"name":"SetNodeFeeCollector","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"bool","name":"active","type":"bool"}],"name":"SetPackTypeActive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"bool","name":"hasSettings","type":"bool"}],"name":"SetPackTypeHasSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"packType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"settingId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SetPackTypeSetting","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"service","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SetServiceContractEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bips","type":"uint256"}],"name":"SetTakeStrongBips","type":"event"},{"inputs":[],"name":"PACK_TYPE_FEE_CLAIMING_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_FEE_CLAIMING_NUMERATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_FEE_CREATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_FEE_RECURRING","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_FEE_STRONG","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_GRACE_PERIOD_SECONDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_NODES_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_NODE_REWARD_LIFETIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_NODE_REWARD_PER_SECOND","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_PAY_CYCLES_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PACK_TYPE_RECURRING_CYCLE_SECONDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IAdminControl","name":"_contract","type":"address"}],"name":"addAdminControlContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminControl","outputs":[{"internalType":"contract IAdminControl","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IStrongPool","name":"_strongPool","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approveStrongPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"canPackBePaid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"address","name":"_toStrongPool","type":"address"}],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"address","name":"_toStrongPool","type":"address"}],"name":"claimAll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimFeeCollector","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_nodeCount","type":"uint256"},{"internalType":"bool","name":"_useCredit","type":"bool"}],"name":"create","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"doesPackExist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"entityCreditUsed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"entityNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackClaimedMatured","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackClaimedTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackCreatedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackLastClaimedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackLastPaidAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackMaturedNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackRewardDue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"entityPackTotalNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getBonusAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getClaimingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getClaimingFeeDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getClaimingFeeNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getCreatingFeeInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getEntityCreditAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackAccruedTotalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackActiveNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackClaimedMaturedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackClaimedTotalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackLifetimeRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackMaturedNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getEntityPackTotalNodeCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getEntityRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getGracePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getNodeCreateFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getNodeRewardLifetime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getNodeRewardPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getNodesLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getPackId","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getPackLastPaidAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getPacksClaimingFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"}],"name":"getPacksRecurringFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getPayCyclesLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getRecurringFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getRecurringFeeInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getRecurringPaymentCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"bool","name":"_addBonus","type":"bool"}],"name":"getRewardAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"getStrongFeeInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"hasMaxPayments","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"hasPackExpired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_strongToken","type":"address"},{"internalType":"contract IStrongNFTPackBonus","name":"_strongNFTBonus","type":"address"},{"internalType":"address payable","name":"_nodeFeeCollector","type":"address"},{"internalType":"address payable","name":"_claimFeeCollector","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"isPackPastDue","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_nodeCount","type":"uint256"},{"internalType":"uint256","name":"_lastPaidAt","type":"uint256"},{"internalType":"uint256","name":"_rewardsDue","type":"uint256"},{"internalType":"uint256","name":"_totalClaimed","type":"uint256"}],"name":"migrateNodes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nodeFeeCollector","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"packTypeActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"packTypeHasSettings","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"packTypeSettings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"pay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"payAll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_claimFeeCollector","type":"address"}],"name":"setClaimFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"setNFTBonusContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_nodeFeeCollector","type":"address"}],"name":"setNodeFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"bool","name":"_active","type":"bool"}],"name":"setPackTypeActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"bool","name":"_hasSettings","type":"bool"}],"name":"setPackTypeHasSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_packType","type":"uint256"},{"internalType":"uint256","name":"_settingId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setPackTypeSetting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setServiceContractEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bips","type":"uint256"}],"name":"setTakeStrongBips","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strongNFTBonus","outputs":[{"internalType":"contract IStrongNFTPackBonus","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strongToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"takeStrongBips","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMaturedNodes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNodes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPackTypes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPacks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_packType","type":"uint256"}],"name":"updatePackState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614d8f806100206000396000f3fe6080604052600436106104e15760003560e01c8063a8b6c6f811610281578063d3dfff001161015a578063f0b56d71116100cc578063f5c554ab11610085578063f5c554ab14610fa8578063f75998bb14610fc8578063f855503214611000578063f91af58014611020578063f999952a14611040578063f9df21e71461106057600080fd5b8063f0b56d7114610eb8578063f3fef3a314610ef0578063f474c8ce14610f10578063f4def5bf14610f30578063f4ec7b1d14610f68578063f5474cb014610f8857600080fd5b8063e2ca3c3a1161011e578063e2ca3c3a14610e1b578063e562cdb014610e3b578063e84dc3ba14610e50578063e97e1b9014610e65578063eaffeddc14610e85578063ed5e3f1614610ea557600080fd5b8063d3dfff0014610d86578063d4cab99214610da6578063dad20ec914610dc6578063dc2e86e914610ddb578063de20d47a14610dfb57600080fd5b8063b48f0428116101f3578063c186c91f116101b7578063c186c91f14610cad578063c290d69114610ce5578063c548201114610cf8578063c94dcd6114610d18578063c99a585514610d38578063d2d7b21414610d7057600080fd5b8063b48f042814610c15578063b6b55f2514610c42578063bb77c82b14610c62578063bbbf0f6614610c77578063bef7348714610c9757600080fd5b8063ad4361a511610245578063ad4361a514610b48578063ad82ba1d14610b68578063af604e8514610ba0578063b391d74714610bc0578063b448422614610bd5578063b48d198f14610bf557600080fd5b8063a8b6c6f814610ac0578063aadea3f314610ae0578063aaf2d9fa14610b00578063ac44ff3114610b20578063ad2cbefa14610b3357600080fd5b80635cc32e76116103be5780638c299dad116103305780639592d424116102e95780639592d424146109e557806395e614d3146109fb578063965d61b914610a335780639e81e13514610a53578063a052058114610a73578063a77e282514610a9357600080fd5b80638c299dad146109105780638cf52bf1146109255780638eda065f1461095557806392488d07146109755780639528d778146109955780639548f1e6146109c557600080fd5b80637281df12116103825780637281df121461086357806378602972146108795780637a0b92551461088e5780637fdfbeb6146108ae57806381bd10d6146108c357806384baff50146108d857600080fd5b80635cc32e76146107db5780635e42b455146107ee57806363e82daf1461080357806367df6abc146108235780636fdd1ff11461084357600080fd5b80633d1987f0116104575780635493d23b1161041b5780635493d23b1461071b57806355079ddd14610753578063555d3e631461077357806357f559df146107935780635806beaf146107b357806359a609b9146107bb57600080fd5b80633d1987f0146106865780634608482d1461069b57806346baac3a146106bb5780634df78d5f146106db5780635016182c146106fb57600080fd5b80631f52283b116104a95780631f52283b146105c3578063315c8425146105e3578063323b599514610603578063342ec83d1461061957806335090cc91461064657806336c52b3b1461066657600080fd5b806306552ff3146104e657806306836485146105085780630eae4af71461053d578063103b75f71461057557806311d7096d146105a3575b600080fd5b3480156104f257600080fd5b5061050661050136600461477c565b611080565b005b34801561051457600080fd5b506105286105233660046147d8565b61125b565b60405190151581526020015b60405180910390f35b34801561054957600080fd5b5060095461055d906001600160a01b031681565b6040516001600160a01b039091168152602001610534565b34801561058157600080fd5b50610595610590366004614804565b611296565b604051908152602001610534565b3480156105af57600080fd5b506105956105be366004614804565b6112a3565b3480156105cf57600080fd5b506105286105de36600461481d565b6112b0565b3480156105ef57600080fd5b506105066105fe366004614869565b61160c565b34801561060f57600080fd5b5061059560075481565b34801561062557600080fd5b50610595610634366004614895565b600c6020526000908152604090205481565b34801561065257600080fd5b506105956106613660046148c0565b6117b4565b34801561067257600080fd5b506105956106813660046148ff565b6119ce565b34801561069257600080fd5b50610595600181565b3480156106a757600080fd5b506105956106b6366004614804565b611a0d565b3480156106c757600080fd5b506105286106d63660046147d8565b611a1a565b3480156106e757600080fd5b506105066106f6366004614895565b611a4e565b34801561070757600080fd5b506105066107163660046147d8565b611bd9565b34801561072757600080fd5b5061059561073636600461494a565b805160208183018101805160138252928201919093012091525481565b34801561075f57600080fd5b5061059561076e3660046147d8565b611c34565b34801561077f57600080fd5b5060005461055d906001600160a01b031681565b34801561079f57600080fd5b506105066107ae366004614895565b611c85565b610506611e1b565b3480156107c757600080fd5b506105956107d63660046147d8565b611f09565b6105066107e93660046149fb565b611f3b565b3480156107fa57600080fd5b50610595612581565b34801561080f57600080fd5b5061059561081e3660046147d8565b612602565b34801561082f57600080fd5b5061059561083e366004614804565b6126c4565b34801561084f57600080fd5b5061050661085e366004614804565b6126d1565b34801561086f57600080fd5b5061059560065481565b34801561088557600080fd5b50610595600981565b34801561089a57600080fd5b506105066108a9366004614895565b61287d565b3480156108ba57600080fd5b50610595600881565b3480156108cf57600080fd5b50610595600381565b3480156108e457600080fd5b506105956108f336600461494a565b805160208183018101805160118252928201919093012091525481565b34801561091c57600080fd5b50610595600581565b34801561093157600080fd5b50610528610940366004614804565b60156020526000908152604090205460ff1681565b34801561096157600080fd5b506105956109703660046147d8565b612952565b34801561098157600080fd5b50610506610990366004614a34565b61297f565b3480156109a157600080fd5b506105286109b0366004614804565b60166020526000908152604090205460ff1681565b3480156109d157600080fd5b5060035461055d906001600160a01b031681565b3480156109f157600080fd5b5061059560045481565b348015610a0757600080fd5b50610595610a1636600461494a565b805160208183018101805160148252928201919093012091525481565b348015610a3f57600080fd5b5060025461055d906001600160a01b031681565b348015610a5f57600080fd5b50610595610a6e3660046147d8565b612b0f565b348015610a7f57600080fd5b50610595610a8e366004614804565b612b50565b348015610a9f57600080fd5b50610595610aae366004614895565b600b6020526000908152604090205481565b348015610acc57600080fd5b50610528610adb3660046147d8565b612b5d565b348015610aec57600080fd5b50610595610afb366004614804565b612bd4565b348015610b0c57600080fd5b50610595610b1b3660046147d8565b612be1565b610595610b2e366004614a64565b612bef565b348015610b3f57600080fd5b50610595600681565b348015610b5457600080fd5b50610595610b633660046147d8565b613241565b348015610b7457600080fd5b50610595610b8336600461494a565b805160208183018101805160128252928201919093012091525481565b348015610bac57600080fd5b50610528610bbb3660046147d8565b613279565b348015610bcc57600080fd5b50610595600481565b348015610be157600080fd5b50610595610bf03660046147d8565b6132be565b348015610c0157600080fd5b50610506610c10366004614a34565b6132dd565b348015610c2157600080fd5b50610c35610c303660046147d8565b61349c565b6040516105349190614ac2565b348015610c4e57600080fd5b50610506610c5d366004614804565b613505565b348015610c6e57600080fd5b50610595600281565b348015610c8357600080fd5b50610595610c92366004614804565b6136ed565b348015610ca357600080fd5b5061059560055481565b348015610cb957600080fd5b50610595610cc8366004614af5565b601760209081526000928352604080842090915290825290205481565b610595610cf3366004614804565b6136fa565b348015610d0457600080fd5b50610595610d13366004614804565b61388d565b348015610d2457600080fd5b50610595610d333660046147d8565b61389a565b348015610d4457600080fd5b50610595610d5336600461494a565b8051602081830181018051600e8252928201919093012091525481565b348015610d7c57600080fd5b5061059560085481565b348015610d9257600080fd5b50610595610da13660046147d8565b6138a8565b348015610db257600080fd5b50610595610dc1366004614895565b6138b6565b348015610dd257600080fd5b50610595600781565b348015610de757600080fd5b50610506610df63660046147d8565b613904565b348015610e0757600080fd5b50610595610e16366004614804565b613b01565b348015610e2757600080fd5b50610506610e36366004614b17565b613b0e565b348015610e4757600080fd5b50610595600a81565b348015610e5c57600080fd5b50610595600081565b348015610e7157600080fd5b50610595610e803660046147d8565b613c9f565b348015610e9157600080fd5b50610595610ea0366004614804565b613cad565b610506610eb3366004614b45565b613cba565b348015610ec457600080fd5b50610595610ed336600461494a565b805160208183018101805160108252928201919093012091525481565b348015610efc57600080fd5b50610506610f0b3660046147d8565b613d74565b348015610f1c57600080fd5b50610595610f2b3660046147d8565b614010565b348015610f3c57600080fd5b50610595610f4b36600461494a565b8051602081830181018051600f8252928201919093012091525481565b348015610f7457600080fd5b50610595610f833660046147d8565b61401f565b348015610f9457600080fd5b50610595610fa3366004614804565b614076565b348015610fb457600080fd5b50600a5461055d906001600160a01b031681565b348015610fd457600080fd5b50610595610fe336600461494a565b8051602081830181018051600d8252928201919093012091525481565b34801561100c57600080fd5b5061059561101b3660046148ff565b614083565b34801561102c57600080fd5b5061050661103b366004614895565b6141b7565b34801561104c57600080fd5b5061059561105b3660046147d8565b61434d565b34801561106c57600080fd5b5061052861107b3660046147d8565b614380565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110cc57600080fd5b505afa1580156110e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111049190614b6a565b6000546001600160a01b031615806111995750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906111499084903390600401614b8d565b60206040518083038186803b15801561116157600080fd5b505afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190614ba9565b6111be5760405162461bcd60e51b81526004016111b590614bc6565b60405180910390fd5b6001600160a01b0382166112015760405162461bcd60e51b815260206004820152600a6024820152696e6f206164647265737360b01b60448201526064016111b5565b600280546001600160a01b038088166001600160a01b03199283161790925560038054878416908316179055600a8054868416908316179055600980549285169290911691909117905561125460018055565b5050505050565b60006112678383611a1a565b801561127a57506112788383612b5d565b155b801561128d575061128b8383614380565b155b90505b92915050565b60006112908260016143f8565b600061129082600a6143f8565b3360009081526018602052604081205460ff166112fc5760405162461bcd60e51b815260206004820152600a6024820152696e6f207365727669636560b01b60448201526064016111b5565b60008681526015602052604090205460ff1661132a5760405162461bcd60e51b81526004016111b590614be9565b6113348787611a1a565b158061134757506113458787612b5d565b155b6113635760405162461bcd60e51b81526004016111b590614c0f565b600061136f888861349c565b905085600460008282546113839190614c4b565b90915550506001600160a01b0388166000908152600b6020526040812080548892906113b0908490614c4b565b9091555050604051600d906113c6908390614c63565b908152602001604051809103902054600014156114a25742600d826040516113ee9190614c63565b9081526040519081900360200190205584611409574261140b565b845b600e8260405161141b9190614c63565b9081526020016040518091039020819055506001600660008282546114409190614c4b565b9091555050604080518881526020810188905260008183015242606082015233608082015290516001600160a01b038a16917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a261152d565b6114ae88886001614483565b876001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c88886010856040516114eb9190614c63565b9081526040805160209281900383018120549481529182019290925290810191909152600060608201524260808201523360a082015260c00160405180910390a25b8560108260405161153e9190614c63565b9081526020016040518091039020600082825461155b9190614c4b565b92505081905550826013826040516115739190614c63565b908152602001604051809103902060008282546115909190614c4b565b92505081905550836012826040516115a89190614c63565b908152602001604051809103902060008282546115c59190614c4b565b92505081905550856010826040516115dd9190614c63565b90815260200160405180910390205411156115fe576115fe88886001614483565b506001979650505050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561165857600080fd5b505afa15801561166c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116909190614b6a565b6000546001600160a01b031615806117255750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906116d59084903390600401614b8d565b60206040518083038186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117259190614ba9565b6117415760405162461bcd60e51b81526004016111b590614bc6565b6000848152601660209081526040808320805460ff191660011790556017825280832086845282529182902084905581518681529081018590529081018390527f4dbbf86191ecd1e5615130609e3eda93820194f1c492d041ead416095959986b9060600160405180910390a150505050565b6000806117c1868661349c565b90506000600f826040516117d59190614c63565b90815260200160405180910390205490506000600d836040516117f89190614c63565b90815260200160405180910390205490506118138888611a1a565b61182357600093505050506119c6565b61182d8888612b5d565b1561183e57600093505050506119c6565b4286111561185257600093505050506119c6565b8186101561186657600093505050506119c6565b80861161187957600093505050506119c6565b60008083116118915761188c8288614c7f565b61189b565b61189b8388614c7f565b905060006118a98a8a61434d565b905060006118b78b8b61401f565b6118c08b611296565b6118ca9085614c96565b6118d49190614c96565b90506000886118e45760006118ef565b6118ef8c8c8c614083565b905060006012886040516119039190614c63565b9081526040519081900360200190205461191d8385614c4b565b6119279190614c4b565b90508360138960405161193a9190614c63565b9081526020016040518091039020541061195f576000985050505050505050506119c6565b838160138a6040516119719190614c63565b90815260200160405180910390205461198a9190614c4b565b106119bc5760138860405161199f9190614c63565b908152602001604051809103902054846119b99190614c7f565b90505b9750505050505050505b949350505050565b60006119d983614076565b6119e284613b01565b6119ef86868660016117b4565b6119f99190614c96565b611a039190614cb5565b90505b9392505050565b60006112908260036143f8565b600080600e611a29858561349c565b604051611a369190614c63565b90815260200160405180910390205411905092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9a57600080fd5b505afa158015611aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad29190614b6a565b6000546001600160a01b03161580611b675750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690611b179084903390600401614b8d565b60206040518083038186803b158015611b2f57600080fd5b505afa158015611b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b679190614ba9565b611b835760405162461bcd60e51b81526004016111b590614bc6565b600380546001600160a01b0319166001600160a01b0384169081179091556040519081527fa30ea3596e6b0bf63d799ca3146166f9b51a9eb996ce58e022ef806c13e17ff0906020015b60405180910390a15050565b6003546001600160a01b03163314611c245760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21039b2b73232b960911b60448201526064016111b5565b611c3082826001614483565b5050565b60008060015b6007548111611c7d57611c5f858260008711611c565742611c58565b865b60016117b4565b611c699083614c4b565b915080611c7581614cd7565b915050611c3a565b509392505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cd157600080fd5b505afa158015611ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d099190614b6a565b6000546001600160a01b03161580611d9e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690611d4e9084903390600401614b8d565b60206040518083038186803b158015611d6657600080fd5b505afa158015611d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9e9190614ba9565b611dba5760405162461bcd60e51b81526004016111b590614bc6565b6001600160a01b038216611dcd57600080fd5b600980546001600160a01b0319166001600160a01b0384169081179091556040519081527fd649da8f6092116f86ea4e5139de0b75ad371d823918d16368ba3ff09a5cbc9f90602001611bcd565b6002600155336000908152600b6020526040902054611e675760405162461bcd60e51b81526020600482015260086024820152676e6f207061636b7360c01b60448201526064016111b5565b3460015b6007548111611ef157611e7e338261125b565b611e8757611edf565b60008211611ec45760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b60448201526064016111b5565b6000611ecf826136fa565b9050611edb8184614c7f565b9250505b80611ee981614cd7565b915050611e6b565b508015611f0257611f02338261466f565b5060018055565b60006014611f17848461349c565b604051611f249190614c63565b908152602001604051809103902054905092915050565b600082611f483386612602565b611f529190614c96565b9050600083611f60866136ed565b611f6a9190614c96565b90506000611f77866112a3565b9050426000611f86338961349c565b60008981526015602052604090205490915060ff16611fb75760405162461bcd60e51b81526004016111b590614be9565b821580611fed57508287601083604051611fd19190614c63565b908152602001604051809103902054611fea9190614c4b565b11155b6120265760405162461bcd60e51b815260206004820152600a6024820152691bdd995c881b1a5b5a5d60b21b60448201526064016111b5565b600187101561206c5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b9bd9194818dbdd5b9d60721b60448201526064016111b5565b8434101561208c5760405162461bcd60e51b81526004016111b590614cf2565b6003546001600160a01b031615612102576003546040516367b4613560e01b8152336004820152602481018a90526001600160a01b03909116906367b4613590604401600060405180830381600087803b1580156120e957600080fd5b505af11580156120fd573d6000803e3d6000fd5b505050505b86600460008282546121149190614c4b565b9091555050336000908152600b602052604081208054899290612138908490614c4b565b909155505060405160109061214e908390614c63565b9081526020016040518091039020546000141561224e5781600d826040516121769190614c63565b90815260200160405180910390208190555081600e826040516121999190614c63565b908152602001604051809103902081905550866010826040516121bc9190614c63565b908152602001604051809103902060008282546121d99190614c4b565b925050819055506001600660008282546121f39190614c4b565b909155505060408051898152602081018990528715158183015242606082015260006080820152905133917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a2612337565b6122583389612b5d565b156122755760405162461bcd60e51b81526004016111b590614c0f565b61228133896001614483565b866010826040516122929190614c63565b908152602001604051809103902060008282546122af9190614c4b565b92505081905550336001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c89896010856040516122f39190614c63565b90815260408051602092819003830181205494815291820192909252908101919091528815156060820152426080820152600060a082015260c00160405180910390a25b85156123ad57836123483342612952565b10156123835760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b60448201526064016111b5565b336000908152600c6020526040812080548692906123a2908490614c4b565b909155506125469050565b6000612710600854866123c09190614c96565b6123ca9190614cb5565b9050801561247c57600254600a546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd90606401602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124609190614ba9565b61247c5760405162461bcd60e51b81526004016111b590614d17565b80851115612544576002546001600160a01b03166323b872dd33306124a1858a614c7f565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125289190614ba9565b6125445760405162461bcd60e51b81526004016111b590614d17565b505b600a5461255c906001600160a01b03168661466f565b8434111561257757612577336125728734614c7f565b61466f565b5050505050505050565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156125c557600080fd5b505afa1580156125d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fd9190614d40565b905090565b60008061260e83611a0d565b90506000600e61261e868661349c565b60405161262b9190614c63565b9081526020016040518091039020549050806000141561264d57509050611290565b6126578585613279565b1561266457509050611290565b61266e8585612b5d565b1561267e57600092505050611290565b600061268985612bd4565b90506000426126988385614c4b565b6126a29190614c7f565b9050816126af8583614c96565b6126b99190614cb5565b979650505050505050565b60006112908260006143f8565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561271d57600080fd5b505afa158015612731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127559190614b6a565b6000546001600160a01b031615806127ea5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061279a9084903390600401614b8d565b60206040518083038186803b1580156127b257600080fd5b505afa1580156127c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ea9190614ba9565b6128065760405162461bcd60e51b81526004016111b590614bc6565b6127108211156128485760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642076616c756560981b60448201526064016111b5565b60088290556040518281527f774b9fb928c71ca72bafa8771a63e9d00ea63b021cfd8cdc2ce4f003094c5d5890602001611bcd565b600080546001600160a01b031615806129135750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906128c39084903390600401614b8d565b60206040518083038186803b1580156128db57600080fd5b505afa1580156128ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129139190614ba9565b61292f5760405162461bcd60e51b81526004016111b590614bc6565b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166000908152600c60205260408120546129758484611c34565b61128d9190614c7f565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129cb57600080fd5b505afa1580156129df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a039190614b6a565b6000546001600160a01b03161580612a985750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690612a489084903390600401614b8d565b60206040518083038186803b158015612a6057600080fd5b505afa158015612a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a989190614ba9565b612ab45760405162461bcd60e51b81526004016111b590614bc6565b600083815260166020908152604091829020805460ff19168515159081179091558251868152918201527f754a64d46ab9a313f3f3cbae897a6b9d8d703593379a9ffe0035ace48dceeb6691015b60405180910390a1505050565b6000612b1e83834260016117b4565b6013612b2a858561349c565b604051612b379190614c63565b90815260200160405180910390205461128d9190614c4b565b60006112908260096143f8565b600080612b6a848461349c565b90506000600e82604051612b7e9190614c63565b90815260200160405180910390205490508060001415612ba357600192505050611290565b612bac8461388d565b612bb585612bd4565b612bbf9083614c4b565b612bc99190614c4b565b421195945050505050565b60006112908260076143f8565b60006013611f17848461349c565b60035460009081906001600160a01b03163314612c0c5733612c0e565b325b90506000612c1c828761349c565b90506000600f82604051612c309190614c63565b90815260200160405180910390205460001415612c6b57600d82604051612c579190614c63565b908152602001604051809103902054612c8b565b600f82604051612c7b9190614c63565b9081526020016040518091039020545b9050612c978388611a1a565b612cd25760405162461bcd60e51b815260206004820152600c60248201526b191bd95cdb9d08195e1a5cdd60a21b60448201526064016111b5565b612cdc8388612b5d565b15612cf95760405162461bcd60e51b81526004016111b590614c0f565b612d038388613279565b15612d3b5760405162461bcd60e51b8152602060048201526008602482015267706173742064756560c01b60448201526064016111b5565b42861115612d7b5760405162461bcd60e51b815260206004820152600d60248201526c06261642074696d657374616d7609c1b60448201526064016111b5565b85612d8882610384614c4b565b10612dc05760405162461bcd60e51b81526020600482015260086024820152673a37b79039b7b7b760c11b60448201526064016111b5565b6000612dcf84898960016117b4565b905060008111612e0d5760405162461bcd60e51b81526020600482015260096024820152681b9bc81c995dd85c9960ba1b60448201526064016111b5565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015612e5057600080fd5b505afa158015612e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e889190614d40565b1015612ec55760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b60448201526064016111b5565b6000612ed089614076565b612ed98a613b01565b612ee39084614c96565b612eed9190614cb5565b905080341015612f0f5760405162461bcd60e51b81526004016111b590614cf2565b87600f85604051612f209190614c63565b90815260200160405180910390208190555081601385604051612f439190614c63565b90815260200160405180910390206000828254612f609190614c4b565b925050819055506000601285604051612f799190614c63565b9081526040805160209281900383018120939093558b83529082018490526001600160a01b038716917f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a910160405180910390a2336000908152600c60205260409020541561305b57336000908152600c602052604090205482101561302e57336000908152600c6020526040902054613014908390614c7f565b336000908152600c6020526040812091909155915061305b565b336000908152600c60205260409020546130489083614c7f565b336000908152600c602052604081205591505b613067338a6000614483565b6003546001600160a01b0316156130db5760035460405163f4888a2160e01b81526001600160a01b039091169063f4888a21906130a8908790600401614ac2565b600060405180830381600087803b1580156130c257600080fd5b505af11580156130d6573d6000803e3d6000fd5b505050505b81156131f9576001600160a01b03871615613157576040516330d6a97560e01b81526001600160a01b038681166004830152602482018490528816906330d6a97590604401600060405180830381600087803b15801561313a57600080fd5b505af115801561314e573d6000803e3d6000fd5b505050506131f9565b60025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b1580156131a557600080fd5b505af11580156131b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131dd9190614ba9565b6131f95760405162461bcd60e51b81526004016111b590614d17565b60095461320f906001600160a01b03168261466f565b613217614747565b801561322257508034115b1561323557613235336125728334614c7f565b98975050505050505050565b60008060015b6007548111611c7d5761325b8582866119ce565b6132659083614c4b565b91508061327181614cd7565b915050613247565b600080613286848461349c565b90506000600e8260405161329a9190614c63565b90815260200160405180910390205490506132b484612bd4565b612bc99082614c4b565b60006132ca838361401f565b6132d383613cad565b61128d9190614c96565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561332957600080fd5b505afa15801561333d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133619190614b6a565b6000546001600160a01b031615806133f65750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906133a69084903390600401614b8d565b60206040518083038186803b1580156133be57600080fd5b505afa1580156133d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f69190614ba9565b6134125760405162461bcd60e51b81526004016111b590614bc6565b600083116134325760405162461bcd60e51b81526004016111b590614be9565b6000838152601560205260409020805460ff19168315151790556007548311801561345a5750815b156134655760078390555b6040805184815283151560208201527f6f5d3c00ffa60404dde260f3251925e7a1b0e75603ddf7a1b15002e90e8ff9e09101612b02565b60606000826134ac5760016134ae565b825b604080516bffffffffffffffffffffffff19606088901b1660208201526001600160e01b031960e084901b166034820152600160c01b60388201529192500160405160208183030381529060405291505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561355157600080fd5b505afa158015613565573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135899190614b6a565b6000546001600160a01b0316158061361e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906135ce9084903390600401614b8d565b60206040518083038186803b1580156135e657600080fd5b505afa1580156135fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361e9190614ba9565b61363a5760405162461bcd60e51b81526004016111b590614bc6565b6000821161364757600080fd5b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561369957600080fd5b505af11580156136ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d19190614ba9565b611c305760405162461bcd60e51b81526004016111b590614d17565b60006112908260026143f8565b6000613706338361125b565b61373d5760405162461bcd60e51b815260206004820152600860248201526763616e742070617960c01b60448201526064016111b5565b61374933836001614483565b6000613755338461349c565b90506000613763338561401f565b61376c85613cad565b6137769190614c96565b9050803410156137985760405162461bcd60e51b81526004016111b590614cf2565b6137a184612bd4565b600e836040516137b19190614c63565b9081526020016040518091039020546137ca9190614c4b565b600e836040516137da9190614c63565b908152602001604051809103902081905550336001600160a01b03167fdf9a51129930649214df58f542322c245372c6f2fa6fc3c9b40d927c597cd23085600e856040516138289190614c63565b90815260405190819003602001812054613849928252602082015260400190565b60405180910390a2600a54613867906001600160a01b03168261466f565b61386f614747565b801561387a57508034115b15611a0657611a06336125728334614c7f565b60006112908260086143f8565b60006011611f17848461349c565b6000600e611f17848461349c565b60008060015b60075481116138fd576138cf848261125b565b156138eb576138de84826132be565b6138e89083614c4b565b91505b806138f581614cd7565b9150506138bc565b5092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561395057600080fd5b505afa158015613964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139889190614b6a565b6000546001600160a01b03161580613a1d5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906139cd9084903390600401614b8d565b60206040518083038186803b1580156139e557600080fd5b505afa1580156139f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a1d9190614ba9565b613a395760405162461bcd60e51b81526004016111b590614bc6565b60025460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b390604401602060405180830381600087803b158015613a8757600080fd5b505af1158015613a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613abf9190614ba9565b613afc5760405162461bcd60e51b815260206004820152600e60248201526d185c1c1c9bdd994819985a5b195960921b60448201526064016111b5565b505050565b60006112908260056143f8565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b5a57600080fd5b505afa158015613b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b929190614b6a565b6000546001600160a01b03161580613c275750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613bd79084903390600401614b8d565b60206040518083038186803b158015613bef57600080fd5b505afa158015613c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c279190614ba9565b613c435760405162461bcd60e51b81526004016111b590614bc6565b6001600160a01b038316600081815260186020908152604091829020805460ff19168615159081179091558251938452908301527fea782fa1fcb250a935b6bf028374e06a580a12523d2befc1c2254a3cd3ef37809101612b02565b60006010611f17848461349c565b60006112908260046143f8565b6002600155336000908152600b6020526040902054613d065760405162461bcd60e51b81526020600482015260086024820152676e6f206e6f64657360c01b60448201526064016111b5565b3460015b6007548111613d5a576000613d2233838760016117b4565b90508015613d47576000613d37838787612bef565b9050613d438185614c7f565b9350505b5080613d5281614cd7565b915050613d0a565b508015613d6b57613d6b338261466f565b50506001805550565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b158015613dc057600080fd5b505afa158015613dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613df89190614b6a565b6000546001600160a01b03161580613e8d5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613e3d9084903390600401614b8d565b60206040518083038186803b158015613e5557600080fd5b505afa158015613e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e8d9190614ba9565b613ea95760405162461bcd60e51b81526004016111b590614bc6565b60008211613eb657600080fd5b6002546040516370a0823160e01b815230600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015613ef957600080fd5b505afa158015613f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f319190614d40565b1015613f6e5760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b60448201526064016111b5565b60025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b158015613fbc57600080fd5b505af1158015613fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff49190614ba9565b613afc5760405162461bcd60e51b81526004016111b590614d17565b600061128d83834260016117b4565b60008061402c848461349c565b905060118160405161403e9190614c63565b90815260200160405180910390205460108260405161405d9190614c63565b9081526020016040518091039020546119c69190614c7f565b60006112908260066143f8565b6003546000906001600160a01b031661409e57506000611a06565b60006140aa858561349c565b90506000600f826040516140be9190614c63565b908152602001604051809103902054600014156140f957600d826040516140e59190614c63565b908152602001604051809103902054614119565b600f826040516141099190614c63565b9081526020016040518091039020545b600354604051634ac21a6960e11b81526001600160a01b03898116600483015260248201899052604482018490526064820188905292935091169063958434d29060840160206040518083038186803b15801561417557600080fd5b505afa158015614189573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ad9190614d40565b9695505050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561420357600080fd5b505afa158015614217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061423b9190614b6a565b6000546001600160a01b031615806142d05750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906142809084903390600401614b8d565b60206040518083038186803b15801561429857600080fd5b505afa1580156142ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d09190614ba9565b6142ec5760405162461bcd60e51b81526004016111b590614bc6565b6001600160a01b0382166142ff57600080fd5b600a80546001600160a01b0319166001600160a01b0384169081179091556040519081527f6fc8e7a1c2484c662808b4ca8010d816b18923abab6769fa48a21eb5ccf6e07c90602001611bcd565b6000601061435b848461349c565b6040516143689190614c63565b9081526020016040518091039020546132d3836126c4565b60008061438d848461349c565b90506000600e826040516143a19190614c63565b908152602001604051809103902054905060006143bd85612bd4565b905060006143ca86612b50565b6143d49083614c96565b6143de9042614c4b565b9050806143eb8385614c4b565b1015979650505050505050565b60008281526016602052604081205460ff16801561442e5750600083815260176020908152604080832085845290915290205415155b6144655760008281527fd840e16649f6b9a295d95876f4633d3a6b10b55e8162971cf78afd886d5ec89b602052604090205461128d565b50600091825260176020908152604080842092845291905290205490565b600061448f848461349c565b905060006144a085854260006117b4565b90506000816013846040516144b59190614c63565b9081526020016040518091039020546144ce9190614c4b565b905060006144db866126c4565b905060006144e98284614cb5565b905060006011866040516144fd9190614c63565b9081526020016040518091039020548211614519576000614543565b6011866040516145299190614c63565b908152602001604051809103902054826145439190614c7f565b90508615614590578460128760405161455c9190614c63565b90815260200160405180910390208190555042600f8760405161457f9190614c63565b908152604051908190036020019020555b801561466457806011876040516145a79190614c63565b908152602001604051809103902060008282546145c49190614c4b565b909155506145d490508382614c96565b6014876040516145e49190614c63565b908152602001604051809103902060008282546146019190614c4b565b92505081905550806005600082825461461a9190614c4b565b909155505060408051898152602081018390526001600160a01b038b16917fd1ad6f13ecf90412417f16481b7455bda8aa6ec0133a68cdab069f9b7bd623f9910160405180910390a25b505050505050505050565b804710156146b65760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b60448201526064016111b5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614703576040519150601f19603f3d011682016040523d82523d6000602084013e614708565b606091505b5050905080613afc5760405162461bcd60e51b815260206004820152600b60248201526a1cd95b990819985a5b195960aa1b60448201526064016111b5565b600061475560015460021490565b1580156125fd57505033321490565b6001600160a01b038116811461477957600080fd5b50565b6000806000806080858703121561479257600080fd5b843561479d81614764565b935060208501356147ad81614764565b925060408501356147bd81614764565b915060608501356147cd81614764565b939692955090935050565b600080604083850312156147eb57600080fd5b82356147f681614764565b946020939093013593505050565b60006020828403121561481657600080fd5b5035919050565b60008060008060008060c0878903121561483657600080fd5b863561484181614764565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b60008060006060848603121561487e57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156148a757600080fd5b8135611a0681614764565b801515811461477957600080fd5b600080600080608085870312156148d657600080fd5b84356148e181614764565b9350602085013592506040850135915060608501356147cd816148b2565b60008060006060848603121561491457600080fd5b833561491f81614764565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561495c57600080fd5b813567ffffffffffffffff8082111561497457600080fd5b818401915084601f83011261498857600080fd5b81358181111561499a5761499a614934565b604051601f8201601f19908116603f011681019083821181831017156149c2576149c2614934565b816040528281528760208487010111156149db57600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080600060608486031215614a1057600080fd5b83359250602084013591506040840135614a29816148b2565b809150509250925092565b60008060408385031215614a4757600080fd5b823591506020830135614a59816148b2565b809150509250929050565b600080600060608486031215614a7957600080fd5b83359250602084013591506040840135614a2981614764565b60005b83811015614aad578181015183820152602001614a95565b83811115614abc576000848401525b50505050565b6020815260008251806020840152614ae1816040850160208701614a92565b601f01601f19169190910160400192915050565b60008060408385031215614b0857600080fd5b50508035926020909101359150565b60008060408385031215614b2a57600080fd5b8235614b3581614764565b91506020830135614a59816148b2565b60008060408385031215614b5857600080fd5b823591506020830135614a5981614764565b600060208284031215614b7c57600080fd5b815160ff81168114611a0657600080fd5b60ff9290921682526001600160a01b0316602082015260400190565b600060208284031215614bbb57600080fd5b8151611a06816148b2565b6020808252600990820152686e6f2061636365737360b81b604082015260600190565b6020808252600c908201526b696e76616c6964207479706560a01b604082015260600190565b6020808252600c908201526b1c1858dac8195e1c1a5c995960a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115614c5e57614c5e614c35565b500190565b60008251614c75818460208701614a92565b9190910192915050565b600082821015614c9157614c91614c35565b500390565b6000816000190483118215151615614cb057614cb0614c35565b500290565b600082614cd257634e487b7160e01b600052601260045260246000fd5b500490565b6000600019821415614ceb57614ceb614c35565b5060010190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b600060208284031215614d5257600080fd5b505191905056fea2646970667358221220c0ca3ee543e9acb39fb808a8324a2ff187fcf0b4421805b5a8c0a6cfdedf5c7764736f6c63430008090033
Deployed Bytecode
0x6080604052600436106104e15760003560e01c8063a8b6c6f811610281578063d3dfff001161015a578063f0b56d71116100cc578063f5c554ab11610085578063f5c554ab14610fa8578063f75998bb14610fc8578063f855503214611000578063f91af58014611020578063f999952a14611040578063f9df21e71461106057600080fd5b8063f0b56d7114610eb8578063f3fef3a314610ef0578063f474c8ce14610f10578063f4def5bf14610f30578063f4ec7b1d14610f68578063f5474cb014610f8857600080fd5b8063e2ca3c3a1161011e578063e2ca3c3a14610e1b578063e562cdb014610e3b578063e84dc3ba14610e50578063e97e1b9014610e65578063eaffeddc14610e85578063ed5e3f1614610ea557600080fd5b8063d3dfff0014610d86578063d4cab99214610da6578063dad20ec914610dc6578063dc2e86e914610ddb578063de20d47a14610dfb57600080fd5b8063b48f0428116101f3578063c186c91f116101b7578063c186c91f14610cad578063c290d69114610ce5578063c548201114610cf8578063c94dcd6114610d18578063c99a585514610d38578063d2d7b21414610d7057600080fd5b8063b48f042814610c15578063b6b55f2514610c42578063bb77c82b14610c62578063bbbf0f6614610c77578063bef7348714610c9757600080fd5b8063ad4361a511610245578063ad4361a514610b48578063ad82ba1d14610b68578063af604e8514610ba0578063b391d74714610bc0578063b448422614610bd5578063b48d198f14610bf557600080fd5b8063a8b6c6f814610ac0578063aadea3f314610ae0578063aaf2d9fa14610b00578063ac44ff3114610b20578063ad2cbefa14610b3357600080fd5b80635cc32e76116103be5780638c299dad116103305780639592d424116102e95780639592d424146109e557806395e614d3146109fb578063965d61b914610a335780639e81e13514610a53578063a052058114610a73578063a77e282514610a9357600080fd5b80638c299dad146109105780638cf52bf1146109255780638eda065f1461095557806392488d07146109755780639528d778146109955780639548f1e6146109c557600080fd5b80637281df12116103825780637281df121461086357806378602972146108795780637a0b92551461088e5780637fdfbeb6146108ae57806381bd10d6146108c357806384baff50146108d857600080fd5b80635cc32e76146107db5780635e42b455146107ee57806363e82daf1461080357806367df6abc146108235780636fdd1ff11461084357600080fd5b80633d1987f0116104575780635493d23b1161041b5780635493d23b1461071b57806355079ddd14610753578063555d3e631461077357806357f559df146107935780635806beaf146107b357806359a609b9146107bb57600080fd5b80633d1987f0146106865780634608482d1461069b57806346baac3a146106bb5780634df78d5f146106db5780635016182c146106fb57600080fd5b80631f52283b116104a95780631f52283b146105c3578063315c8425146105e3578063323b599514610603578063342ec83d1461061957806335090cc91461064657806336c52b3b1461066657600080fd5b806306552ff3146104e657806306836485146105085780630eae4af71461053d578063103b75f71461057557806311d7096d146105a3575b600080fd5b3480156104f257600080fd5b5061050661050136600461477c565b611080565b005b34801561051457600080fd5b506105286105233660046147d8565b61125b565b60405190151581526020015b60405180910390f35b34801561054957600080fd5b5060095461055d906001600160a01b031681565b6040516001600160a01b039091168152602001610534565b34801561058157600080fd5b50610595610590366004614804565b611296565b604051908152602001610534565b3480156105af57600080fd5b506105956105be366004614804565b6112a3565b3480156105cf57600080fd5b506105286105de36600461481d565b6112b0565b3480156105ef57600080fd5b506105066105fe366004614869565b61160c565b34801561060f57600080fd5b5061059560075481565b34801561062557600080fd5b50610595610634366004614895565b600c6020526000908152604090205481565b34801561065257600080fd5b506105956106613660046148c0565b6117b4565b34801561067257600080fd5b506105956106813660046148ff565b6119ce565b34801561069257600080fd5b50610595600181565b3480156106a757600080fd5b506105956106b6366004614804565b611a0d565b3480156106c757600080fd5b506105286106d63660046147d8565b611a1a565b3480156106e757600080fd5b506105066106f6366004614895565b611a4e565b34801561070757600080fd5b506105066107163660046147d8565b611bd9565b34801561072757600080fd5b5061059561073636600461494a565b805160208183018101805160138252928201919093012091525481565b34801561075f57600080fd5b5061059561076e3660046147d8565b611c34565b34801561077f57600080fd5b5060005461055d906001600160a01b031681565b34801561079f57600080fd5b506105066107ae366004614895565b611c85565b610506611e1b565b3480156107c757600080fd5b506105956107d63660046147d8565b611f09565b6105066107e93660046149fb565b611f3b565b3480156107fa57600080fd5b50610595612581565b34801561080f57600080fd5b5061059561081e3660046147d8565b612602565b34801561082f57600080fd5b5061059561083e366004614804565b6126c4565b34801561084f57600080fd5b5061050661085e366004614804565b6126d1565b34801561086f57600080fd5b5061059560065481565b34801561088557600080fd5b50610595600981565b34801561089a57600080fd5b506105066108a9366004614895565b61287d565b3480156108ba57600080fd5b50610595600881565b3480156108cf57600080fd5b50610595600381565b3480156108e457600080fd5b506105956108f336600461494a565b805160208183018101805160118252928201919093012091525481565b34801561091c57600080fd5b50610595600581565b34801561093157600080fd5b50610528610940366004614804565b60156020526000908152604090205460ff1681565b34801561096157600080fd5b506105956109703660046147d8565b612952565b34801561098157600080fd5b50610506610990366004614a34565b61297f565b3480156109a157600080fd5b506105286109b0366004614804565b60166020526000908152604090205460ff1681565b3480156109d157600080fd5b5060035461055d906001600160a01b031681565b3480156109f157600080fd5b5061059560045481565b348015610a0757600080fd5b50610595610a1636600461494a565b805160208183018101805160148252928201919093012091525481565b348015610a3f57600080fd5b5060025461055d906001600160a01b031681565b348015610a5f57600080fd5b50610595610a6e3660046147d8565b612b0f565b348015610a7f57600080fd5b50610595610a8e366004614804565b612b50565b348015610a9f57600080fd5b50610595610aae366004614895565b600b6020526000908152604090205481565b348015610acc57600080fd5b50610528610adb3660046147d8565b612b5d565b348015610aec57600080fd5b50610595610afb366004614804565b612bd4565b348015610b0c57600080fd5b50610595610b1b3660046147d8565b612be1565b610595610b2e366004614a64565b612bef565b348015610b3f57600080fd5b50610595600681565b348015610b5457600080fd5b50610595610b633660046147d8565b613241565b348015610b7457600080fd5b50610595610b8336600461494a565b805160208183018101805160128252928201919093012091525481565b348015610bac57600080fd5b50610528610bbb3660046147d8565b613279565b348015610bcc57600080fd5b50610595600481565b348015610be157600080fd5b50610595610bf03660046147d8565b6132be565b348015610c0157600080fd5b50610506610c10366004614a34565b6132dd565b348015610c2157600080fd5b50610c35610c303660046147d8565b61349c565b6040516105349190614ac2565b348015610c4e57600080fd5b50610506610c5d366004614804565b613505565b348015610c6e57600080fd5b50610595600281565b348015610c8357600080fd5b50610595610c92366004614804565b6136ed565b348015610ca357600080fd5b5061059560055481565b348015610cb957600080fd5b50610595610cc8366004614af5565b601760209081526000928352604080842090915290825290205481565b610595610cf3366004614804565b6136fa565b348015610d0457600080fd5b50610595610d13366004614804565b61388d565b348015610d2457600080fd5b50610595610d333660046147d8565b61389a565b348015610d4457600080fd5b50610595610d5336600461494a565b8051602081830181018051600e8252928201919093012091525481565b348015610d7c57600080fd5b5061059560085481565b348015610d9257600080fd5b50610595610da13660046147d8565b6138a8565b348015610db257600080fd5b50610595610dc1366004614895565b6138b6565b348015610dd257600080fd5b50610595600781565b348015610de757600080fd5b50610506610df63660046147d8565b613904565b348015610e0757600080fd5b50610595610e16366004614804565b613b01565b348015610e2757600080fd5b50610506610e36366004614b17565b613b0e565b348015610e4757600080fd5b50610595600a81565b348015610e5c57600080fd5b50610595600081565b348015610e7157600080fd5b50610595610e803660046147d8565b613c9f565b348015610e9157600080fd5b50610595610ea0366004614804565b613cad565b610506610eb3366004614b45565b613cba565b348015610ec457600080fd5b50610595610ed336600461494a565b805160208183018101805160108252928201919093012091525481565b348015610efc57600080fd5b50610506610f0b3660046147d8565b613d74565b348015610f1c57600080fd5b50610595610f2b3660046147d8565b614010565b348015610f3c57600080fd5b50610595610f4b36600461494a565b8051602081830181018051600f8252928201919093012091525481565b348015610f7457600080fd5b50610595610f833660046147d8565b61401f565b348015610f9457600080fd5b50610595610fa3366004614804565b614076565b348015610fb457600080fd5b50600a5461055d906001600160a01b031681565b348015610fd457600080fd5b50610595610fe336600461494a565b8051602081830181018051600d8252928201919093012091525481565b34801561100c57600080fd5b5061059561101b3660046148ff565b614083565b34801561102c57600080fd5b5061050661103b366004614895565b6141b7565b34801561104c57600080fd5b5061059561105b3660046147d8565b61434d565b34801561106c57600080fd5b5061052861107b3660046147d8565b614380565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110cc57600080fd5b505afa1580156110e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111049190614b6a565b6000546001600160a01b031615806111995750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906111499084903390600401614b8d565b60206040518083038186803b15801561116157600080fd5b505afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111999190614ba9565b6111be5760405162461bcd60e51b81526004016111b590614bc6565b60405180910390fd5b6001600160a01b0382166112015760405162461bcd60e51b815260206004820152600a6024820152696e6f206164647265737360b01b60448201526064016111b5565b600280546001600160a01b038088166001600160a01b03199283161790925560038054878416908316179055600a8054868416908316179055600980549285169290911691909117905561125460018055565b5050505050565b60006112678383611a1a565b801561127a57506112788383612b5d565b155b801561128d575061128b8383614380565b155b90505b92915050565b60006112908260016143f8565b600061129082600a6143f8565b3360009081526018602052604081205460ff166112fc5760405162461bcd60e51b815260206004820152600a6024820152696e6f207365727669636560b01b60448201526064016111b5565b60008681526015602052604090205460ff1661132a5760405162461bcd60e51b81526004016111b590614be9565b6113348787611a1a565b158061134757506113458787612b5d565b155b6113635760405162461bcd60e51b81526004016111b590614c0f565b600061136f888861349c565b905085600460008282546113839190614c4b565b90915550506001600160a01b0388166000908152600b6020526040812080548892906113b0908490614c4b565b9091555050604051600d906113c6908390614c63565b908152602001604051809103902054600014156114a25742600d826040516113ee9190614c63565b9081526040519081900360200190205584611409574261140b565b845b600e8260405161141b9190614c63565b9081526020016040518091039020819055506001600660008282546114409190614c4b565b9091555050604080518881526020810188905260008183015242606082015233608082015290516001600160a01b038a16917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a261152d565b6114ae88886001614483565b876001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c88886010856040516114eb9190614c63565b9081526040805160209281900383018120549481529182019290925290810191909152600060608201524260808201523360a082015260c00160405180910390a25b8560108260405161153e9190614c63565b9081526020016040518091039020600082825461155b9190614c4b565b92505081905550826013826040516115739190614c63565b908152602001604051809103902060008282546115909190614c4b565b92505081905550836012826040516115a89190614c63565b908152602001604051809103902060008282546115c59190614c4b565b92505081905550856010826040516115dd9190614c63565b90815260200160405180910390205411156115fe576115fe88886001614483565b506001979650505050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561165857600080fd5b505afa15801561166c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116909190614b6a565b6000546001600160a01b031615806117255750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906116d59084903390600401614b8d565b60206040518083038186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117259190614ba9565b6117415760405162461bcd60e51b81526004016111b590614bc6565b6000848152601660209081526040808320805460ff191660011790556017825280832086845282529182902084905581518681529081018590529081018390527f4dbbf86191ecd1e5615130609e3eda93820194f1c492d041ead416095959986b9060600160405180910390a150505050565b6000806117c1868661349c565b90506000600f826040516117d59190614c63565b90815260200160405180910390205490506000600d836040516117f89190614c63565b90815260200160405180910390205490506118138888611a1a565b61182357600093505050506119c6565b61182d8888612b5d565b1561183e57600093505050506119c6565b4286111561185257600093505050506119c6565b8186101561186657600093505050506119c6565b80861161187957600093505050506119c6565b60008083116118915761188c8288614c7f565b61189b565b61189b8388614c7f565b905060006118a98a8a61434d565b905060006118b78b8b61401f565b6118c08b611296565b6118ca9085614c96565b6118d49190614c96565b90506000886118e45760006118ef565b6118ef8c8c8c614083565b905060006012886040516119039190614c63565b9081526040519081900360200190205461191d8385614c4b565b6119279190614c4b565b90508360138960405161193a9190614c63565b9081526020016040518091039020541061195f576000985050505050505050506119c6565b838160138a6040516119719190614c63565b90815260200160405180910390205461198a9190614c4b565b106119bc5760138860405161199f9190614c63565b908152602001604051809103902054846119b99190614c7f565b90505b9750505050505050505b949350505050565b60006119d983614076565b6119e284613b01565b6119ef86868660016117b4565b6119f99190614c96565b611a039190614cb5565b90505b9392505050565b60006112908260036143f8565b600080600e611a29858561349c565b604051611a369190614c63565b90815260200160405180910390205411905092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9a57600080fd5b505afa158015611aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad29190614b6a565b6000546001600160a01b03161580611b675750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690611b179084903390600401614b8d565b60206040518083038186803b158015611b2f57600080fd5b505afa158015611b43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b679190614ba9565b611b835760405162461bcd60e51b81526004016111b590614bc6565b600380546001600160a01b0319166001600160a01b0384169081179091556040519081527fa30ea3596e6b0bf63d799ca3146166f9b51a9eb996ce58e022ef806c13e17ff0906020015b60405180910390a15050565b6003546001600160a01b03163314611c245760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21039b2b73232b960911b60448201526064016111b5565b611c3082826001614483565b5050565b60008060015b6007548111611c7d57611c5f858260008711611c565742611c58565b865b60016117b4565b611c699083614c4b565b915080611c7581614cd7565b915050611c3a565b509392505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611cd157600080fd5b505afa158015611ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d099190614b6a565b6000546001600160a01b03161580611d9e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690611d4e9084903390600401614b8d565b60206040518083038186803b158015611d6657600080fd5b505afa158015611d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9e9190614ba9565b611dba5760405162461bcd60e51b81526004016111b590614bc6565b6001600160a01b038216611dcd57600080fd5b600980546001600160a01b0319166001600160a01b0384169081179091556040519081527fd649da8f6092116f86ea4e5139de0b75ad371d823918d16368ba3ff09a5cbc9f90602001611bcd565b6002600155336000908152600b6020526040902054611e675760405162461bcd60e51b81526020600482015260086024820152676e6f207061636b7360c01b60448201526064016111b5565b3460015b6007548111611ef157611e7e338261125b565b611e8757611edf565b60008211611ec45760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b60448201526064016111b5565b6000611ecf826136fa565b9050611edb8184614c7f565b9250505b80611ee981614cd7565b915050611e6b565b508015611f0257611f02338261466f565b5060018055565b60006014611f17848461349c565b604051611f249190614c63565b908152602001604051809103902054905092915050565b600082611f483386612602565b611f529190614c96565b9050600083611f60866136ed565b611f6a9190614c96565b90506000611f77866112a3565b9050426000611f86338961349c565b60008981526015602052604090205490915060ff16611fb75760405162461bcd60e51b81526004016111b590614be9565b821580611fed57508287601083604051611fd19190614c63565b908152602001604051809103902054611fea9190614c4b565b11155b6120265760405162461bcd60e51b815260206004820152600a6024820152691bdd995c881b1a5b5a5d60b21b60448201526064016111b5565b600187101561206c5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b9bd9194818dbdd5b9d60721b60448201526064016111b5565b8434101561208c5760405162461bcd60e51b81526004016111b590614cf2565b6003546001600160a01b031615612102576003546040516367b4613560e01b8152336004820152602481018a90526001600160a01b03909116906367b4613590604401600060405180830381600087803b1580156120e957600080fd5b505af11580156120fd573d6000803e3d6000fd5b505050505b86600460008282546121149190614c4b565b9091555050336000908152600b602052604081208054899290612138908490614c4b565b909155505060405160109061214e908390614c63565b9081526020016040518091039020546000141561224e5781600d826040516121769190614c63565b90815260200160405180910390208190555081600e826040516121999190614c63565b908152602001604051809103902081905550866010826040516121bc9190614c63565b908152602001604051809103902060008282546121d99190614c4b565b925050819055506001600660008282546121f39190614c4b565b909155505060408051898152602081018990528715158183015242606082015260006080820152905133917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a2612337565b6122583389612b5d565b156122755760405162461bcd60e51b81526004016111b590614c0f565b61228133896001614483565b866010826040516122929190614c63565b908152602001604051809103902060008282546122af9190614c4b565b92505081905550336001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c89896010856040516122f39190614c63565b90815260408051602092819003830181205494815291820192909252908101919091528815156060820152426080820152600060a082015260c00160405180910390a25b85156123ad57836123483342612952565b10156123835760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b60448201526064016111b5565b336000908152600c6020526040812080548692906123a2908490614c4b565b909155506125469050565b6000612710600854866123c09190614c96565b6123ca9190614cb5565b9050801561247c57600254600a546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd90606401602060405180830381600087803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124609190614ba9565b61247c5760405162461bcd60e51b81526004016111b590614d17565b80851115612544576002546001600160a01b03166323b872dd33306124a1858a614c7f565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b1580156124f057600080fd5b505af1158015612504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125289190614ba9565b6125445760405162461bcd60e51b81526004016111b590614d17565b505b600a5461255c906001600160a01b03168661466f565b8434111561257757612577336125728734614c7f565b61466f565b5050505050505050565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156125c557600080fd5b505afa1580156125d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fd9190614d40565b905090565b60008061260e83611a0d565b90506000600e61261e868661349c565b60405161262b9190614c63565b9081526020016040518091039020549050806000141561264d57509050611290565b6126578585613279565b1561266457509050611290565b61266e8585612b5d565b1561267e57600092505050611290565b600061268985612bd4565b90506000426126988385614c4b565b6126a29190614c7f565b9050816126af8583614c96565b6126b99190614cb5565b979650505050505050565b60006112908260006143f8565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561271d57600080fd5b505afa158015612731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127559190614b6a565b6000546001600160a01b031615806127ea5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061279a9084903390600401614b8d565b60206040518083038186803b1580156127b257600080fd5b505afa1580156127c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ea9190614ba9565b6128065760405162461bcd60e51b81526004016111b590614bc6565b6127108211156128485760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642076616c756560981b60448201526064016111b5565b60088290556040518281527f774b9fb928c71ca72bafa8771a63e9d00ea63b021cfd8cdc2ce4f003094c5d5890602001611bcd565b600080546001600160a01b031615806129135750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906128c39084903390600401614b8d565b60206040518083038186803b1580156128db57600080fd5b505afa1580156128ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129139190614ba9565b61292f5760405162461bcd60e51b81526004016111b590614bc6565b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166000908152600c60205260408120546129758484611c34565b61128d9190614c7f565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129cb57600080fd5b505afa1580156129df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a039190614b6a565b6000546001600160a01b03161580612a985750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690612a489084903390600401614b8d565b60206040518083038186803b158015612a6057600080fd5b505afa158015612a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a989190614ba9565b612ab45760405162461bcd60e51b81526004016111b590614bc6565b600083815260166020908152604091829020805460ff19168515159081179091558251868152918201527f754a64d46ab9a313f3f3cbae897a6b9d8d703593379a9ffe0035ace48dceeb6691015b60405180910390a1505050565b6000612b1e83834260016117b4565b6013612b2a858561349c565b604051612b379190614c63565b90815260200160405180910390205461128d9190614c4b565b60006112908260096143f8565b600080612b6a848461349c565b90506000600e82604051612b7e9190614c63565b90815260200160405180910390205490508060001415612ba357600192505050611290565b612bac8461388d565b612bb585612bd4565b612bbf9083614c4b565b612bc99190614c4b565b421195945050505050565b60006112908260076143f8565b60006013611f17848461349c565b60035460009081906001600160a01b03163314612c0c5733612c0e565b325b90506000612c1c828761349c565b90506000600f82604051612c309190614c63565b90815260200160405180910390205460001415612c6b57600d82604051612c579190614c63565b908152602001604051809103902054612c8b565b600f82604051612c7b9190614c63565b9081526020016040518091039020545b9050612c978388611a1a565b612cd25760405162461bcd60e51b815260206004820152600c60248201526b191bd95cdb9d08195e1a5cdd60a21b60448201526064016111b5565b612cdc8388612b5d565b15612cf95760405162461bcd60e51b81526004016111b590614c0f565b612d038388613279565b15612d3b5760405162461bcd60e51b8152602060048201526008602482015267706173742064756560c01b60448201526064016111b5565b42861115612d7b5760405162461bcd60e51b815260206004820152600d60248201526c06261642074696d657374616d7609c1b60448201526064016111b5565b85612d8882610384614c4b565b10612dc05760405162461bcd60e51b81526020600482015260086024820152673a37b79039b7b7b760c11b60448201526064016111b5565b6000612dcf84898960016117b4565b905060008111612e0d5760405162461bcd60e51b81526020600482015260096024820152681b9bc81c995dd85c9960ba1b60448201526064016111b5565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015612e5057600080fd5b505afa158015612e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e889190614d40565b1015612ec55760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b60448201526064016111b5565b6000612ed089614076565b612ed98a613b01565b612ee39084614c96565b612eed9190614cb5565b905080341015612f0f5760405162461bcd60e51b81526004016111b590614cf2565b87600f85604051612f209190614c63565b90815260200160405180910390208190555081601385604051612f439190614c63565b90815260200160405180910390206000828254612f609190614c4b565b925050819055506000601285604051612f799190614c63565b9081526040805160209281900383018120939093558b83529082018490526001600160a01b038716917f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a910160405180910390a2336000908152600c60205260409020541561305b57336000908152600c602052604090205482101561302e57336000908152600c6020526040902054613014908390614c7f565b336000908152600c6020526040812091909155915061305b565b336000908152600c60205260409020546130489083614c7f565b336000908152600c602052604081205591505b613067338a6000614483565b6003546001600160a01b0316156130db5760035460405163f4888a2160e01b81526001600160a01b039091169063f4888a21906130a8908790600401614ac2565b600060405180830381600087803b1580156130c257600080fd5b505af11580156130d6573d6000803e3d6000fd5b505050505b81156131f9576001600160a01b03871615613157576040516330d6a97560e01b81526001600160a01b038681166004830152602482018490528816906330d6a97590604401600060405180830381600087803b15801561313a57600080fd5b505af115801561314e573d6000803e3d6000fd5b505050506131f9565b60025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b1580156131a557600080fd5b505af11580156131b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131dd9190614ba9565b6131f95760405162461bcd60e51b81526004016111b590614d17565b60095461320f906001600160a01b03168261466f565b613217614747565b801561322257508034115b1561323557613235336125728334614c7f565b98975050505050505050565b60008060015b6007548111611c7d5761325b8582866119ce565b6132659083614c4b565b91508061327181614cd7565b915050613247565b600080613286848461349c565b90506000600e8260405161329a9190614c63565b90815260200160405180910390205490506132b484612bd4565b612bc99082614c4b565b60006132ca838361401f565b6132d383613cad565b61128d9190614c96565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561332957600080fd5b505afa15801561333d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133619190614b6a565b6000546001600160a01b031615806133f65750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906133a69084903390600401614b8d565b60206040518083038186803b1580156133be57600080fd5b505afa1580156133d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133f69190614ba9565b6134125760405162461bcd60e51b81526004016111b590614bc6565b600083116134325760405162461bcd60e51b81526004016111b590614be9565b6000838152601560205260409020805460ff19168315151790556007548311801561345a5750815b156134655760078390555b6040805184815283151560208201527f6f5d3c00ffa60404dde260f3251925e7a1b0e75603ddf7a1b15002e90e8ff9e09101612b02565b60606000826134ac5760016134ae565b825b604080516bffffffffffffffffffffffff19606088901b1660208201526001600160e01b031960e084901b166034820152600160c01b60388201529192500160405160208183030381529060405291505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561355157600080fd5b505afa158015613565573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135899190614b6a565b6000546001600160a01b0316158061361e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906135ce9084903390600401614b8d565b60206040518083038186803b1580156135e657600080fd5b505afa1580156135fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061361e9190614ba9565b61363a5760405162461bcd60e51b81526004016111b590614bc6565b6000821161364757600080fd5b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561369957600080fd5b505af11580156136ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136d19190614ba9565b611c305760405162461bcd60e51b81526004016111b590614d17565b60006112908260026143f8565b6000613706338361125b565b61373d5760405162461bcd60e51b815260206004820152600860248201526763616e742070617960c01b60448201526064016111b5565b61374933836001614483565b6000613755338461349c565b90506000613763338561401f565b61376c85613cad565b6137769190614c96565b9050803410156137985760405162461bcd60e51b81526004016111b590614cf2565b6137a184612bd4565b600e836040516137b19190614c63565b9081526020016040518091039020546137ca9190614c4b565b600e836040516137da9190614c63565b908152602001604051809103902081905550336001600160a01b03167fdf9a51129930649214df58f542322c245372c6f2fa6fc3c9b40d927c597cd23085600e856040516138289190614c63565b90815260405190819003602001812054613849928252602082015260400190565b60405180910390a2600a54613867906001600160a01b03168261466f565b61386f614747565b801561387a57508034115b15611a0657611a06336125728334614c7f565b60006112908260086143f8565b60006011611f17848461349c565b6000600e611f17848461349c565b60008060015b60075481116138fd576138cf848261125b565b156138eb576138de84826132be565b6138e89083614c4b565b91505b806138f581614cd7565b9150506138bc565b5092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561395057600080fd5b505afa158015613964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139889190614b6a565b6000546001600160a01b03161580613a1d5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906139cd9084903390600401614b8d565b60206040518083038186803b1580156139e557600080fd5b505afa1580156139f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a1d9190614ba9565b613a395760405162461bcd60e51b81526004016111b590614bc6565b60025460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b390604401602060405180830381600087803b158015613a8757600080fd5b505af1158015613a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613abf9190614ba9565b613afc5760405162461bcd60e51b815260206004820152600e60248201526d185c1c1c9bdd994819985a5b195960921b60448201526064016111b5565b505050565b60006112908260056143f8565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b5a57600080fd5b505afa158015613b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b929190614b6a565b6000546001600160a01b03161580613c275750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613bd79084903390600401614b8d565b60206040518083038186803b158015613bef57600080fd5b505afa158015613c03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c279190614ba9565b613c435760405162461bcd60e51b81526004016111b590614bc6565b6001600160a01b038316600081815260186020908152604091829020805460ff19168615159081179091558251938452908301527fea782fa1fcb250a935b6bf028374e06a580a12523d2befc1c2254a3cd3ef37809101612b02565b60006010611f17848461349c565b60006112908260046143f8565b6002600155336000908152600b6020526040902054613d065760405162461bcd60e51b81526020600482015260086024820152676e6f206e6f64657360c01b60448201526064016111b5565b3460015b6007548111613d5a576000613d2233838760016117b4565b90508015613d47576000613d37838787612bef565b9050613d438185614c7f565b9350505b5080613d5281614cd7565b915050613d0a565b508015613d6b57613d6b338261466f565b50506001805550565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b158015613dc057600080fd5b505afa158015613dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613df89190614b6a565b6000546001600160a01b03161580613e8d5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613e3d9084903390600401614b8d565b60206040518083038186803b158015613e5557600080fd5b505afa158015613e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e8d9190614ba9565b613ea95760405162461bcd60e51b81526004016111b590614bc6565b60008211613eb657600080fd5b6002546040516370a0823160e01b815230600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015613ef957600080fd5b505afa158015613f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f319190614d40565b1015613f6e5760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b60448201526064016111b5565b60025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b158015613fbc57600080fd5b505af1158015613fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ff49190614ba9565b613afc5760405162461bcd60e51b81526004016111b590614d17565b600061128d83834260016117b4565b60008061402c848461349c565b905060118160405161403e9190614c63565b90815260200160405180910390205460108260405161405d9190614c63565b9081526020016040518091039020546119c69190614c7f565b60006112908260066143f8565b6003546000906001600160a01b031661409e57506000611a06565b60006140aa858561349c565b90506000600f826040516140be9190614c63565b908152602001604051809103902054600014156140f957600d826040516140e59190614c63565b908152602001604051809103902054614119565b600f826040516141099190614c63565b9081526020016040518091039020545b600354604051634ac21a6960e11b81526001600160a01b03898116600483015260248201899052604482018490526064820188905292935091169063958434d29060840160206040518083038186803b15801561417557600080fd5b505afa158015614189573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141ad9190614d40565b9695505050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561420357600080fd5b505afa158015614217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061423b9190614b6a565b6000546001600160a01b031615806142d05750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906142809084903390600401614b8d565b60206040518083038186803b15801561429857600080fd5b505afa1580156142ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d09190614ba9565b6142ec5760405162461bcd60e51b81526004016111b590614bc6565b6001600160a01b0382166142ff57600080fd5b600a80546001600160a01b0319166001600160a01b0384169081179091556040519081527f6fc8e7a1c2484c662808b4ca8010d816b18923abab6769fa48a21eb5ccf6e07c90602001611bcd565b6000601061435b848461349c565b6040516143689190614c63565b9081526020016040518091039020546132d3836126c4565b60008061438d848461349c565b90506000600e826040516143a19190614c63565b908152602001604051809103902054905060006143bd85612bd4565b905060006143ca86612b50565b6143d49083614c96565b6143de9042614c4b565b9050806143eb8385614c4b565b1015979650505050505050565b60008281526016602052604081205460ff16801561442e5750600083815260176020908152604080832085845290915290205415155b6144655760008281527fd840e16649f6b9a295d95876f4633d3a6b10b55e8162971cf78afd886d5ec89b602052604090205461128d565b50600091825260176020908152604080842092845291905290205490565b600061448f848461349c565b905060006144a085854260006117b4565b90506000816013846040516144b59190614c63565b9081526020016040518091039020546144ce9190614c4b565b905060006144db866126c4565b905060006144e98284614cb5565b905060006011866040516144fd9190614c63565b9081526020016040518091039020548211614519576000614543565b6011866040516145299190614c63565b908152602001604051809103902054826145439190614c7f565b90508615614590578460128760405161455c9190614c63565b90815260200160405180910390208190555042600f8760405161457f9190614c63565b908152604051908190036020019020555b801561466457806011876040516145a79190614c63565b908152602001604051809103902060008282546145c49190614c4b565b909155506145d490508382614c96565b6014876040516145e49190614c63565b908152602001604051809103902060008282546146019190614c4b565b92505081905550806005600082825461461a9190614c4b565b909155505060408051898152602081018390526001600160a01b038b16917fd1ad6f13ecf90412417f16481b7455bda8aa6ec0133a68cdab069f9b7bd623f9910160405180910390a25b505050505050505050565b804710156146b65760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b60448201526064016111b5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114614703576040519150601f19603f3d011682016040523d82523d6000602084013e614708565b606091505b5050905080613afc5760405162461bcd60e51b815260206004820152600b60248201526a1cd95b990819985a5b195960aa1b60448201526064016111b5565b600061475560015460021490565b1580156125fd57505033321490565b6001600160a01b038116811461477957600080fd5b50565b6000806000806080858703121561479257600080fd5b843561479d81614764565b935060208501356147ad81614764565b925060408501356147bd81614764565b915060608501356147cd81614764565b939692955090935050565b600080604083850312156147eb57600080fd5b82356147f681614764565b946020939093013593505050565b60006020828403121561481657600080fd5b5035919050565b60008060008060008060c0878903121561483657600080fd5b863561484181614764565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b60008060006060848603121561487e57600080fd5b505081359360208301359350604090920135919050565b6000602082840312156148a757600080fd5b8135611a0681614764565b801515811461477957600080fd5b600080600080608085870312156148d657600080fd5b84356148e181614764565b9350602085013592506040850135915060608501356147cd816148b2565b60008060006060848603121561491457600080fd5b833561491f81614764565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561495c57600080fd5b813567ffffffffffffffff8082111561497457600080fd5b818401915084601f83011261498857600080fd5b81358181111561499a5761499a614934565b604051601f8201601f19908116603f011681019083821181831017156149c2576149c2614934565b816040528281528760208487010111156149db57600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080600060608486031215614a1057600080fd5b83359250602084013591506040840135614a29816148b2565b809150509250925092565b60008060408385031215614a4757600080fd5b823591506020830135614a59816148b2565b809150509250929050565b600080600060608486031215614a7957600080fd5b83359250602084013591506040840135614a2981614764565b60005b83811015614aad578181015183820152602001614a95565b83811115614abc576000848401525b50505050565b6020815260008251806020840152614ae1816040850160208701614a92565b601f01601f19169190910160400192915050565b60008060408385031215614b0857600080fd5b50508035926020909101359150565b60008060408385031215614b2a57600080fd5b8235614b3581614764565b91506020830135614a59816148b2565b60008060408385031215614b5857600080fd5b823591506020830135614a5981614764565b600060208284031215614b7c57600080fd5b815160ff81168114611a0657600080fd5b60ff9290921682526001600160a01b0316602082015260400190565b600060208284031215614bbb57600080fd5b8151611a06816148b2565b6020808252600990820152686e6f2061636365737360b81b604082015260600190565b6020808252600c908201526b696e76616c6964207479706560a01b604082015260600190565b6020808252600c908201526b1c1858dac8195e1c1a5c995960a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115614c5e57614c5e614c35565b500190565b60008251614c75818460208701614a92565b9190910192915050565b600082821015614c9157614c91614c35565b500390565b6000816000190483118215151615614cb057614cb0614c35565b500290565b600082614cd257634e487b7160e01b600052601260045260246000fd5b500490565b6000600019821415614ceb57614ceb614c35565b5060010190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b600060208284031215614d5257600080fd5b505191905056fea2646970667358221220c0ca3ee543e9acb39fb808a8324a2ff187fcf0b4421805b5a8c0a6cfdedf5c7764736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.