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 | 14655392 | 944 days ago | IN | 0 ETH | 0.53318412 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NodePackV2
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/INodePackV2.sol"; import "./interfaces/IStrongPool.sol"; import "./interfaces/IStrongNFTPackBonus.sol"; import "./lib/InternalCalls.sol"; import "./lib/SbMath.sol"; contract NodePackV2 is AdminAccess, INodePackV2, 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] < 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, bool _saveRewardsDue) internal { bytes memory id = getPackId(_entity, _packType); uint claimedTotal = entityPackClaimedTotal[id]; uint rewardDue = getRewardAt(_entity, _packType, block.timestamp, false); uint accruedTotal = claimedTotal + 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 migrateNode(address _entity, uint _packType, uint _nodeCount, uint _lastPaidAt) external returns (bool) { require(serviceContractEnabled[msg.sender], "no service"); require(packTypeActive[_packType], "invalid type"); bytes memory id = getPackId(_entity, _packType); totalNodes += _nodeCount; entityNodeCount[_entity] += _nodeCount; entityPackTotalNodeCount[id] += _nodeCount; if (entityPackTotalNodeCount[id] == _nodeCount) { entityPackCreatedAt[id] = block.timestamp; entityPackLastPaidAt[id] = _lastPaidAt > 0 ? _lastPaidAt : block.timestamp; totalPacks += _nodeCount; emit Created(_entity, _packType, _nodeCount, false, block.timestamp, msg.sender); } else { updatePackState(msg.sender, _packType, true); emit AddedNodes(_entity, _packType, _nodeCount, entityPackTotalNodeCount[id], false, block.timestamp, msg.sender); } 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 INodePackV2 { 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 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 migrateNode(address _entity, uint _nodeType, uint _nodeCount, uint _lastPaidAt) external returns (bool); }
// 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"}],"name":"migrateNode","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":"_destination","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614c34806100206000396000f3fe6080604052600436106104d65760003560e01c8063a8b6c6f811610281578063d3dfff001161015a578063f0b56d71116100cc578063f5c554ab11610085578063f5c554ab14610f7d578063f75998bb14610f9d578063f855503214610fd5578063f91af58014610ff5578063f999952a14611015578063f9df21e71461103557600080fd5b8063f0b56d7114610e8d578063f3fef3a314610ec5578063f474c8ce14610ee5578063f4def5bf14610f05578063f4ec7b1d14610f3d578063f5474cb014610f5d57600080fd5b8063e2ca3c3a1161011e578063e2ca3c3a14610df0578063e562cdb014610e10578063e84dc3ba14610e25578063e97e1b9014610e3a578063eaffeddc14610e5a578063ed5e3f1614610e7a57600080fd5b8063d3dfff0014610d5b578063d4cab99214610d7b578063dad20ec914610d9b578063dc2e86e914610db0578063de20d47a14610dd057600080fd5b8063b48f0428116101f3578063c186c91f116101b7578063c186c91f14610c82578063c290d69114610cba578063c548201114610ccd578063c94dcd6114610ced578063c99a585514610d0d578063d2d7b21414610d4557600080fd5b8063b48f042814610bea578063b6b55f2514610c17578063bb77c82b14610c37578063bbbf0f6614610c4c578063bef7348714610c6c57600080fd5b8063ad4361a511610245578063ad4361a514610b1d578063ad82ba1d14610b3d578063af604e8514610b75578063b391d74714610b95578063b448422614610baa578063b48d198f14610bca57600080fd5b8063a8b6c6f814610a95578063aadea3f314610ab5578063aaf2d9fa14610ad5578063ac44ff3114610af5578063ad2cbefa14610b0857600080fd5b8063610efc9d116103b35780638cf52bf1116103255780639592d424116102e95780639592d424146109ba57806395e614d3146109d0578063965d61b914610a085780639e81e13514610a28578063a052058114610a48578063a77e282514610a6857600080fd5b80638cf52bf1146108fa5780638eda065f1461092a57806392488d071461094a5780639528d7781461096a5780639548f1e61461099a57600080fd5b80637860297211610377578063786029721461084e5780637a0b9255146108635780637fdfbeb61461088357806381bd10d61461089857806384baff50146108ad5780638c299dad146108e557600080fd5b8063610efc9d146107b857806363e82daf146107d857806367df6abc146107f85780636fdd1ff1146108185780637281df121461083857600080fd5b80634608482d1161044c578063555d3e6311610410578063555d3e631461072857806357f559df146107485780635806beaf1461076857806359a609b9146107705780635cc32e76146107905780635e42b455146107a357600080fd5b80634608482d1461067057806346baac3a146106905780634df78d5f146106b05780635493d23b146106d057806355079ddd1461070857600080fd5b8063315c84251161049e578063315c8425146105b8578063323b5995146105d8578063342ec83d146105ee57806335090cc91461061b57806336c52b3b1461063b5780633d1987f01461065b57600080fd5b806306552ff3146104db57806306836485146104fd5780630eae4af714610532578063103b75f71461056a57806311d7096d14610598575b600080fd5b3480156104e757600080fd5b506104fb6104f6366004614658565b611055565b005b34801561050957600080fd5b5061051d6105183660046146b4565b611230565b60405190151581526020015b60405180910390f35b34801561053e57600080fd5b50600954610552906001600160a01b031681565b6040516001600160a01b039091168152602001610529565b34801561057657600080fd5b5061058a6105853660046146e0565b61126b565b604051908152602001610529565b3480156105a457600080fd5b5061058a6105b33660046146e0565b611278565b3480156105c457600080fd5b506104fb6105d33660046146f9565b611285565b3480156105e457600080fd5b5061058a60075481565b3480156105fa57600080fd5b5061058a610609366004614725565b600c6020526000908152604090205481565b34801561062757600080fd5b5061058a610636366004614750565b61142d565b34801561064757600080fd5b5061058a61065636600461478f565b611647565b34801561066757600080fd5b5061058a600181565b34801561067c57600080fd5b5061058a61068b3660046146e0565b611686565b34801561069c57600080fd5b5061051d6106ab3660046146b4565b611693565b3480156106bc57600080fd5b506104fb6106cb366004614725565b6116c7565b3480156106dc57600080fd5b5061058a6106eb3660046147da565b805160208183018101805160138252928201919093012091525481565b34801561071457600080fd5b5061058a6107233660046146b4565b611852565b34801561073457600080fd5b50600054610552906001600160a01b031681565b34801561075457600080fd5b506104fb610763366004614725565b6118a3565b6104fb611a39565b34801561077c57600080fd5b5061058a61078b3660046146b4565b611b27565b6104fb61079e36600461488b565b611b59565b3480156107af57600080fd5b5061058a6121b2565b3480156107c457600080fd5b5061051d6107d33660046148c4565b612233565b3480156107e457600080fd5b5061058a6107f33660046146b4565b6124b7565b34801561080457600080fd5b5061058a6108133660046146e0565b612579565b34801561082457600080fd5b506104fb6108333660046146e0565b612586565b34801561084457600080fd5b5061058a60065481565b34801561085a57600080fd5b5061058a600981565b34801561086f57600080fd5b506104fb61087e366004614725565b612732565b34801561088f57600080fd5b5061058a600881565b3480156108a457600080fd5b5061058a600381565b3480156108b957600080fd5b5061058a6108c83660046147da565b805160208183018101805160118252928201919093012091525481565b3480156108f157600080fd5b5061058a600581565b34801561090657600080fd5b5061051d6109153660046146e0565b60156020526000908152604090205460ff1681565b34801561093657600080fd5b5061058a6109453660046146b4565b612807565b34801561095657600080fd5b506104fb6109653660046148ff565b612834565b34801561097657600080fd5b5061051d6109853660046146e0565b60166020526000908152604090205460ff1681565b3480156109a657600080fd5b50600354610552906001600160a01b031681565b3480156109c657600080fd5b5061058a60045481565b3480156109dc57600080fd5b5061058a6109eb3660046147da565b805160208183018101805160148252928201919093012091525481565b348015610a1457600080fd5b50600254610552906001600160a01b031681565b348015610a3457600080fd5b5061058a610a433660046146b4565b6129c4565b348015610a5457600080fd5b5061058a610a633660046146e0565b612a05565b348015610a7457600080fd5b5061058a610a83366004614725565b600b6020526000908152604090205481565b348015610aa157600080fd5b5061051d610ab03660046146b4565b612a12565b348015610ac157600080fd5b5061058a610ad03660046146e0565b612a89565b348015610ae157600080fd5b5061058a610af03660046146b4565b612a96565b61058a610b0336600461492f565b612aa4565b348015610b1457600080fd5b5061058a600681565b348015610b2957600080fd5b5061058a610b383660046146b4565b613115565b348015610b4957600080fd5b5061058a610b583660046147da565b805160208183018101805160128252928201919093012091525481565b348015610b8157600080fd5b5061051d610b903660046146b4565b61314d565b348015610ba157600080fd5b5061058a600481565b348015610bb657600080fd5b5061058a610bc53660046146b4565b613192565b348015610bd657600080fd5b506104fb610be53660046148ff565b6131b1565b348015610bf657600080fd5b50610c0a610c053660046146b4565b613370565b604051610529919061498d565b348015610c2357600080fd5b506104fb610c323660046146e0565b6133d9565b348015610c4357600080fd5b5061058a600281565b348015610c5857600080fd5b5061058a610c673660046146e0565b6135c5565b348015610c7857600080fd5b5061058a60055481565b348015610c8e57600080fd5b5061058a610c9d3660046149c0565b601760209081526000928352604080842090915290825290205481565b61058a610cc83660046146e0565b6135d2565b348015610cd957600080fd5b5061058a610ce83660046146e0565b613765565b348015610cf957600080fd5b5061058a610d083660046146b4565b613772565b348015610d1957600080fd5b5061058a610d283660046147da565b8051602081830181018051600e8252928201919093012091525481565b348015610d5157600080fd5b5061058a60085481565b348015610d6757600080fd5b5061058a610d763660046146b4565b613780565b348015610d8757600080fd5b5061058a610d96366004614725565b61378e565b348015610da757600080fd5b5061058a600781565b348015610dbc57600080fd5b506104fb610dcb3660046146b4565b6137dc565b348015610ddc57600080fd5b5061058a610deb3660046146e0565b6139d9565b348015610dfc57600080fd5b506104fb610e0b3660046149e2565b6139e6565b348015610e1c57600080fd5b5061058a600a81565b348015610e3157600080fd5b5061058a600081565b348015610e4657600080fd5b5061058a610e553660046146b4565b613b77565b348015610e6657600080fd5b5061058a610e753660046146e0565b613b85565b6104fb610e88366004614a10565b613b92565b348015610e9957600080fd5b5061058a610ea83660046147da565b805160208183018101805160108252928201919093012091525481565b348015610ed157600080fd5b506104fb610ee03660046146b4565b613c4c565b348015610ef157600080fd5b5061058a610f003660046146b4565b613ee8565b348015610f1157600080fd5b5061058a610f203660046147da565b8051602081830181018051600f8252928201919093012091525481565b348015610f4957600080fd5b5061058a610f583660046146b4565b613ef7565b348015610f6957600080fd5b5061058a610f783660046146e0565b613f4e565b348015610f8957600080fd5b50600a54610552906001600160a01b031681565b348015610fa957600080fd5b5061058a610fb83660046147da565b8051602081830181018051600d8252928201919093012091525481565b348015610fe157600080fd5b5061058a610ff036600461478f565b613f5b565b34801561100157600080fd5b506104fb611010366004614725565b61408f565b34801561102157600080fd5b5061058a6110303660046146b4565b614225565b34801561104157600080fd5b5061051d6110503660046146b4565b614258565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110a157600080fd5b505afa1580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190614a35565b6000546001600160a01b0316158061116e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061111e9084903390600401614a58565b60206040518083038186803b15801561113657600080fd5b505afa15801561114a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116e9190614a74565b6111935760405162461bcd60e51b815260040161118a90614a91565b60405180910390fd5b6001600160a01b0382166111d65760405162461bcd60e51b815260206004820152600a6024820152696e6f206164647265737360b01b604482015260640161118a565b600280546001600160a01b038088166001600160a01b03199283161790925560038054878416908316179055600a8054868416908316179055600980549285169290911691909117905561122960018055565b5050505050565b600061123c8383611693565b801561124f575061124d8383612a12565b155b801561126257506112608383614258565b155b90505b92915050565b60006112658260016142d0565b600061126582600a6142d0565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d157600080fd5b505afa1580156112e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113099190614a35565b6000546001600160a01b0316158061139e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061134e9084903390600401614a58565b60206040518083038186803b15801561136657600080fd5b505afa15801561137a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139e9190614a74565b6113ba5760405162461bcd60e51b815260040161118a90614a91565b6000848152601660209081526040808320805460ff191660011790556017825280832086845282529182902084905581518681529081018590529081018390527f4dbbf86191ecd1e5615130609e3eda93820194f1c492d041ead416095959986b9060600160405180910390a150505050565b60008061143a8686613370565b90506000600f8260405161144e9190614ab4565b90815260200160405180910390205490506000600d836040516114719190614ab4565b908152602001604051809103902054905061148c8888611693565b61149c576000935050505061163f565b6114a68888612a12565b156114b7576000935050505061163f565b428611156114cb576000935050505061163f565b818610156114df576000935050505061163f565b8086116114f2576000935050505061163f565b600080831161150a576115058288614ae6565b611514565b6115148388614ae6565b905060006115228a8a614225565b905060006115308b8b613ef7565b6115398b61126b565b6115439085614afd565b61154d9190614afd565b905060008861155d576000611568565b6115688c8c8c613f5b565b9050600060128860405161157c9190614ab4565b908152604051908190036020019020546115968385614b1c565b6115a09190614b1c565b9050836013896040516115b39190614ab4565b908152602001604051809103902054106115d85760009850505050505050505061163f565b838160138a6040516115ea9190614ab4565b9081526020016040518091039020546116039190614b1c565b10611635576013886040516116189190614ab4565b908152602001604051809103902054846116329190614ae6565b90505b9750505050505050505b949350505050565b600061165283613f4e565b61165b846139d9565b611668868686600161142d565b6116729190614afd565b61167c9190614b34565b90505b9392505050565b60006112658260036142d0565b600080600e6116a28585613370565b6040516116af9190614ab4565b90815260200160405180910390205411905092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561171357600080fd5b505afa158015611727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174b9190614a35565b6000546001600160a01b031615806117e05750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906117909084903390600401614a58565b60206040518083038186803b1580156117a857600080fd5b505afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190614a74565b6117fc5760405162461bcd60e51b815260040161118a90614a91565b600380546001600160a01b0319166001600160a01b0384169081179091556040519081527fa30ea3596e6b0bf63d799ca3146166f9b51a9eb996ce58e022ef806c13e17ff0906020015b60405180910390a15050565b60008060015b600754811161189b5761187d8582600087116118745742611876565b865b600161142d565b6118879083614b1c565b91508061189381614b56565b915050611858565b509392505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118ef57600080fd5b505afa158015611903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190614a35565b6000546001600160a01b031615806119bc5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061196c9084903390600401614a58565b60206040518083038186803b15801561198457600080fd5b505afa158015611998573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bc9190614a74565b6119d85760405162461bcd60e51b815260040161118a90614a91565b6001600160a01b0382166119eb57600080fd5b600980546001600160a01b0319166001600160a01b0384169081179091556040519081527fd649da8f6092116f86ea4e5139de0b75ad371d823918d16368ba3ff09a5cbc9f90602001611846565b6002600155336000908152600b6020526040902054611a855760405162461bcd60e51b81526020600482015260086024820152676e6f207061636b7360c01b604482015260640161118a565b3460015b6007548111611b0f57611a9c3382611230565b611aa557611afd565b60008211611ae25760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b604482015260640161118a565b6000611aed826135d2565b9050611af98184614ae6565b9250505b80611b0781614b56565b915050611a89565b508015611b2057611b20338261435b565b5060018055565b60006014611b358484613370565b604051611b429190614ab4565b908152602001604051809103902054905092915050565b600082611b6633866124b7565b611b709190614afd565b9050600083611b7e866135c5565b611b889190614afd565b90506000611b9586611278565b9050426000611ba43389613370565b60008981526015602052604090205490915060ff16611bd55760405162461bcd60e51b815260040161118a90614b71565b821580611bff575082601082604051611bee9190614ab4565b908152602001604051809103902054105b611c385760405162461bcd60e51b815260206004820152600a6024820152691bdd995c881b1a5b5a5d60b21b604482015260640161118a565b6001871015611c7e5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b9bd9194818dbdd5b9d60721b604482015260640161118a565b84341015611c9e5760405162461bcd60e51b815260040161118a90614b97565b6003546001600160a01b031615611d14576003546040516367b4613560e01b8152336004820152602481018a90526001600160a01b03909116906367b4613590604401600060405180830381600087803b158015611cfb57600080fd5b505af1158015611d0f573d6000803e3d6000fd5b505050505b8660046000828254611d269190614b1c565b9091555050336000908152600b602052604081208054899290611d4a908490614b1c565b9091555050604051601090611d60908390614ab4565b90815260200160405180910390205460001415611e605781600d82604051611d889190614ab4565b90815260200160405180910390208190555081600e82604051611dab9190614ab4565b90815260200160405180910390208190555086601082604051611dce9190614ab4565b90815260200160405180910390206000828254611deb9190614b1c565b92505081905550600160066000828254611e059190614b1c565b909155505060408051898152602081018990528715158183015242606082015260006080820152905133917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a2611f68565b611e6a3389612a12565b15611ea65760405162461bcd60e51b815260206004820152600c60248201526b1c1858dac8195e1c1a5c995960a21b604482015260640161118a565b611eb233896001614433565b86601082604051611ec39190614ab4565b90815260200160405180910390206000828254611ee09190614b1c565b92505081905550336001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c8989601085604051611f249190614ab4565b90815260408051602092819003830181205494815291820192909252908101919091528815156060820152426080820152600060a082015260c00160405180910390a25b8515611fde5783611f793342612807565b1015611fb45760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b604482015260640161118a565b336000908152600c602052604081208054869290611fd3908490614b1c565b909155506121779050565b600061271060085486611ff19190614afd565b611ffb9190614b34565b905080156120ad57600254600a546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd90606401602060405180830381600087803b15801561205957600080fd5b505af115801561206d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120919190614a74565b6120ad5760405162461bcd60e51b815260040161118a90614bbc565b80851115612175576002546001600160a01b03166323b872dd33306120d2858a614ae6565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561212157600080fd5b505af1158015612135573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121599190614a74565b6121755760405162461bcd60e51b815260040161118a90614bbc565b505b600a5461218d906001600160a01b03168661435b565b843411156121a8576121a8336121a38734614ae6565b61435b565b5050505050505050565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156121f657600080fd5b505afa15801561220a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222e9190614be5565b905090565b3360009081526018602052604081205460ff1661227f5760405162461bcd60e51b815260206004820152600a6024820152696e6f207365727669636560b01b604482015260640161118a565b60008481526015602052604090205460ff166122ad5760405162461bcd60e51b815260040161118a90614b71565b60006122b98686613370565b905083600460008282546122cd9190614b1c565b90915550506001600160a01b0386166000908152600b6020526040812080548692906122fa908490614b1c565b92505081905550836010826040516123129190614ab4565b9081526020016040518091039020600082825461232f9190614b1c565b92505081905550836010826040516123479190614ab4565b90815260200160405180910390205414156124205742600d8260405161236d9190614ab4565b9081526040519081900360200190205582612388574261238a565b825b600e8260405161239a9190614ab4565b90815260200160405180910390208190555083600660008282546123be9190614b1c565b9091555050604080518681526020810186905260008183015242606082015233608082015290516001600160a01b038816917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a26124ab565b61242c33866001614433565b856001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c86866010856040516124699190614ab4565b9081526040805160209281900383018120549481529182019290925290810191909152600060608201524260808201523360a082015260c00160405180910390a25b50600195945050505050565b6000806124c383611686565b90506000600e6124d38686613370565b6040516124e09190614ab4565b9081526020016040518091039020549050806000141561250257509050611265565b61250c858561314d565b1561251957509050611265565b6125238585612a12565b1561253357600092505050611265565b600061253e85612a89565b905060004261254d8385614b1c565b6125579190614ae6565b9050816125648583614afd565b61256e9190614b34565b979650505050505050565b60006112658260006142d0565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125d257600080fd5b505afa1580156125e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260a9190614a35565b6000546001600160a01b0316158061269f5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061264f9084903390600401614a58565b60206040518083038186803b15801561266757600080fd5b505afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f9190614a74565b6126bb5760405162461bcd60e51b815260040161118a90614a91565b6127108211156126fd5760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642076616c756560981b604482015260640161118a565b60088290556040518281527f774b9fb928c71ca72bafa8771a63e9d00ea63b021cfd8cdc2ce4f003094c5d5890602001611846565b600080546001600160a01b031615806127c85750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906127789084903390600401614a58565b60206040518083038186803b15801561279057600080fd5b505afa1580156127a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c89190614a74565b6127e45760405162461bcd60e51b815260040161118a90614a91565b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166000908152600c602052604081205461282a8484611852565b6112629190614ae6565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561288057600080fd5b505afa158015612894573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b89190614a35565b6000546001600160a01b0316158061294d5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906128fd9084903390600401614a58565b60206040518083038186803b15801561291557600080fd5b505afa158015612929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294d9190614a74565b6129695760405162461bcd60e51b815260040161118a90614a91565b600083815260166020908152604091829020805460ff19168515159081179091558251868152918201527f754a64d46ab9a313f3f3cbae897a6b9d8d703593379a9ffe0035ace48dceeb6691015b60405180910390a1505050565b60006129d3838342600161142d565b60136129df8585613370565b6040516129ec9190614ab4565b9081526020016040518091039020546112629190614b1c565b60006112658260096142d0565b600080612a1f8484613370565b90506000600e82604051612a339190614ab4565b90815260200160405180910390205490508060001415612a5857600192505050611265565b612a6184613765565b612a6a85612a89565b612a749083614b1c565b612a7e9190614b1c565b421195945050505050565b60006112658260076142d0565b60006013611b358484613370565b60035460009081906001600160a01b03163314612ac15733612ac3565b325b90506000612ad18287613370565b90506000600f82604051612ae59190614ab4565b90815260200160405180910390205460001415612b2057600d82604051612b0c9190614ab4565b908152602001604051809103902054612b40565b600f82604051612b309190614ab4565b9081526020016040518091039020545b9050612b4c8388611693565b612b875760405162461bcd60e51b815260206004820152600c60248201526b191bd95cdb9d08195e1a5cdd60a21b604482015260640161118a565b612b918388612a12565b15612bcd5760405162461bcd60e51b815260206004820152600c60248201526b1c1858dac8195e1c1a5c995960a21b604482015260640161118a565b612bd7838861314d565b15612c0f5760405162461bcd60e51b8152602060048201526008602482015267706173742064756560c01b604482015260640161118a565b42861115612c4f5760405162461bcd60e51b815260206004820152600d60248201526c06261642074696d657374616d7609c1b604482015260640161118a565b85612c5c82610384614b1c565b10612c945760405162461bcd60e51b81526020600482015260086024820152673a37b79039b7b7b760c11b604482015260640161118a565b6000612ca3848989600161142d565b905060008111612ce15760405162461bcd60e51b81526020600482015260096024820152681b9bc81c995dd85c9960ba1b604482015260640161118a565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015612d2457600080fd5b505afa158015612d38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d5c9190614be5565b1015612d995760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b604482015260640161118a565b6000612da489613f4e565b612dad8a6139d9565b612db79084614afd565b612dc19190614b34565b905080341015612de35760405162461bcd60e51b815260040161118a90614b97565b87600f85604051612df49190614ab4565b90815260200160405180910390208190555081601385604051612e179190614ab4565b90815260200160405180910390206000828254612e349190614b1c565b925050819055506000601285604051612e4d9190614ab4565b9081526040805160209281900383018120939093558b83529082018490526001600160a01b038716917f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a910160405180910390a2336000908152600c602052604090205415612f2f57336000908152600c6020526040902054821015612f0257336000908152600c6020526040902054612ee8908390614ae6565b336000908152600c60205260408120919091559150612f2f565b336000908152600c6020526040902054612f1c9083614ae6565b336000908152600c602052604081205591505b612f3b338a6000614433565b6003546001600160a01b031615612faf5760035460405163f4888a2160e01b81526001600160a01b039091169063f4888a2190612f7c90879060040161498d565b600060405180830381600087803b158015612f9657600080fd5b505af1158015612faa573d6000803e3d6000fd5b505050505b81156130cd576001600160a01b0387161561302b576040516330d6a97560e01b81526001600160a01b038681166004830152602482018490528816906330d6a97590604401600060405180830381600087803b15801561300e57600080fd5b505af1158015613022573d6000803e3d6000fd5b505050506130cd565b60025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b15801561307957600080fd5b505af115801561308d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b19190614a74565b6130cd5760405162461bcd60e51b815260040161118a90614bbc565b6009546130e3906001600160a01b03168261435b565b6130eb614623565b80156130f657508034115b1561310957613109336121a38334614ae6565b98975050505050505050565b60008060015b600754811161189b5761312f858286611647565b6131399083614b1c565b91508061314581614b56565b91505061311b565b60008061315a8484613370565b90506000600e8260405161316e9190614ab4565b908152602001604051809103902054905061318884612a89565b612a7e9082614b1c565b600061319e8383613ef7565b6131a783613b85565b6112629190614afd565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131fd57600080fd5b505afa158015613211573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132359190614a35565b6000546001600160a01b031615806132ca5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061327a9084903390600401614a58565b60206040518083038186803b15801561329257600080fd5b505afa1580156132a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ca9190614a74565b6132e65760405162461bcd60e51b815260040161118a90614a91565b600083116133065760405162461bcd60e51b815260040161118a90614b71565b6000838152601560205260409020805460ff19168315151790556007548311801561332e5750815b156133395760078390555b6040805184815283151560208201527f6f5d3c00ffa60404dde260f3251925e7a1b0e75603ddf7a1b15002e90e8ff9e091016129b7565b6060600082613380576001613382565b825b604080516bffffffffffffffffffffffff19606088901b1660208201526001600160e01b031960e084901b166034820152600160c01b60388201529192500160405160208183030381529060405291505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561342557600080fd5b505afa158015613439573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345d9190614a35565b6000546001600160a01b031615806134f25750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906134a29084903390600401614a58565b60206040518083038186803b1580156134ba57600080fd5b505afa1580156134ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f29190614a74565b61350e5760405162461bcd60e51b815260040161118a90614a91565b6000821161351b57600080fd5b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561356d57600080fd5b505af1158015613581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a59190614a74565b6135c15760405162461bcd60e51b815260040161118a90614bbc565b5050565b60006112658260026142d0565b60006135de3383611230565b6136155760405162461bcd60e51b815260206004820152600860248201526763616e742070617960c01b604482015260640161118a565b61362133836001614433565b600061362d3384613370565b9050600061363b3385613ef7565b61364485613b85565b61364e9190614afd565b9050803410156136705760405162461bcd60e51b815260040161118a90614b97565b61367984612a89565b600e836040516136899190614ab4565b9081526020016040518091039020546136a29190614b1c565b600e836040516136b29190614ab4565b908152602001604051809103902081905550336001600160a01b03167fdf9a51129930649214df58f542322c245372c6f2fa6fc3c9b40d927c597cd23085600e856040516137009190614ab4565b90815260405190819003602001812054613721928252602082015260400190565b60405180910390a2600a5461373f906001600160a01b03168261435b565b613747614623565b801561375257508034115b1561167f5761167f336121a38334614ae6565b60006112658260086142d0565b60006011611b358484613370565b6000600e611b358484613370565b60008060015b60075481116137d5576137a78482611230565b156137c3576137b68482613192565b6137c09083614b1c565b91505b806137cd81614b56565b915050613794565b5092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561382857600080fd5b505afa15801561383c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138609190614a35565b6000546001600160a01b031615806138f55750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906138a59084903390600401614a58565b60206040518083038186803b1580156138bd57600080fd5b505afa1580156138d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138f59190614a74565b6139115760405162461bcd60e51b815260040161118a90614a91565b60025460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b390604401602060405180830381600087803b15801561395f57600080fd5b505af1158015613973573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139979190614a74565b6139d45760405162461bcd60e51b815260206004820152600e60248201526d185c1c1c9bdd994819985a5b195960921b604482015260640161118a565b505050565b60006112658260056142d0565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a3257600080fd5b505afa158015613a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a6a9190614a35565b6000546001600160a01b03161580613aff5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613aaf9084903390600401614a58565b60206040518083038186803b158015613ac757600080fd5b505afa158015613adb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aff9190614a74565b613b1b5760405162461bcd60e51b815260040161118a90614a91565b6001600160a01b038316600081815260186020908152604091829020805460ff19168615159081179091558251938452908301527fea782fa1fcb250a935b6bf028374e06a580a12523d2befc1c2254a3cd3ef378091016129b7565b60006010611b358484613370565b60006112658260046142d0565b6002600155336000908152600b6020526040902054613bde5760405162461bcd60e51b81526020600482015260086024820152676e6f206e6f64657360c01b604482015260640161118a565b3460015b6007548111613c32576000613bfa338387600161142d565b90508015613c1f576000613c0f838787612aa4565b9050613c1b8185614ae6565b9350505b5080613c2a81614b56565b915050613be2565b508015613c4357613c43338261435b565b50506001805550565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c9857600080fd5b505afa158015613cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cd09190614a35565b6000546001600160a01b03161580613d655750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613d159084903390600401614a58565b60206040518083038186803b158015613d2d57600080fd5b505afa158015613d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d659190614a74565b613d815760405162461bcd60e51b815260040161118a90614a91565b60008211613d8e57600080fd5b6002546040516370a0823160e01b815230600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015613dd157600080fd5b505afa158015613de5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e099190614be5565b1015613e465760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b604482015260640161118a565b60025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b158015613e9457600080fd5b505af1158015613ea8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ecc9190614a74565b6139d45760405162461bcd60e51b815260040161118a90614bbc565b6000611262838342600161142d565b600080613f048484613370565b9050601181604051613f169190614ab4565b908152602001604051809103902054601082604051613f359190614ab4565b90815260200160405180910390205461163f9190614ae6565b60006112658260066142d0565b6003546000906001600160a01b0316613f765750600061167f565b6000613f828585613370565b90506000600f82604051613f969190614ab4565b90815260200160405180910390205460001415613fd157600d82604051613fbd9190614ab4565b908152602001604051809103902054613ff1565b600f82604051613fe19190614ab4565b9081526020016040518091039020545b600354604051634ac21a6960e11b81526001600160a01b03898116600483015260248201899052604482018490526064820188905292935091169063958434d29060840160206040518083038186803b15801561404d57600080fd5b505afa158015614061573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140859190614be5565b9695505050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140db57600080fd5b505afa1580156140ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141139190614a35565b6000546001600160a01b031615806141a85750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906141589084903390600401614a58565b60206040518083038186803b15801561417057600080fd5b505afa158015614184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141a89190614a74565b6141c45760405162461bcd60e51b815260040161118a90614a91565b6001600160a01b0382166141d757600080fd5b600a80546001600160a01b0319166001600160a01b0384169081179091556040519081527f6fc8e7a1c2484c662808b4ca8010d816b18923abab6769fa48a21eb5ccf6e07c90602001611846565b600060106142338484613370565b6040516142409190614ab4565b9081526020016040518091039020546131a783612579565b6000806142658484613370565b90506000600e826040516142799190614ab4565b9081526020016040518091039020549050600061429585612a89565b905060006142a286612a05565b6142ac9083614afd565b6142b69042614b1c565b9050806142c38385614b1c565b1015979650505050505050565b60008281526016602052604081205460ff1680156143065750600083815260176020908152604080832085845290915290205415155b61433d5760008281527fd840e16649f6b9a295d95876f4633d3a6b10b55e8162971cf78afd886d5ec89b6020526040902054611262565b50600091825260176020908152604080842092845291905290205490565b804710156143a25760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b604482015260640161118a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146143ef576040519150601f19603f3d011682016040523d82523d6000602084013e6143f4565b606091505b50509050806139d45760405162461bcd60e51b815260206004820152600b60248201526a1cd95b990819985a5b195960aa1b604482015260640161118a565b600061443f8484613370565b905060006013826040516144539190614ab4565b90815260200160405180910390205490506000614473868642600061142d565b905060006144818284614b1c565b9050600061448e87612579565b9050600061449c8284614b34565b905060006011876040516144b09190614ab4565b90815260200160405180910390205482116144cc5760006144f6565b6011876040516144dc9190614ab4565b908152602001604051809103902054826144f69190614ae6565b90508715614543578460128860405161450f9190614ab4565b90815260200160405180910390208190555042600f886040516145329190614ab4565b908152604051908190036020019020555b8015614617578060118860405161455a9190614ab4565b908152602001604051809103902060008282546145779190614b1c565b9091555061458790508382614afd565b6014886040516145979190614ab4565b908152602001604051809103902060008282546145b49190614b1c565b9250508190555080600560008282546145cd9190614b1c565b9091555050604080518a8152602081018390526001600160a01b038c16917fd1ad6f13ecf90412417f16481b7455bda8aa6ec0133a68cdab069f9b7bd623f9910160405180910390a25b50505050505050505050565b600061463160015460021490565b15801561222e57505033321490565b6001600160a01b038116811461465557600080fd5b50565b6000806000806080858703121561466e57600080fd5b843561467981614640565b9350602085013561468981614640565b9250604085013561469981614640565b915060608501356146a981614640565b939692955090935050565b600080604083850312156146c757600080fd5b82356146d281614640565b946020939093013593505050565b6000602082840312156146f257600080fd5b5035919050565b60008060006060848603121561470e57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561473757600080fd5b813561167f81614640565b801515811461465557600080fd5b6000806000806080858703121561476657600080fd5b843561477181614640565b9350602085013592506040850135915060608501356146a981614742565b6000806000606084860312156147a457600080fd5b83356147af81614640565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156147ec57600080fd5b813567ffffffffffffffff8082111561480457600080fd5b818401915084601f83011261481857600080fd5b81358181111561482a5761482a6147c4565b604051601f8201601f19908116603f01168101908382118183101715614852576148526147c4565b8160405282815287602084870101111561486b57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000606084860312156148a057600080fd5b833592506020840135915060408401356148b981614742565b809150509250925092565b600080600080608085870312156148da57600080fd5b84356148e581614640565b966020860135965060408601359560600135945092505050565b6000806040838503121561491257600080fd5b82359150602083013561492481614742565b809150509250929050565b60008060006060848603121561494457600080fd5b833592506020840135915060408401356148b981614640565b60005b83811015614978578181015183820152602001614960565b83811115614987576000848401525b50505050565b60208152600082518060208401526149ac81604085016020870161495d565b601f01601f19169190910160400192915050565b600080604083850312156149d357600080fd5b50508035926020909101359150565b600080604083850312156149f557600080fd5b8235614a0081614640565b9150602083013561492481614742565b60008060408385031215614a2357600080fd5b82359150602083013561492481614640565b600060208284031215614a4757600080fd5b815160ff8116811461167f57600080fd5b60ff9290921682526001600160a01b0316602082015260400190565b600060208284031215614a8657600080fd5b815161167f81614742565b6020808252600990820152686e6f2061636365737360b81b604082015260600190565b60008251614ac681846020870161495d565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600082821015614af857614af8614ad0565b500390565b6000816000190483118215151615614b1757614b17614ad0565b500290565b60008219821115614b2f57614b2f614ad0565b500190565b600082614b5157634e487b7160e01b600052601260045260246000fd5b500490565b6000600019821415614b6a57614b6a614ad0565b5060010190565b6020808252600c908201526b696e76616c6964207479706560a01b604082015260600190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b600060208284031215614bf757600080fd5b505191905056fea2646970667358221220bf6170dc808338187998a59720019677f968e3b8cbb897cdbbf47e59d04ecff664736f6c63430008090033
Deployed Bytecode
0x6080604052600436106104d65760003560e01c8063a8b6c6f811610281578063d3dfff001161015a578063f0b56d71116100cc578063f5c554ab11610085578063f5c554ab14610f7d578063f75998bb14610f9d578063f855503214610fd5578063f91af58014610ff5578063f999952a14611015578063f9df21e71461103557600080fd5b8063f0b56d7114610e8d578063f3fef3a314610ec5578063f474c8ce14610ee5578063f4def5bf14610f05578063f4ec7b1d14610f3d578063f5474cb014610f5d57600080fd5b8063e2ca3c3a1161011e578063e2ca3c3a14610df0578063e562cdb014610e10578063e84dc3ba14610e25578063e97e1b9014610e3a578063eaffeddc14610e5a578063ed5e3f1614610e7a57600080fd5b8063d3dfff0014610d5b578063d4cab99214610d7b578063dad20ec914610d9b578063dc2e86e914610db0578063de20d47a14610dd057600080fd5b8063b48f0428116101f3578063c186c91f116101b7578063c186c91f14610c82578063c290d69114610cba578063c548201114610ccd578063c94dcd6114610ced578063c99a585514610d0d578063d2d7b21414610d4557600080fd5b8063b48f042814610bea578063b6b55f2514610c17578063bb77c82b14610c37578063bbbf0f6614610c4c578063bef7348714610c6c57600080fd5b8063ad4361a511610245578063ad4361a514610b1d578063ad82ba1d14610b3d578063af604e8514610b75578063b391d74714610b95578063b448422614610baa578063b48d198f14610bca57600080fd5b8063a8b6c6f814610a95578063aadea3f314610ab5578063aaf2d9fa14610ad5578063ac44ff3114610af5578063ad2cbefa14610b0857600080fd5b8063610efc9d116103b35780638cf52bf1116103255780639592d424116102e95780639592d424146109ba57806395e614d3146109d0578063965d61b914610a085780639e81e13514610a28578063a052058114610a48578063a77e282514610a6857600080fd5b80638cf52bf1146108fa5780638eda065f1461092a57806392488d071461094a5780639528d7781461096a5780639548f1e61461099a57600080fd5b80637860297211610377578063786029721461084e5780637a0b9255146108635780637fdfbeb61461088357806381bd10d61461089857806384baff50146108ad5780638c299dad146108e557600080fd5b8063610efc9d146107b857806363e82daf146107d857806367df6abc146107f85780636fdd1ff1146108185780637281df121461083857600080fd5b80634608482d1161044c578063555d3e6311610410578063555d3e631461072857806357f559df146107485780635806beaf1461076857806359a609b9146107705780635cc32e76146107905780635e42b455146107a357600080fd5b80634608482d1461067057806346baac3a146106905780634df78d5f146106b05780635493d23b146106d057806355079ddd1461070857600080fd5b8063315c84251161049e578063315c8425146105b8578063323b5995146105d8578063342ec83d146105ee57806335090cc91461061b57806336c52b3b1461063b5780633d1987f01461065b57600080fd5b806306552ff3146104db57806306836485146104fd5780630eae4af714610532578063103b75f71461056a57806311d7096d14610598575b600080fd5b3480156104e757600080fd5b506104fb6104f6366004614658565b611055565b005b34801561050957600080fd5b5061051d6105183660046146b4565b611230565b60405190151581526020015b60405180910390f35b34801561053e57600080fd5b50600954610552906001600160a01b031681565b6040516001600160a01b039091168152602001610529565b34801561057657600080fd5b5061058a6105853660046146e0565b61126b565b604051908152602001610529565b3480156105a457600080fd5b5061058a6105b33660046146e0565b611278565b3480156105c457600080fd5b506104fb6105d33660046146f9565b611285565b3480156105e457600080fd5b5061058a60075481565b3480156105fa57600080fd5b5061058a610609366004614725565b600c6020526000908152604090205481565b34801561062757600080fd5b5061058a610636366004614750565b61142d565b34801561064757600080fd5b5061058a61065636600461478f565b611647565b34801561066757600080fd5b5061058a600181565b34801561067c57600080fd5b5061058a61068b3660046146e0565b611686565b34801561069c57600080fd5b5061051d6106ab3660046146b4565b611693565b3480156106bc57600080fd5b506104fb6106cb366004614725565b6116c7565b3480156106dc57600080fd5b5061058a6106eb3660046147da565b805160208183018101805160138252928201919093012091525481565b34801561071457600080fd5b5061058a6107233660046146b4565b611852565b34801561073457600080fd5b50600054610552906001600160a01b031681565b34801561075457600080fd5b506104fb610763366004614725565b6118a3565b6104fb611a39565b34801561077c57600080fd5b5061058a61078b3660046146b4565b611b27565b6104fb61079e36600461488b565b611b59565b3480156107af57600080fd5b5061058a6121b2565b3480156107c457600080fd5b5061051d6107d33660046148c4565b612233565b3480156107e457600080fd5b5061058a6107f33660046146b4565b6124b7565b34801561080457600080fd5b5061058a6108133660046146e0565b612579565b34801561082457600080fd5b506104fb6108333660046146e0565b612586565b34801561084457600080fd5b5061058a60065481565b34801561085a57600080fd5b5061058a600981565b34801561086f57600080fd5b506104fb61087e366004614725565b612732565b34801561088f57600080fd5b5061058a600881565b3480156108a457600080fd5b5061058a600381565b3480156108b957600080fd5b5061058a6108c83660046147da565b805160208183018101805160118252928201919093012091525481565b3480156108f157600080fd5b5061058a600581565b34801561090657600080fd5b5061051d6109153660046146e0565b60156020526000908152604090205460ff1681565b34801561093657600080fd5b5061058a6109453660046146b4565b612807565b34801561095657600080fd5b506104fb6109653660046148ff565b612834565b34801561097657600080fd5b5061051d6109853660046146e0565b60166020526000908152604090205460ff1681565b3480156109a657600080fd5b50600354610552906001600160a01b031681565b3480156109c657600080fd5b5061058a60045481565b3480156109dc57600080fd5b5061058a6109eb3660046147da565b805160208183018101805160148252928201919093012091525481565b348015610a1457600080fd5b50600254610552906001600160a01b031681565b348015610a3457600080fd5b5061058a610a433660046146b4565b6129c4565b348015610a5457600080fd5b5061058a610a633660046146e0565b612a05565b348015610a7457600080fd5b5061058a610a83366004614725565b600b6020526000908152604090205481565b348015610aa157600080fd5b5061051d610ab03660046146b4565b612a12565b348015610ac157600080fd5b5061058a610ad03660046146e0565b612a89565b348015610ae157600080fd5b5061058a610af03660046146b4565b612a96565b61058a610b0336600461492f565b612aa4565b348015610b1457600080fd5b5061058a600681565b348015610b2957600080fd5b5061058a610b383660046146b4565b613115565b348015610b4957600080fd5b5061058a610b583660046147da565b805160208183018101805160128252928201919093012091525481565b348015610b8157600080fd5b5061051d610b903660046146b4565b61314d565b348015610ba157600080fd5b5061058a600481565b348015610bb657600080fd5b5061058a610bc53660046146b4565b613192565b348015610bd657600080fd5b506104fb610be53660046148ff565b6131b1565b348015610bf657600080fd5b50610c0a610c053660046146b4565b613370565b604051610529919061498d565b348015610c2357600080fd5b506104fb610c323660046146e0565b6133d9565b348015610c4357600080fd5b5061058a600281565b348015610c5857600080fd5b5061058a610c673660046146e0565b6135c5565b348015610c7857600080fd5b5061058a60055481565b348015610c8e57600080fd5b5061058a610c9d3660046149c0565b601760209081526000928352604080842090915290825290205481565b61058a610cc83660046146e0565b6135d2565b348015610cd957600080fd5b5061058a610ce83660046146e0565b613765565b348015610cf957600080fd5b5061058a610d083660046146b4565b613772565b348015610d1957600080fd5b5061058a610d283660046147da565b8051602081830181018051600e8252928201919093012091525481565b348015610d5157600080fd5b5061058a60085481565b348015610d6757600080fd5b5061058a610d763660046146b4565b613780565b348015610d8757600080fd5b5061058a610d96366004614725565b61378e565b348015610da757600080fd5b5061058a600781565b348015610dbc57600080fd5b506104fb610dcb3660046146b4565b6137dc565b348015610ddc57600080fd5b5061058a610deb3660046146e0565b6139d9565b348015610dfc57600080fd5b506104fb610e0b3660046149e2565b6139e6565b348015610e1c57600080fd5b5061058a600a81565b348015610e3157600080fd5b5061058a600081565b348015610e4657600080fd5b5061058a610e553660046146b4565b613b77565b348015610e6657600080fd5b5061058a610e753660046146e0565b613b85565b6104fb610e88366004614a10565b613b92565b348015610e9957600080fd5b5061058a610ea83660046147da565b805160208183018101805160108252928201919093012091525481565b348015610ed157600080fd5b506104fb610ee03660046146b4565b613c4c565b348015610ef157600080fd5b5061058a610f003660046146b4565b613ee8565b348015610f1157600080fd5b5061058a610f203660046147da565b8051602081830181018051600f8252928201919093012091525481565b348015610f4957600080fd5b5061058a610f583660046146b4565b613ef7565b348015610f6957600080fd5b5061058a610f783660046146e0565b613f4e565b348015610f8957600080fd5b50600a54610552906001600160a01b031681565b348015610fa957600080fd5b5061058a610fb83660046147da565b8051602081830181018051600d8252928201919093012091525481565b348015610fe157600080fd5b5061058a610ff036600461478f565b613f5b565b34801561100157600080fd5b506104fb611010366004614725565b61408f565b34801561102157600080fd5b5061058a6110303660046146b4565b614225565b34801561104157600080fd5b5061051d6110503660046146b4565b614258565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110a157600080fd5b505afa1580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190614a35565b6000546001600160a01b0316158061116e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061111e9084903390600401614a58565b60206040518083038186803b15801561113657600080fd5b505afa15801561114a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116e9190614a74565b6111935760405162461bcd60e51b815260040161118a90614a91565b60405180910390fd5b6001600160a01b0382166111d65760405162461bcd60e51b815260206004820152600a6024820152696e6f206164647265737360b01b604482015260640161118a565b600280546001600160a01b038088166001600160a01b03199283161790925560038054878416908316179055600a8054868416908316179055600980549285169290911691909117905561122960018055565b5050505050565b600061123c8383611693565b801561124f575061124d8383612a12565b155b801561126257506112608383614258565b155b90505b92915050565b60006112658260016142d0565b600061126582600a6142d0565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d157600080fd5b505afa1580156112e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113099190614a35565b6000546001600160a01b0316158061139e5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061134e9084903390600401614a58565b60206040518083038186803b15801561136657600080fd5b505afa15801561137a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139e9190614a74565b6113ba5760405162461bcd60e51b815260040161118a90614a91565b6000848152601660209081526040808320805460ff191660011790556017825280832086845282529182902084905581518681529081018590529081018390527f4dbbf86191ecd1e5615130609e3eda93820194f1c492d041ead416095959986b9060600160405180910390a150505050565b60008061143a8686613370565b90506000600f8260405161144e9190614ab4565b90815260200160405180910390205490506000600d836040516114719190614ab4565b908152602001604051809103902054905061148c8888611693565b61149c576000935050505061163f565b6114a68888612a12565b156114b7576000935050505061163f565b428611156114cb576000935050505061163f565b818610156114df576000935050505061163f565b8086116114f2576000935050505061163f565b600080831161150a576115058288614ae6565b611514565b6115148388614ae6565b905060006115228a8a614225565b905060006115308b8b613ef7565b6115398b61126b565b6115439085614afd565b61154d9190614afd565b905060008861155d576000611568565b6115688c8c8c613f5b565b9050600060128860405161157c9190614ab4565b908152604051908190036020019020546115968385614b1c565b6115a09190614b1c565b9050836013896040516115b39190614ab4565b908152602001604051809103902054106115d85760009850505050505050505061163f565b838160138a6040516115ea9190614ab4565b9081526020016040518091039020546116039190614b1c565b10611635576013886040516116189190614ab4565b908152602001604051809103902054846116329190614ae6565b90505b9750505050505050505b949350505050565b600061165283613f4e565b61165b846139d9565b611668868686600161142d565b6116729190614afd565b61167c9190614b34565b90505b9392505050565b60006112658260036142d0565b600080600e6116a28585613370565b6040516116af9190614ab4565b90815260200160405180910390205411905092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561171357600080fd5b505afa158015611727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174b9190614a35565b6000546001600160a01b031615806117e05750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906117909084903390600401614a58565b60206040518083038186803b1580156117a857600080fd5b505afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190614a74565b6117fc5760405162461bcd60e51b815260040161118a90614a91565b600380546001600160a01b0319166001600160a01b0384169081179091556040519081527fa30ea3596e6b0bf63d799ca3146166f9b51a9eb996ce58e022ef806c13e17ff0906020015b60405180910390a15050565b60008060015b600754811161189b5761187d8582600087116118745742611876565b865b600161142d565b6118879083614b1c565b91508061189381614b56565b915050611858565b509392505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156118ef57600080fd5b505afa158015611903573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119279190614a35565b6000546001600160a01b031615806119bc5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061196c9084903390600401614a58565b60206040518083038186803b15801561198457600080fd5b505afa158015611998573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bc9190614a74565b6119d85760405162461bcd60e51b815260040161118a90614a91565b6001600160a01b0382166119eb57600080fd5b600980546001600160a01b0319166001600160a01b0384169081179091556040519081527fd649da8f6092116f86ea4e5139de0b75ad371d823918d16368ba3ff09a5cbc9f90602001611846565b6002600155336000908152600b6020526040902054611a855760405162461bcd60e51b81526020600482015260086024820152676e6f207061636b7360c01b604482015260640161118a565b3460015b6007548111611b0f57611a9c3382611230565b611aa557611afd565b60008211611ae25760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b604482015260640161118a565b6000611aed826135d2565b9050611af98184614ae6565b9250505b80611b0781614b56565b915050611a89565b508015611b2057611b20338261435b565b5060018055565b60006014611b358484613370565b604051611b429190614ab4565b908152602001604051809103902054905092915050565b600082611b6633866124b7565b611b709190614afd565b9050600083611b7e866135c5565b611b889190614afd565b90506000611b9586611278565b9050426000611ba43389613370565b60008981526015602052604090205490915060ff16611bd55760405162461bcd60e51b815260040161118a90614b71565b821580611bff575082601082604051611bee9190614ab4565b908152602001604051809103902054105b611c385760405162461bcd60e51b815260206004820152600a6024820152691bdd995c881b1a5b5a5d60b21b604482015260640161118a565b6001871015611c7e5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b9bd9194818dbdd5b9d60721b604482015260640161118a565b84341015611c9e5760405162461bcd60e51b815260040161118a90614b97565b6003546001600160a01b031615611d14576003546040516367b4613560e01b8152336004820152602481018a90526001600160a01b03909116906367b4613590604401600060405180830381600087803b158015611cfb57600080fd5b505af1158015611d0f573d6000803e3d6000fd5b505050505b8660046000828254611d269190614b1c565b9091555050336000908152600b602052604081208054899290611d4a908490614b1c565b9091555050604051601090611d60908390614ab4565b90815260200160405180910390205460001415611e605781600d82604051611d889190614ab4565b90815260200160405180910390208190555081600e82604051611dab9190614ab4565b90815260200160405180910390208190555086601082604051611dce9190614ab4565b90815260200160405180910390206000828254611deb9190614b1c565b92505081905550600160066000828254611e059190614b1c565b909155505060408051898152602081018990528715158183015242606082015260006080820152905133917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a2611f68565b611e6a3389612a12565b15611ea65760405162461bcd60e51b815260206004820152600c60248201526b1c1858dac8195e1c1a5c995960a21b604482015260640161118a565b611eb233896001614433565b86601082604051611ec39190614ab4565b90815260200160405180910390206000828254611ee09190614b1c565b92505081905550336001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c8989601085604051611f249190614ab4565b90815260408051602092819003830181205494815291820192909252908101919091528815156060820152426080820152600060a082015260c00160405180910390a25b8515611fde5783611f793342612807565b1015611fb45760405162461bcd60e51b815260206004820152600a6024820152690dcdee840cadcdeeaced60b31b604482015260640161118a565b336000908152600c602052604081208054869290611fd3908490614b1c565b909155506121779050565b600061271060085486611ff19190614afd565b611ffb9190614b34565b905080156120ad57600254600a546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd90606401602060405180830381600087803b15801561205957600080fd5b505af115801561206d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120919190614a74565b6120ad5760405162461bcd60e51b815260040161118a90614bbc565b80851115612175576002546001600160a01b03166323b872dd33306120d2858a614ae6565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561212157600080fd5b505af1158015612135573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121599190614a74565b6121755760405162461bcd60e51b815260040161118a90614bbc565b505b600a5461218d906001600160a01b03168661435b565b843411156121a8576121a8336121a38734614ae6565b61435b565b5050505050505050565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156121f657600080fd5b505afa15801561220a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222e9190614be5565b905090565b3360009081526018602052604081205460ff1661227f5760405162461bcd60e51b815260206004820152600a6024820152696e6f207365727669636560b01b604482015260640161118a565b60008481526015602052604090205460ff166122ad5760405162461bcd60e51b815260040161118a90614b71565b60006122b98686613370565b905083600460008282546122cd9190614b1c565b90915550506001600160a01b0386166000908152600b6020526040812080548692906122fa908490614b1c565b92505081905550836010826040516123129190614ab4565b9081526020016040518091039020600082825461232f9190614b1c565b92505081905550836010826040516123479190614ab4565b90815260200160405180910390205414156124205742600d8260405161236d9190614ab4565b9081526040519081900360200190205582612388574261238a565b825b600e8260405161239a9190614ab4565b90815260200160405180910390208190555083600660008282546123be9190614b1c565b9091555050604080518681526020810186905260008183015242606082015233608082015290516001600160a01b038816917fa51b747dfa9bebb8d1d32fba407825193ab4533268532b9b8601085eca446450919081900360a00190a26124ab565b61242c33866001614433565b856001600160a01b03167f3a16c3cce042ab54f3069c61db28dea0ee4db01215ed281f1c74ead0649a8f8c86866010856040516124699190614ab4565b9081526040805160209281900383018120549481529182019290925290810191909152600060608201524260808201523360a082015260c00160405180910390a25b50600195945050505050565b6000806124c383611686565b90506000600e6124d38686613370565b6040516124e09190614ab4565b9081526020016040518091039020549050806000141561250257509050611265565b61250c858561314d565b1561251957509050611265565b6125238585612a12565b1561253357600092505050611265565b600061253e85612a89565b905060004261254d8385614b1c565b6125579190614ae6565b9050816125648583614afd565b61256e9190614b34565b979650505050505050565b60006112658260006142d0565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156125d257600080fd5b505afa1580156125e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061260a9190614a35565b6000546001600160a01b0316158061269f5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061264f9084903390600401614a58565b60206040518083038186803b15801561266757600080fd5b505afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f9190614a74565b6126bb5760405162461bcd60e51b815260040161118a90614a91565b6127108211156126fd5760405162461bcd60e51b815260206004820152600d60248201526c696e76616c69642076616c756560981b604482015260640161118a565b60088290556040518281527f774b9fb928c71ca72bafa8771a63e9d00ea63b021cfd8cdc2ce4f003094c5d5890602001611846565b600080546001600160a01b031615806127c85750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906127789084903390600401614a58565b60206040518083038186803b15801561279057600080fd5b505afa1580156127a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c89190614a74565b6127e45760405162461bcd60e51b815260040161118a90614a91565b50600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166000908152600c602052604081205461282a8484611852565b6112629190614ae6565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561288057600080fd5b505afa158015612894573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128b89190614a35565b6000546001600160a01b0316158061294d5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906128fd9084903390600401614a58565b60206040518083038186803b15801561291557600080fd5b505afa158015612929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294d9190614a74565b6129695760405162461bcd60e51b815260040161118a90614a91565b600083815260166020908152604091829020805460ff19168515159081179091558251868152918201527f754a64d46ab9a313f3f3cbae897a6b9d8d703593379a9ffe0035ace48dceeb6691015b60405180910390a1505050565b60006129d3838342600161142d565b60136129df8585613370565b6040516129ec9190614ab4565b9081526020016040518091039020546112629190614b1c565b60006112658260096142d0565b600080612a1f8484613370565b90506000600e82604051612a339190614ab4565b90815260200160405180910390205490508060001415612a5857600192505050611265565b612a6184613765565b612a6a85612a89565b612a749083614b1c565b612a7e9190614b1c565b421195945050505050565b60006112658260076142d0565b60006013611b358484613370565b60035460009081906001600160a01b03163314612ac15733612ac3565b325b90506000612ad18287613370565b90506000600f82604051612ae59190614ab4565b90815260200160405180910390205460001415612b2057600d82604051612b0c9190614ab4565b908152602001604051809103902054612b40565b600f82604051612b309190614ab4565b9081526020016040518091039020545b9050612b4c8388611693565b612b875760405162461bcd60e51b815260206004820152600c60248201526b191bd95cdb9d08195e1a5cdd60a21b604482015260640161118a565b612b918388612a12565b15612bcd5760405162461bcd60e51b815260206004820152600c60248201526b1c1858dac8195e1c1a5c995960a21b604482015260640161118a565b612bd7838861314d565b15612c0f5760405162461bcd60e51b8152602060048201526008602482015267706173742064756560c01b604482015260640161118a565b42861115612c4f5760405162461bcd60e51b815260206004820152600d60248201526c06261642074696d657374616d7609c1b604482015260640161118a565b85612c5c82610384614b1c565b10612c945760405162461bcd60e51b81526020600482015260086024820152673a37b79039b7b7b760c11b604482015260640161118a565b6000612ca3848989600161142d565b905060008111612ce15760405162461bcd60e51b81526020600482015260096024820152681b9bc81c995dd85c9960ba1b604482015260640161118a565b6002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a082319060240160206040518083038186803b158015612d2457600080fd5b505afa158015612d38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d5c9190614be5565b1015612d995760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b604482015260640161118a565b6000612da489613f4e565b612dad8a6139d9565b612db79084614afd565b612dc19190614b34565b905080341015612de35760405162461bcd60e51b815260040161118a90614b97565b87600f85604051612df49190614ab4565b90815260200160405180910390208190555081601385604051612e179190614ab4565b90815260200160405180910390206000828254612e349190614b1c565b925050819055506000601285604051612e4d9190614ab4565b9081526040805160209281900383018120939093558b83529082018490526001600160a01b038716917f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a910160405180910390a2336000908152600c602052604090205415612f2f57336000908152600c6020526040902054821015612f0257336000908152600c6020526040902054612ee8908390614ae6565b336000908152600c60205260408120919091559150612f2f565b336000908152600c6020526040902054612f1c9083614ae6565b336000908152600c602052604081205591505b612f3b338a6000614433565b6003546001600160a01b031615612faf5760035460405163f4888a2160e01b81526001600160a01b039091169063f4888a2190612f7c90879060040161498d565b600060405180830381600087803b158015612f9657600080fd5b505af1158015612faa573d6000803e3d6000fd5b505050505b81156130cd576001600160a01b0387161561302b576040516330d6a97560e01b81526001600160a01b038681166004830152602482018490528816906330d6a97590604401600060405180830381600087803b15801561300e57600080fd5b505af1158015613022573d6000803e3d6000fd5b505050506130cd565b60025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b15801561307957600080fd5b505af115801561308d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b19190614a74565b6130cd5760405162461bcd60e51b815260040161118a90614bbc565b6009546130e3906001600160a01b03168261435b565b6130eb614623565b80156130f657508034115b1561310957613109336121a38334614ae6565b98975050505050505050565b60008060015b600754811161189b5761312f858286611647565b6131399083614b1c565b91508061314581614b56565b91505061311b565b60008061315a8484613370565b90506000600e8260405161316e9190614ab4565b908152602001604051809103902054905061318884612a89565b612a7e9082614b1c565b600061319e8383613ef7565b6131a783613b85565b6112629190614afd565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131fd57600080fd5b505afa158015613211573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132359190614a35565b6000546001600160a01b031615806132ca5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f69061327a9084903390600401614a58565b60206040518083038186803b15801561329257600080fd5b505afa1580156132a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ca9190614a74565b6132e65760405162461bcd60e51b815260040161118a90614a91565b600083116133065760405162461bcd60e51b815260040161118a90614b71565b6000838152601560205260409020805460ff19168315151790556007548311801561332e5750815b156133395760078390555b6040805184815283151560208201527f6f5d3c00ffa60404dde260f3251925e7a1b0e75603ddf7a1b15002e90e8ff9e091016129b7565b6060600082613380576001613382565b825b604080516bffffffffffffffffffffffff19606088901b1660208201526001600160e01b031960e084901b166034820152600160c01b60388201529192500160405160208183030381529060405291505092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561342557600080fd5b505afa158015613439573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061345d9190614a35565b6000546001600160a01b031615806134f25750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906134a29084903390600401614a58565b60206040518083038186803b1580156134ba57600080fd5b505afa1580156134ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134f29190614a74565b61350e5760405162461bcd60e51b815260040161118a90614a91565b6000821161351b57600080fd5b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561356d57600080fd5b505af1158015613581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135a59190614a74565b6135c15760405162461bcd60e51b815260040161118a90614bbc565b5050565b60006112658260026142d0565b60006135de3383611230565b6136155760405162461bcd60e51b815260206004820152600860248201526763616e742070617960c01b604482015260640161118a565b61362133836001614433565b600061362d3384613370565b9050600061363b3385613ef7565b61364485613b85565b61364e9190614afd565b9050803410156136705760405162461bcd60e51b815260040161118a90614b97565b61367984612a89565b600e836040516136899190614ab4565b9081526020016040518091039020546136a29190614b1c565b600e836040516136b29190614ab4565b908152602001604051809103902081905550336001600160a01b03167fdf9a51129930649214df58f542322c245372c6f2fa6fc3c9b40d927c597cd23085600e856040516137009190614ab4565b90815260405190819003602001812054613721928252602082015260400190565b60405180910390a2600a5461373f906001600160a01b03168261435b565b613747614623565b801561375257508034115b1561167f5761167f336121a38334614ae6565b60006112658260086142d0565b60006011611b358484613370565b6000600e611b358484613370565b60008060015b60075481116137d5576137a78482611230565b156137c3576137b68482613192565b6137c09083614b1c565b91505b806137cd81614b56565b915050613794565b5092915050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561382857600080fd5b505afa15801561383c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138609190614a35565b6000546001600160a01b031615806138f55750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906138a59084903390600401614a58565b60206040518083038186803b1580156138bd57600080fd5b505afa1580156138d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138f59190614a74565b6139115760405162461bcd60e51b815260040161118a90614a91565b60025460405163095ea7b360e01b81526001600160a01b038581166004830152602482018590529091169063095ea7b390604401602060405180830381600087803b15801561395f57600080fd5b505af1158015613973573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139979190614a74565b6139d45760405162461bcd60e51b815260206004820152600e60248201526d185c1c1c9bdd994819985a5b195960921b604482015260640161118a565b505050565b60006112658260056142d0565b60008054906101000a90046001600160a01b03166001600160a01b0316630fe175bb6040518163ffffffff1660e01b815260040160206040518083038186803b158015613a3257600080fd5b505afa158015613a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a6a9190614a35565b6000546001600160a01b03161580613aff5750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613aaf9084903390600401614a58565b60206040518083038186803b158015613ac757600080fd5b505afa158015613adb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aff9190614a74565b613b1b5760405162461bcd60e51b815260040161118a90614a91565b6001600160a01b038316600081815260186020908152604091829020805460ff19168615159081179091558251938452908301527fea782fa1fcb250a935b6bf028374e06a580a12523d2befc1c2254a3cd3ef378091016129b7565b60006010611b358484613370565b60006112658260046142d0565b6002600155336000908152600b6020526040902054613bde5760405162461bcd60e51b81526020600482015260086024820152676e6f206e6f64657360c01b604482015260640161118a565b3460015b6007548111613c32576000613bfa338387600161142d565b90508015613c1f576000613c0f838787612aa4565b9050613c1b8185614ae6565b9350505b5080613c2a81614b56565b915050613be2565b508015613c4357613c43338261435b565b50506001805550565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c9857600080fd5b505afa158015613cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613cd09190614a35565b6000546001600160a01b03161580613d655750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f690613d159084903390600401614a58565b60206040518083038186803b158015613d2d57600080fd5b505afa158015613d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d659190614a74565b613d815760405162461bcd60e51b815260040161118a90614a91565b60008211613d8e57600080fd5b6002546040516370a0823160e01b815230600482015283916001600160a01b0316906370a082319060240160206040518083038186803b158015613dd157600080fd5b505afa158015613de5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e099190614be5565b1015613e465760405162461bcd60e51b815260206004820152600c60248201526b6f7665722062616c616e636560a01b604482015260640161118a565b60025460405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529091169063a9059cbb90604401602060405180830381600087803b158015613e9457600080fd5b505af1158015613ea8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ecc9190614a74565b6139d45760405162461bcd60e51b815260040161118a90614bbc565b6000611262838342600161142d565b600080613f048484613370565b9050601181604051613f169190614ab4565b908152602001604051809103902054601082604051613f359190614ab4565b90815260200160405180910390205461163f9190614ae6565b60006112658260066142d0565b6003546000906001600160a01b0316613f765750600061167f565b6000613f828585613370565b90506000600f82604051613f969190614ab4565b90815260200160405180910390205460001415613fd157600d82604051613fbd9190614ab4565b908152602001604051809103902054613ff1565b600f82604051613fe19190614ab4565b9081526020016040518091039020545b600354604051634ac21a6960e11b81526001600160a01b03898116600483015260248201899052604482018490526064820188905292935091169063958434d29060840160206040518083038186803b15801561404d57600080fd5b505afa158015614061573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140859190614be5565b9695505050505050565b60008054906101000a90046001600160a01b03166001600160a01b0316637c7c7c3c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156140db57600080fd5b505afa1580156140ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141139190614a35565b6000546001600160a01b031615806141a85750600054604051634f4bdc7b60e11b81526001600160a01b0390911690639e97b8f6906141589084903390600401614a58565b60206040518083038186803b15801561417057600080fd5b505afa158015614184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141a89190614a74565b6141c45760405162461bcd60e51b815260040161118a90614a91565b6001600160a01b0382166141d757600080fd5b600a80546001600160a01b0319166001600160a01b0384169081179091556040519081527f6fc8e7a1c2484c662808b4ca8010d816b18923abab6769fa48a21eb5ccf6e07c90602001611846565b600060106142338484613370565b6040516142409190614ab4565b9081526020016040518091039020546131a783612579565b6000806142658484613370565b90506000600e826040516142799190614ab4565b9081526020016040518091039020549050600061429585612a89565b905060006142a286612a05565b6142ac9083614afd565b6142b69042614b1c565b9050806142c38385614b1c565b1015979650505050505050565b60008281526016602052604081205460ff1680156143065750600083815260176020908152604080832085845290915290205415155b61433d5760008281527fd840e16649f6b9a295d95876f4633d3a6b10b55e8162971cf78afd886d5ec89b6020526040902054611262565b50600091825260176020908152604080842092845291905290205490565b804710156143a25760405162461bcd60e51b8152602060048201526014602482015273696e73756666696369656e742062616c616e636560601b604482015260640161118a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146143ef576040519150601f19603f3d011682016040523d82523d6000602084013e6143f4565b606091505b50509050806139d45760405162461bcd60e51b815260206004820152600b60248201526a1cd95b990819985a5b195960aa1b604482015260640161118a565b600061443f8484613370565b905060006013826040516144539190614ab4565b90815260200160405180910390205490506000614473868642600061142d565b905060006144818284614b1c565b9050600061448e87612579565b9050600061449c8284614b34565b905060006011876040516144b09190614ab4565b90815260200160405180910390205482116144cc5760006144f6565b6011876040516144dc9190614ab4565b908152602001604051809103902054826144f69190614ae6565b90508715614543578460128860405161450f9190614ab4565b90815260200160405180910390208190555042600f886040516145329190614ab4565b908152604051908190036020019020555b8015614617578060118860405161455a9190614ab4565b908152602001604051809103902060008282546145779190614b1c565b9091555061458790508382614afd565b6014886040516145979190614ab4565b908152602001604051809103902060008282546145b49190614b1c565b9250508190555080600560008282546145cd9190614b1c565b9091555050604080518a8152602081018390526001600160a01b038c16917fd1ad6f13ecf90412417f16481b7455bda8aa6ec0133a68cdab069f9b7bd623f9910160405180910390a25b50505050505050505050565b600061463160015460021490565b15801561222e57505033321490565b6001600160a01b038116811461465557600080fd5b50565b6000806000806080858703121561466e57600080fd5b843561467981614640565b9350602085013561468981614640565b9250604085013561469981614640565b915060608501356146a981614640565b939692955090935050565b600080604083850312156146c757600080fd5b82356146d281614640565b946020939093013593505050565b6000602082840312156146f257600080fd5b5035919050565b60008060006060848603121561470e57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561473757600080fd5b813561167f81614640565b801515811461465557600080fd5b6000806000806080858703121561476657600080fd5b843561477181614640565b9350602085013592506040850135915060608501356146a981614742565b6000806000606084860312156147a457600080fd5b83356147af81614640565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156147ec57600080fd5b813567ffffffffffffffff8082111561480457600080fd5b818401915084601f83011261481857600080fd5b81358181111561482a5761482a6147c4565b604051601f8201601f19908116603f01168101908382118183101715614852576148526147c4565b8160405282815287602084870101111561486b57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806000606084860312156148a057600080fd5b833592506020840135915060408401356148b981614742565b809150509250925092565b600080600080608085870312156148da57600080fd5b84356148e581614640565b966020860135965060408601359560600135945092505050565b6000806040838503121561491257600080fd5b82359150602083013561492481614742565b809150509250929050565b60008060006060848603121561494457600080fd5b833592506020840135915060408401356148b981614640565b60005b83811015614978578181015183820152602001614960565b83811115614987576000848401525b50505050565b60208152600082518060208401526149ac81604085016020870161495d565b601f01601f19169190910160400192915050565b600080604083850312156149d357600080fd5b50508035926020909101359150565b600080604083850312156149f557600080fd5b8235614a0081614640565b9150602083013561492481614742565b60008060408385031215614a2357600080fd5b82359150602083013561492481614640565b600060208284031215614a4757600080fd5b815160ff8116811461167f57600080fd5b60ff9290921682526001600160a01b0316602082015260400190565b600060208284031215614a8657600080fd5b815161167f81614742565b6020808252600990820152686e6f2061636365737360b81b604082015260600190565b60008251614ac681846020870161495d565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b600082821015614af857614af8614ad0565b500390565b6000816000190483118215151615614b1757614b17614ad0565b500290565b60008219821115614b2f57614b2f614ad0565b500190565b600082614b5157634e487b7160e01b600052601260045260246000fd5b500490565b6000600019821415614b6a57614b6a614ad0565b5060010190565b6020808252600c908201526b696e76616c6964207479706560a01b604082015260600190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b600060208284031215614bf757600080fd5b505191905056fea2646970667358221220bf6170dc808338187998a59720019677f968e3b8cbb897cdbbf47e59d04ecff664736f6c63430008090033
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.