ETH Price: $3,493.04 (+4.31%)

Contract

0x545496300D62c95E9d712B6dD2f010D1C256647F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040137539432021-12-06 18:45:491084 days ago1638816349IN
 Create: StrongNFTBonusV8
0 ETH0.6259995180

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrongNFTBonusV8

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : StrongNFTBonusV8.sol
//SPDX-License-Identifier: Unlicensed
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import "./interfaces/ServiceInterface.sol";
import "./interfaces/IServiceV18.sol";
import "./interfaces/IMultiNode.sol";
import "./interfaces/IERC1155Preset.sol";
import "./interfaces/StrongNFTBonusLegacyInterface.sol";
import "./interfaces/IStrongPool.sol";
import "./lib/SafeMath.sol";
import "./lib/ERC1155Receiver.sol";

contract StrongNFTBonusV8 {

  using SafeMath for uint256;

  event Staked(address indexed sender, uint256 tokenId, uint128 nodeId, uint256 block);
  event Unstaked(address indexed sender, uint256 tokenId, uint128 nodeId, uint256 block);

  ServiceInterface public CService;
  IERC1155Preset public CERC1155;
  StrongNFTBonusLegacyInterface public CStrongNFTBonus;

  bool public initDone;

  address public serviceAdmin;
  address public superAdmin;

  string[] public nftBonusNames;
  mapping(string => uint256) public nftBonusLowerBound;
  mapping(string => uint256) public nftBonusUpperBound;
  mapping(string => uint256) public nftBonusValue;
  mapping(string => uint256) public nftBonusEffectiveBlock;

  mapping(uint256 => address) public nftIdStakedToEntity;
  mapping(uint256 => uint128) public nftIdStakedToNodeId;
  mapping(uint256 => uint256) public nftIdStakedAtBlock;
  mapping(address => mapping(uint128 => uint256)) public entityNodeStakedNftId;

  mapping(bytes4 => bool) private _supportedInterfaces;

  mapping(string => uint8) public nftBonusNodesLimit;
  mapping(uint256 => uint8) public nftIdStakedToNodesCount;
  mapping(uint128 => uint256) public nodeIdStakedAtBlock;
  mapping(address => uint256[]) public entityStakedNftIds;

  mapping(address => mapping(uint128 => uint256)) public entityNodeStakedAtBlock;

  mapping(address => bool) private serviceContracts;
  mapping(address => mapping(address => mapping(uint128 => uint256))) public entityServiceNodeStakedNftId;
  mapping(address => mapping(address => mapping(uint128 => uint256))) public entityServiceNodeStakedAtBlock;

  event StakedToNode(address indexed sender, uint256 tokenId, uint128 nodeId, uint256 block, address serviceContract);
  event UnstakedFromNode(address indexed sender, uint256 tokenId, uint128 nodeId, uint256 block, address serviceContract);

  mapping(address => bool) private serviceUsesTime;
  mapping(address => mapping(string => uint256)) public serviceNftBonusEffectiveAt;
  mapping(address => mapping(string => uint256)) public serviceNftBonusValue;
  mapping(address => mapping(address => mapping(uint128 => uint256))) public entityServiceNodeStakedAtTimestamp;

  function init(address serviceContract, address nftContract, address strongNFTBonusContract, address serviceAdminAddress, address superAdminAddress) external {
    require(initDone == false, "init done");

    _registerInterface(0x01ffc9a7);
    _registerInterface(
      ERC1155Receiver(0).onERC1155Received.selector ^
      ERC1155Receiver(0).onERC1155BatchReceived.selector
    );

    serviceAdmin = serviceAdminAddress;
    superAdmin = superAdminAddress;
    CService = ServiceInterface(serviceContract);
    CERC1155 = IERC1155Preset(nftContract);
    CStrongNFTBonus = StrongNFTBonusLegacyInterface(strongNFTBonusContract);
    initDone = true;
  }

  //
  // Getters
  // -------------------------------------------------------------------------------------------------------------------

  function isNftStaked(uint256 _nftId) external view returns (bool) {
    return nftIdStakedToNodeId[_nftId] != 0 || nftIdStakedToNodesCount[_nftId] > 0;
  }

  function isNftStakedLegacy(uint256 _nftId) external view returns (bool) {
    return CStrongNFTBonus.isNftStaked(_nftId);
  }

  function getStakedNftId(address _entity, uint128 _nodeId, address _serviceContract) public view returns (uint256) {
    bool isEthNode = isEthereumNode(_serviceContract);
    uint256 stakedNftIdNew = entityServiceNodeStakedNftId[_entity][_serviceContract][_nodeId];
    uint256 stakedNftId = isEthNode ? entityNodeStakedNftId[_entity][_nodeId] : 0;
    uint256 stakedNftIdLegacy = isEthNode ? CStrongNFTBonus.getStakedNftId(_entity, _nodeId) : 0;

    return stakedNftIdNew != 0 ? stakedNftIdNew : (stakedNftId != 0 ? stakedNftId : stakedNftIdLegacy);
  }

  function getStakedNftIds(address _entity) external view returns (uint256[] memory) {
    return entityStakedNftIds[_entity];
  }

  function getStakedNftBonusName(address _entity, uint128 _nodeId, address _serviceContract) external view returns (string memory) {
    uint256 nftId = getStakedNftId(_entity, _nodeId, _serviceContract);
    return getNftBonusName(nftId);
  }

  function getNftBonusNames() external view returns (string[] memory) {
    return nftBonusNames;
  }

  function getNftNodesLeft(uint256 _nftId) external view returns (uint256) {
    return nftBonusNodesLimit[getNftBonusName(_nftId)] - nftIdStakedToNodesCount[_nftId];
  }

  function getNftBonusName(uint256 _nftId) public view returns (string memory) {
    for (uint8 i = 0; i < nftBonusNames.length; i++) {
      if (_nftId >= nftBonusLowerBound[nftBonusNames[i]] && _nftId <= nftBonusUpperBound[nftBonusNames[i]]) {
        return nftBonusNames[i];
      }
    }

    return "";
  }

  function getBonus(address _entity, uint128 _nodeId, uint256 _from, uint256 _to) external view returns (uint256) {
    return getBonusValue(_entity, _nodeId, _from, _to, 0);
  }

  function getBonusValue(address _entity, uint128 _nodeId, uint256 _from, uint256 _to, uint256 _bonusValue) public view returns (uint256) {
    address serviceContract = msg.sender;
    require(serviceContracts[serviceContract], "service doesnt exist");

    uint256 nftId = getStakedNftId(_entity, _nodeId, serviceContract);
    string memory bonusName = getNftBonusName(nftId);
    if (keccak256(abi.encode(bonusName)) == keccak256(abi.encode(""))) return 0;

    uint256 stakedAt = 0;
    if (serviceUsesTime[serviceContract]) {
      stakedAt = entityServiceNodeStakedAtTimestamp[_entity][serviceContract][_nodeId];
    }
    else {
      stakedAt = entityServiceNodeStakedAtBlock[_entity][serviceContract][_nodeId] > 0
      ? entityServiceNodeStakedAtBlock[_entity][serviceContract][_nodeId]
      : (entityNodeStakedAtBlock[_entity][_nodeId] > 0 ? entityNodeStakedAtBlock[_entity][_nodeId] : nftIdStakedAtBlock[nftId]);
    }

    uint256 bonusValue = _bonusValue != 0 ? _bonusValue : serviceNftBonusValue[serviceContract][bonusName] > 0
    ? serviceNftBonusValue[serviceContract][bonusName] : nftBonusValue[bonusName];

    uint256 effectiveAt = serviceNftBonusEffectiveAt[serviceContract][bonusName] > 0
    ? serviceNftBonusEffectiveAt[serviceContract][bonusName] : nftBonusEffectiveBlock[bonusName];

    uint256 startFrom = stakedAt > _from ? stakedAt : _from;
    if (startFrom < effectiveAt) {
      startFrom = effectiveAt;
    }

    if (stakedAt == 0 && keccak256(abi.encode(bonusName)) == keccak256(abi.encode("BRONZE"))) {
      return CStrongNFTBonus.getBonus(_entity, _nodeId, startFrom, _to);
    }

    if (nftId == 0) return 0;
    if (stakedAt == 0) return 0;
    if (effectiveAt == 0) return 0;
    if (startFrom >= _to) return 0;
    if (CERC1155.balanceOf(address(this), nftId) == 0) return 0;

    return _to.sub(startFrom).mul(bonusValue);
  }

  function isNftStaked(address _entity, uint256 _nftId, uint128 _nodeId, address _serviceContract) public view returns (bool) {
    return (isEthereumNode(_serviceContract) && entityNodeStakedNftId[_entity][_nodeId] == _nftId)
    || entityServiceNodeStakedNftId[_entity][_serviceContract][_nodeId] == _nftId;
  }

  function isEthereumNode(address _serviceContract) public view returns (bool) {
    return _serviceContract == address(CService);
  }

  //
  // Staking
  // -------------------------------------------------------------------------------------------------------------------

  function stakeNFT(uint256 _nftId, uint128 _nodeId, address _serviceContract) external payable {
    string memory bonusName = getNftBonusName(_nftId);
    require(keccak256(abi.encode(bonusName)) != keccak256(abi.encode("")), "not eligible");
    require(CERC1155.balanceOf(msg.sender, _nftId) != 0
      || (CERC1155.balanceOf(address(this), _nftId) != 0 && nftIdStakedToEntity[_nftId] == msg.sender), "not enough");
    require(nftIdStakedToNodesCount[_nftId] < nftBonusNodesLimit[bonusName], "over limit");
    require(serviceContracts[_serviceContract], "service doesnt exist");
    require(getStakedNftId(msg.sender, _nodeId, _serviceContract) == 0, "already staked");
    if (serviceUsesTime[_serviceContract]) require(IMultiNode(_serviceContract).doesNodeExist(msg.sender, uint(_nodeId)), "node doesnt exist");
    else require(IServiceV18(_serviceContract).doesNodeExist(msg.sender, _nodeId), "node doesnt exist");

    entityServiceNodeStakedNftId[msg.sender][_serviceContract][_nodeId] = _nftId;
    nftIdStakedToEntity[_nftId] = msg.sender;
    nftIdStakedToNodesCount[_nftId] += 1;

    if (serviceUsesTime[_serviceContract]) {
      entityServiceNodeStakedAtTimestamp[msg.sender][_serviceContract][_nodeId] = block.timestamp;
    }
    else {
      entityServiceNodeStakedAtBlock[msg.sender][_serviceContract][_nodeId] = block.number;
    }

    bool alreadyExists = false;
    for (uint8 i = 0; i < entityStakedNftIds[msg.sender].length; i++) {
      if (entityStakedNftIds[msg.sender][i] == _nftId) {
        alreadyExists = true;
        break;
      }
    }
    if (!alreadyExists) {
      entityStakedNftIds[msg.sender].push(_nftId);
    }

    if (CERC1155.balanceOf(address(this), _nftId) == 0) {
      CERC1155.safeTransferFrom(msg.sender, address(this), _nftId, 1, bytes(""));
    }

    emit StakedToNode(msg.sender, _nftId, _nodeId, serviceUsesTime[_serviceContract] ? block.timestamp : block.number, _serviceContract);
  }

  function migrateNFT(address _entity, uint128 _fromNodeId, uint128 _toNodeId, address _toServiceContract) external {
    address fromServiceContract = address(CService);
    uint256 nftId = getStakedNftId(_entity, _fromNodeId, fromServiceContract);

    require(msg.sender == fromServiceContract);
    require(serviceContracts[_toServiceContract], "service doesnt exist");
    require(IServiceV18(_toServiceContract).doesNodeExist(_entity, _toNodeId), "node doesnt exist");
    require(getStakedNftId(_entity, _toNodeId, _toServiceContract) == 0, "already staked");

    bool alreadyExists = false;
    for (uint8 i = 0; i < entityStakedNftIds[_entity].length; i++) {
      if (entityStakedNftIds[_entity][i] == nftId) {
        alreadyExists = true;
        break;
      }
    }

    if (nftId == 0 || !alreadyExists) {
      return;
    }

    entityServiceNodeStakedNftId[_entity][fromServiceContract][_fromNodeId] = 0;
    entityNodeStakedNftId[_entity][_fromNodeId] = 0;

    entityServiceNodeStakedNftId[_entity][_toServiceContract][_toNodeId] = nftId;
    nftIdStakedToEntity[nftId] = _entity;

    entityServiceNodeStakedAtTimestamp[_entity][_toServiceContract][_toNodeId] = block.timestamp;

    emit UnstakedFromNode(_entity, nftId, _fromNodeId, block.number, fromServiceContract);
    emit StakedToNode(_entity, nftId, _toNodeId, serviceUsesTime[_toServiceContract] ? block.timestamp : block.number, _toServiceContract);
  }

  function unStakeNFT(uint256 _nftId, uint128 _nodeId, uint256 _blockNumber, address _serviceContract) external payable {
    require(isNftStaked(msg.sender, _nftId, _nodeId, _serviceContract), "wrong node");
    require(nftIdStakedToEntity[_nftId] != address(0), "not staked");
    require(nftIdStakedToEntity[_nftId] == msg.sender, "not staker");
    require(serviceContracts[_serviceContract], "service doesnt exist");

    bool hasNodeExpired = serviceUsesTime[_serviceContract]
      ? IMultiNode(_serviceContract).hasNodeExpired(msg.sender, uint(_nodeId))
      : IServiceV18(_serviceContract).hasNodeExpired(msg.sender, _nodeId);

    if (!hasNodeExpired) {
      if (serviceUsesTime[_serviceContract]) IMultiNode(_serviceContract).claim{value : msg.value}(_nodeId, _blockNumber, address(0));
      else IServiceV18(_serviceContract).claim{value : msg.value}(_nodeId, _blockNumber, false);
    }

    entityServiceNodeStakedNftId[msg.sender][_serviceContract][_nodeId] = 0;
    nftIdStakedToNodeId[_nftId] = 0;

    if (isEthereumNode(_serviceContract)) {
      entityNodeStakedNftId[msg.sender][_nodeId] = 0;
    }

    if (nftIdStakedToNodesCount[_nftId] > 0) {
      nftIdStakedToNodesCount[_nftId] -= 1;
    }

    if (nftIdStakedToNodesCount[_nftId] == 0) {
      nftIdStakedToEntity[_nftId] = address(0);

      for (uint8 i = 0; i < entityStakedNftIds[msg.sender].length; i++) {
        if (entityStakedNftIds[msg.sender][i] == _nftId) {
          _deleteIndex(entityStakedNftIds[msg.sender], i);
          break;
        }
      }

      CERC1155.safeTransferFrom(address(this), msg.sender, _nftId, 1, bytes(""));
    }

    emit UnstakedFromNode(msg.sender, _nftId, _nodeId, _blockNumber, _serviceContract);
  }

  //
  // Admin
  // -------------------------------------------------------------------------------------------------------------------

  function updateServiceBonus(string memory _name, uint256 _value, uint256 _effectiveAt, address _serviceContract) external {
    require(msg.sender == serviceAdmin || msg.sender == superAdmin, "not admin");

    serviceNftBonusValue[_serviceContract][_name] = _value;
    serviceNftBonusEffectiveAt[_serviceContract][_name] = _effectiveAt;
  }

  function updateBonusLimits(string memory _name, uint256 _lowerBound, uint256 _upperBound, uint8 _nodesLimit) external {
    require(msg.sender == serviceAdmin || msg.sender == superAdmin, "not admin");

    bool alreadyExists = false;
    for (uint8 i = 0; i < nftBonusNames.length; i++) {
      if (keccak256(abi.encode(nftBonusNames[i])) == keccak256(abi.encode(_name))) {
        alreadyExists = true;
      }
    }

    if (!alreadyExists) {
      nftBonusNames.push(_name);
    }

    nftBonusLowerBound[_name] = _lowerBound;
    nftBonusUpperBound[_name] = _upperBound;
    nftBonusNodesLimit[_name] = _nodesLimit;
  }

  function updateBonus(string memory _name, uint256 _lowerBound, uint256 _upperBound, uint256 _value, uint256 _block, uint8 _nodesLimit) external {
    require(msg.sender == serviceAdmin || msg.sender == superAdmin, "not admin");

    bool alreadyExists = false;
    for (uint8 i = 0; i < nftBonusNames.length; i++) {
      if (keccak256(abi.encode(nftBonusNames[i])) == keccak256(abi.encode(_name))) {
        alreadyExists = true;
      }
    }

    if (!alreadyExists) {
      nftBonusNames.push(_name);
    }

    nftBonusLowerBound[_name] = _lowerBound;
    nftBonusUpperBound[_name] = _upperBound;
    nftBonusValue[_name] = _value;
    nftBonusEffectiveBlock[_name] = _block != 0 ? _block : block.number;
    nftBonusNodesLimit[_name] = _nodesLimit;
  }

  function updateContracts(address _nftContract) external {
    require(msg.sender == superAdmin, "not admin");
    CERC1155 = IERC1155Preset(_nftContract);
  }

  function addServiceContract(address _contract, bool _useTime) external {
    require(msg.sender == superAdmin, "not admin");
    serviceContracts[_contract] = true;
    serviceUsesTime[_contract] = _useTime;
  }

  function removeServiceContract(address _contract) external {
    require(msg.sender == superAdmin, "not admin");
    serviceContracts[_contract] = false;
    serviceUsesTime[_contract] = false;
  }

  function updateServiceAdmin(address newServiceAdmin) external {
    require(msg.sender == superAdmin, "not admin");
    serviceAdmin = newServiceAdmin;
  }

  //
  // ERC1155 support
  // -------------------------------------------------------------------------------------------------------------------

  function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual returns (bytes4) {
    return this.onERC1155Received.selector;
  }

  function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) public virtual returns (bytes4) {
    return this.onERC1155BatchReceived.selector;
  }

  function supportsInterface(bytes4 interfaceId) public view returns (bool) {
    return _supportedInterfaces[interfaceId];
  }

  function _registerInterface(bytes4 interfaceId) internal virtual {
    require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
    _supportedInterfaces[interfaceId] = true;
  }

  function _deleteIndex(uint256[] storage array, uint256 index) internal {
    uint256 lastIndex = array.length.sub(1);
    uint256 lastEntry = array[lastIndex];
    if (index == lastIndex) {
      array.pop();
    } else {
      array[index] = lastEntry;
      array.pop();
    }
  }
}

File 2 of 12 : ServiceInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

interface ServiceInterface {
  function claimingFeeNumerator() external view returns(uint256);

  function claimingFeeDenominator() external view returns(uint256);

  function doesNodeExist(address entity, uint128 nodeId) external view returns (bool);

  function getNodeId(address entity, uint128 nodeId) external view returns (bytes memory);

  function getReward(address entity, uint128 nodeId) external view returns (uint256);

  function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) external view returns (uint256);

  function hasNodeExpired(address _entity, uint _nodeId) external view returns (bool);

  function isEntityActive(address entity) external view returns (bool);

  function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) external payable returns (uint256);
}

File 3 of 12 : IServiceV18.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

interface IServiceV18 {
  function doesNodeExist(address entity, uint128 nodeId) external view returns (bool);

  function hasNodeExpired(address entity, uint128 nodeId) external view returns (bool);

  function claim(uint128 nodeId, uint blockNumber, bool toStrongPool) external payable returns (uint);

  // @deprecated
  function isEntityActive(address entity) external view returns (bool);
}

File 4 of 12 : IMultiNode.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

interface IMultiNode {
  function doesNodeExist(address entity, uint nodeId) external view returns (bool);

  function hasNodeExpired(address entity, uint nodeId) external view returns (bool);

  function claim(uint nodeId, uint timestamp, address toStrongPool) external payable returns (uint);
}

File 5 of 12 : IERC1155Preset.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155Preset {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    /**
     * @dev Creates `amount` new tokens for `to`, of token type `id`.
     *
     * See {ERC1155-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 id, uint256 amount, bytes memory data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.
     */
    function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;

    function getOwnerIdByIndex(address owner, uint256 index) external view returns (uint256);

    function getOwnerIdIndex(address owner, uint256 id) external view returns (uint256);
}

File 6 of 12 : StrongNFTBonusLegacyInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

interface StrongNFTBonusLegacyInterface {
  function getBonus(address _entity, uint128 _nodeId, uint256 _fromBlock, uint256 _toBlock) external view returns (uint256);

  function getStakedNftId(address _entity, uint128 _nodeId) external view returns (uint256);

  function isNftStaked(uint256 _nftId) external view returns (bool);
}

File 7 of 12 : IStrongPool.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

interface IStrongPool {
  function mineFor(address miner, uint256 amount) external;
}

File 8 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    uint256 c = a + b;
    if (c < a) return (false, 0);
    return (true, c);
  }

  /**
   * @dev Returns the substraction of two unsigned integers, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    if (b > a) return (false, 0);
    return (true, a - b);
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
   *
   * _Available since v3.4._
   */
  function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) return (true, 0);
    uint256 c = a * b;
    if (c / a != b) return (false, 0);
    return (true, c);
  }

  /**
   * @dev Returns the division of two unsigned integers, with a division by zero flag.
   *
   * _Available since v3.4._
   */
  function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    if (b == 0) return (false, 0);
    return (true, a / b);
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
   *
   * _Available since v3.4._
   */
  function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
    if (b == 0) return (false, 0);
    return (true, a % b);
  }

  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   *
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");
    return c;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   *
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath: subtraction overflow");
    return a - b;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   *
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) return 0;
    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");
    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers, reverting on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   *
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0, "SafeMath: division by zero");
    return a / b;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * reverting when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   *
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0, "SafeMath: modulo by zero");
    return a % b;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * CAUTION: This function is deprecated because it requires allocating memory for the error
   * message unnecessarily. For custom revert reasons use {trySub}.
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   *
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    return a - b;
  }

  /**
   * @dev Returns the integer division of two unsigned integers, reverting with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * CAUTION: This function is deprecated because it requires allocating memory for the error
   * message unnecessarily. For custom revert reasons use {tryDiv}.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   *
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b > 0, errorMessage);
    return a / b;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * reverting with custom message when dividing by zero.
   *
   * CAUTION: This function is deprecated because it requires allocating memory for the error
   * message unnecessarily. For custom revert reasons use {tryMod}.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   *
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b > 0, errorMessage);
    return a % b;
  }
}

File 9 of 12 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../interfaces/IERC1155Receiver.sol";
import "./ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    constructor() internal {
        _registerInterface(
            ERC1155Receiver(address(0)).onERC1155Received.selector ^
            ERC1155Receiver(address(0)).onERC1155BatchReceived.selector
        );
    }
}

File 10 of 12 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC165.sol";

/**
 * _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {

    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        external
        returns(bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        external
        returns(bytes4);
}

File 11 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../interfaces/IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

File 12 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"nodeId","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"nodeId","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"},{"indexed":false,"internalType":"address","name":"serviceContract","type":"address"}],"name":"StakedToNode","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"nodeId","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"}],"name":"Unstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"nodeId","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"block","type":"uint256"},{"indexed":false,"internalType":"address","name":"serviceContract","type":"address"}],"name":"UnstakedFromNode","type":"event"},{"inputs":[],"name":"CERC1155","outputs":[{"internalType":"contract IERC1155Preset","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CService","outputs":[{"internalType":"contract ServiceInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CStrongNFTBonus","outputs":[{"internalType":"contract StrongNFTBonusLegacyInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bool","name":"_useTime","type":"bool"}],"name":"addServiceContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint128","name":"","type":"uint128"}],"name":"entityNodeStakedAtBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint128","name":"","type":"uint128"}],"name":"entityNodeStakedNftId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint128","name":"","type":"uint128"}],"name":"entityServiceNodeStakedAtBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint128","name":"","type":"uint128"}],"name":"entityServiceNodeStakedAtTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint128","name":"","type":"uint128"}],"name":"entityServiceNodeStakedNftId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"entityStakedNftIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"},{"internalType":"uint256","name":"_bonusValue","type":"uint256"}],"name":"getBonusValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"getNftBonusName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNftBonusNames","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"getNftNodesLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"getStakedNftBonusName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"getStakedNftId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"}],"name":"getStakedNftIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"serviceContract","type":"address"},{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"address","name":"strongNFTBonusContract","type":"address"},{"internalType":"address","name":"serviceAdminAddress","type":"address"},{"internalType":"address","name":"superAdminAddress","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initDone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"isEthereumNode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"isNftStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"isNftStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"isNftStakedLegacy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_fromNodeId","type":"uint128"},{"internalType":"uint128","name":"_toNodeId","type":"uint128"},{"internalType":"address","name":"_toServiceContract","type":"address"}],"name":"migrateNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nftBonusEffectiveBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nftBonusLowerBound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftBonusNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nftBonusNodesLimit","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nftBonusUpperBound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"nftBonusValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftIdStakedAtBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftIdStakedToEntity","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftIdStakedToNodeId","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftIdStakedToNodesCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"","type":"uint128"}],"name":"nodeIdStakedAtBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeServiceContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serviceAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"name":"serviceNftBonusEffectiveAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"name":"serviceNftBonusValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"stakeNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"superAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"uint256","name":"_blockNumber","type":"uint256"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"unStakeNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_lowerBound","type":"uint256"},{"internalType":"uint256","name":"_upperBound","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_block","type":"uint256"},{"internalType":"uint8","name":"_nodesLimit","type":"uint8"}],"name":"updateBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_lowerBound","type":"uint256"},{"internalType":"uint256","name":"_upperBound","type":"uint256"},{"internalType":"uint8","name":"_nodesLimit","type":"uint8"}],"name":"updateBonusLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftContract","type":"address"}],"name":"updateContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newServiceAdmin","type":"address"}],"name":"updateServiceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_effectiveAt","type":"uint256"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"updateServiceBonus","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50613df1806100206000396000f3fe6080604052600436106102e45760003560e01c806394d14a9b11610190578063c2c9b3c1116100dc578063d90766ca11610095578063f304e01d1161006f578063f304e01d146108f8578063f678b14114610918578063fc7ea8d114610938578063fed0a20e1461094d576102e4565b8063d90766ca146108a3578063da998dca146108c3578063f23a6e61146108d8576102e4565b8063c2c9b3c1146107d4578063c712d34a146107f4578063cb4dd51e14610816578063d287607814610836578063d4a8c08214610856578063d60444ff14610876576102e4565b8063ac3a760111610149578063b64ac8e411610123578063b64ac8e414610752578063b810484e14610772578063bc197c8114610792578063c153dc0b146107bf576102e4565b8063ac3a7601146106f2578063ad553eef14610712578063b07d9cbb14610732576102e4565b806394d14a9b146106325780639954a804146106525780639f4808da14610672578063a68b62e514610692578063a8306cf2146106b2578063a8936d59146106d2576102e4565b806339e3aea21161024f578063674edb721161020857806378592e74116101e257806378592e74146105b25780638202365f146105d25780638e9f2e32146105f2578063916db6eb14610612576102e4565b8063674edb721461054557806368b087e81461056557806372ab973f14610592576102e4565b806339e3aea2146104905780635571602b146104a3578063559b12fe146104c35780635ab9daf0146104f05780635ed44191146105105780636441d37914610530576102e4565b8063279958a9116102a1578063279958a9146103d957806329575f6a146103fb5780633183685b1461041d57806331e410a81461043d578063328f723314610450578063359ef75b14610470576102e4565b806301ffc9a7146102e957806304dc6ada1461031f57806313f934841461034c5780631f8e027b146103795780632034eb51146103995780632507cba5146103b9575b600080fd5b3480156102f557600080fd5b506103096103043660046134cd565b610962565b604051610316919061393e565b60405180910390f35b34801561032b57600080fd5b5061033f61033a3660046134f5565b610985565b6040516103169190613cdd565b34801561035857600080fd5b5061036c610367366004613676565b6109a2565b604051610316919061395e565b34801561038557600080fd5b50610309610394366004613676565b610b00565b3480156103a557600080fd5b5061033f6103b43660046133e8565b610b87565b3480156103c557600080fd5b5061033f6103d4366004613289565b611104565b3480156103e557600080fd5b506103f96103f4366004613075565b611132565b005b34801561040757600080fd5b5061041061117e565b60405161031691906137d7565b34801561042957600080fd5b5061033f610438366004613676565b61118d565b6103f961044b3660046136a6565b61119f565b34801561045c57600080fd5b5061030961046b366004613676565b61185e565b34801561047c57600080fd5b506103f961048b366004613090565b611896565b6103f961049e3660046136e3565b61194e565b3480156104af57600080fd5b506103f96104be366004613600565b611ea1565b3480156104cf57600080fd5b506104e36104de366004613075565b612037565b60405161031691906138fa565b3480156104fc57600080fd5b5061036c61050b366004613676565b6120a3565b34801561051c57600080fd5b5061033f61052b366004613438565b612149565b34801561053c57600080fd5b50610410612177565b34801561055157600080fd5b5061033f6105603660046134f5565b612186565b34801561057157600080fd5b506105856105803660046134f5565b6121a3565b6040516103169190613d13565b34801561059e57600080fd5b5061033f6105ad36600461365b565b6121c3565b3480156105be57600080fd5b5061033f6105cd366004613676565b6121d5565b3480156105de57600080fd5b506103096105ed366004613462565b612220565b3480156105fe57600080fd5b5061033f61060d3660046131a3565b6122aa565b34801561061e57600080fd5b5061033f61062d3660046132d7565b6122cd565b34801561063e57600080fd5b5061036c61064d36600461330b565b6122ea565b34801561065e57600080fd5b5061033f61066d3660046132d7565b612304565b34801561067e57600080fd5b5061041061068d366004613676565b612321565b34801561069e57600080fd5b5061033f6106ad36600461330b565b61233c565b3480156106be57600080fd5b506103096106cd366004613075565b612477565b3480156106de57600080fd5b5061033f6106ed3660046134f5565b61248b565b3480156106fe57600080fd5b5061033f61070d3660046131a3565b6124a8565b34801561071e57600080fd5b506103f961072d366004613075565b6124cb565b34801561073e57600080fd5b5061033f61074d3660046133a5565b612517565b34801561075e57600080fd5b506103f961076d366004613075565b612527565b34801561077e57600080fd5b506103f961078d366004613530565b612587565b34801561079e57600080fd5b506107b26107ad3660046130f9565b61263e565b6040516103169190613949565b3480156107cb57600080fd5b5061041061264f565b3480156107e057600080fd5b5061033f6107ef3660046134f5565b61265e565b34801561080057600080fd5b5061080961267b565b604051610316919061389a565b34801561082257600080fd5b506103f9610831366004613586565b612753565b34801561084257600080fd5b506103f9610851366004613252565b61293b565b34801561086257600080fd5b5061033f6108713660046131a3565b6129a8565b34801561088257600080fd5b50610896610891366004613676565b6129cb565b6040516103169190613c7c565b3480156108af57600080fd5b5061033f6108be366004613289565b6129e6565b3480156108cf57600080fd5b50610410612a14565b3480156108e457600080fd5b506107b26108f33660046131ed565b612a23565b34801561090457600080fd5b50610585610913366004613676565b612a34565b34801561092457600080fd5b506103f961093336600461334a565b612a49565b34801561094457600080fd5b50610410612d59565b34801561095957600080fd5b50610309612d68565b6001600160e01b031981166000908152600e602052604090205460ff165b919050565b805160208183018101805160078252928201919093012091525481565b606060005b60055460ff82161015610aea57600660058260ff16815481106109c657fe5b906000526020600020016040516109dd9190613767565b9081526020016040518091039020548310158015610a325750600760058260ff1681548110610a0857fe5b90600052602060002001604051610a1f9190613767565b9081526020016040518091039020548311155b15610ae25760058160ff1681548110610a4757fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610ad55780601f10610aaa57610100808354040283529160200191610ad5565b820191906000526020600020905b815481529060010190602001808311610ab857829003601f168201915b5050505050915050610980565b6001016109a7565b5050604080516020810190915260008152919050565b60025460405163328f723360e01b81526000916001600160a01b03169063328f723390610b31908590600401613cdd565b60206040518083038186803b158015610b4957600080fd5b505afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8191906134b1565b92915050565b3360008181526014602052604081205490919060ff16610bc25760405162461bcd60e51b8152600401610bb990613b32565b60405180910390fd5b6000610bcf88888461233c565b90506060610bdc826109a2565b9050604051602001610bed90613c20565b6040516020818303038152906040528051906020012081604051602001610c14919061395e565b604051602081830303815290604052805190602001201415610c3c57600093505050506110fb565b6001600160a01b03831660009081526017602052604081205460ff1615610c9a57506001600160a01b03808a166000908152601a6020908152604080832093871683529281528282206001600160801b038c16835290522054610d88565b6001600160a01b03808b16600090815260166020908152604080832093881683529281528282206001600160801b038d16835290522054610d4d576001600160a01b038a1660009081526013602090815260408083206001600160801b038d168452909152902054610d1a576000838152600c6020526040902054610d48565b6001600160a01b038a1660009081526013602090815260408083206001600160801b038d1684529091529020545b610d85565b6001600160a01b03808b16600090815260166020908152604080832093881683529281528282206001600160801b038d168352905220545b90505b600086610e29576001600160a01b0385166000908152601960205260408082209051610db590869061374b565b90815260200160405180910390205411610ded57600883604051610dd9919061374b565b908152602001604051809103902054610e24565b6001600160a01b038516600090815260196020526040908190209051610e1490859061374b565b9081526020016040518091039020545b610e2b565b865b905060008060186000886001600160a01b03166001600160a01b0316815260200190815260200160002085604051610e63919061374b565b90815260200160405180910390205411610e9b57600984604051610e87919061374b565b908152602001604051809103902054610ed2565b6001600160a01b038616600090815260186020526040908190209051610ec290869061374b565b9081526020016040518091039020545b905060008a8411610ee3578a610ee5565b835b905081811015610ef25750805b83158015610f495750604051602001610f0a90613aec565b6040516020818303038152906040528051906020012085604051602001610f31919061395e565b60405160208183030381529060405280519060200120145b15610ff357600260009054906101000a90046001600160a01b03166001600160a01b031663b07d9cbb8e8e848e6040518563ffffffff1660e01b8152600401610f95949392919061386b565b60206040518083038186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe5919061368e565b9750505050505050506110fb565b856110085760009750505050505050506110fb565b8361101d5760009750505050505050506110fb565b816110325760009750505050505050506110fb565b8981106110495760009750505050505050506110fb565b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906110799030908a90600401613852565b60206040518083038186803b15801561109157600080fd5b505afa1580156110a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c9919061368e565b6110dd5760009750505050505050506110fb565b6110f1836110eb8c84612d78565b90612da0565b9750505050505050505b95945050505050565b6018602090815260009283526040909220815180830184018051928152908401929093019190912091525481565b6004546001600160a01b0316331461115c5760405162461bcd60e51b8152600401610bb990613c31565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b600c6020526000908152604090205481565b60606111aa846109a2565b90506040516020016111bb90613c20565b60405160208183030381529060405280519060200120816040516020016111e2919061395e565b6040516020818303038152906040528051906020012014156112165760405162461bcd60e51b8152600401610bb990613b0c565b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906112469033908890600401613852565b60206040518083038186803b15801561125e57600080fd5b505afa158015611272573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611296919061368e565b1515806113425750600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906112ce9030908890600401613852565b60206040518083038186803b1580156112e657600080fd5b505afa1580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e919061368e565b1580159061134257506000848152600a60205260409020546001600160a01b031633145b61135e5760405162461bcd60e51b8152600401610bb990613aa5565b600f8160405161136e919061374b565b9081526040805160209281900383019020546000878152601090935291205460ff9182169116106113b15760405162461bcd60e51b8152600401610bb9906139fb565b6001600160a01b03821660009081526014602052604090205460ff166113e95760405162461bcd60e51b8152600401610bb990613b32565b6113f433848461233c565b156114115760405162461bcd60e51b8152600401610bb990613c54565b6001600160a01b03821660009081526017602052604090205460ff16156114da57604051630276bc2360e61b81526001600160a01b03831690639daf08c0906114699033906001600160801b03881690600401613852565b60206040518083038186803b15801561148157600080fd5b505afa158015611495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b991906134b1565b6114d55760405162461bcd60e51b8152600401610bb990613a7a565b611574565b6040516313332ab160e11b81526001600160a01b038316906326665562906115089033908790600401613830565b60206040518083038186803b15801561152057600080fd5b505afa158015611534573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155891906134b1565b6115745760405162461bcd60e51b8152600401610bb990613a7a565b3360008181526015602090815260408083206001600160a01b0387168085529083528184206001600160801b03891685528352818420899055888452600a835281842080546001600160a01b03191690951790945560108252808320805460ff19811660ff9182166001018216179091559383526017909152902054161561163257336000908152601a602090815260408083206001600160a01b038616845282528083206001600160801b0387168452909152902042905561166a565b3360009081526016602090815260408083206001600160a01b038616845282528083206001600160801b038716845290915290204390555b6000805b3360009081526012602052604090205460ff821610156116cb57336000908152601260205260409020805487919060ff84169081106116a957fe5b906000526020600020015414156116c357600191506116cb565b60010161166e565b50806116f457336000908152601260209081526040822080546001810182559083529120018590555b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906117249030908990600401613852565b60206040518083038186803b15801561173c57600080fd5b505afa158015611750573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611774919061368e565b6117ee576001805460408051602081018252600081529051637921219560e11b81526001600160a01b039092169263f242432a926117bb92339230928c92906004016137eb565b600060405180830381600087803b1580156117d557600080fd5b505af11580156117e9573d6000803e3d6000fd5b505050505b6001600160a01b03831660009081526017602052604090205433907f2091db4757417ee6930004b3e4755720fdcb20ee7613e053f8effd4d173d3749908790879060ff1661183c574361183e565b425b8760405161184f9493929190613ce6565b60405180910390a25050505050565b6000818152600b60205260408120546001600160801b0316151580610b8157505060009081526010602052604090205460ff16151590565b600254600160a01b900460ff16156118c05760405162461bcd60e51b8152600401610bb990613ac9565b6118d06301ffc9a760e01b612de1565b6118e0630271189760e51b612de1565b600380546001600160a01b03199081166001600160a01b039485161790915560048054821692841692909217909155600080548216958316959095179094556001805485169382169390931790925560028054600160a01b9416919092161760ff60a01b1916919091179055565b61195a33858584612220565b6119765760405162461bcd60e51b8152600401610bb990613a1f565b6000848152600a60205260409020546001600160a01b03166119aa5760405162461bcd60e51b8152600401610bb990613bbb565b6000848152600a60205260409020546001600160a01b031633146119e05760405162461bcd60e51b8152600401610bb990613b97565b6001600160a01b03811660009081526014602052604090205460ff16611a185760405162461bcd60e51b8152600401610bb990613b32565b6001600160a01b03811660009081526017602052604081205460ff16611abb576040516306c52ec160e41b81526001600160a01b03831690636c52ec1090611a669033908890600401613830565b60206040518083038186803b158015611a7e57600080fd5b505afa158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab691906134b1565b611b42565b60405163d1c25be360e01b81526001600160a01b0383169063d1c25be390611af29033906001600160801b03891690600401613852565b60206040518083038186803b158015611b0a57600080fd5b505afa158015611b1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4291906134b1565b905080611c7c576001600160a01b03821660009081526017602052604090205460ff1615611bf55760405163ac44ff3160e01b81526001600160a01b0383169063ac44ff31903490611b9d9088908890600090600401613c90565b6020604051808303818588803b158015611bb657600080fd5b505af1158015611bca573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611bef919061368e565b50611c7c565b604051630e6507e960e21b81526001600160a01b038316906339941fa4903490611c289088908890600090600401613cba565b6020604051808303818588803b158015611c4157600080fd5b505af1158015611c55573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611c7a919061368e565b505b3360009081526015602090815260408083206001600160a01b038616845282528083206001600160801b03881684528252808320839055878352600b909152902080546fffffffffffffffffffffffffffffffff19169055611cdd82612477565b15611d0757336000908152600d602090815260408083206001600160801b03881684529091528120555b60008581526010602052604090205460ff1615611d43576000858152601060205260409020805460ff19811660ff918216600019019091161790555b60008581526010602052604090205460ff16611e62576000858152600a6020526040812080546001600160a01b03191690555b3360009081526012602052604090205460ff82161015611deb57336000908152601260205260409020805487919060ff8416908110611db157fe5b90600052602060002001541415611de357336000908152601260205260409020611dde9060ff8316612e30565b611deb565b600101611d76565b506001805460408051602081018252600081529051637921219560e11b81526001600160a01b039092169263f242432a92611e2f92309233928c92906004016137eb565b600060405180830381600087803b158015611e4957600080fd5b505af1158015611e5d573d6000803e3d6000fd5b505050505b336001600160a01b03167f71d135e12a0a354469f06fae55d676e28a84fec8b3a2e61f0a5a0f3208e3b6ac8686868660405161184f9493929190613ce6565b6003546001600160a01b0316331480611ec457506004546001600160a01b031633145b611ee05760405162461bcd60e51b8152600401610bb990613c31565b6000805b60055460ff82161015611f6b5785604051602001611f02919061395e565b6040516020818303038152906040528051906020012060058260ff1681548110611f2857fe5b90600052602060002001604051602001611f429190613971565b604051602081830303815290604052805190602001201415611f6357600191505b600101611ee4565b5080611fb657600580546001810182556000919091528551611fb4917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001906020880190612ecb565b505b83600686604051611fc7919061374b565b90815260200160405180910390208190555082600786604051611fea919061374b565b90815260200160405180910390208190555081600f8660405161200d919061374b565b908152604051908190036020019020805460ff9290921660ff199092169190911790555050505050565b6001600160a01b03811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561209757602002820191906000526020600020905b815481526020019060010190808311612083575b50505050509050919050565b600581815481106120b057fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152935090918301828280156121415780601f1061211657610100808354040283529160200191612141565b820191906000526020600020905b81548152906001019060200180831161212457829003601f168201915b505050505081565b6012602052816000526040600020818154811061216257fe5b90600052602060002001600091509150505481565b6001546001600160a01b031681565b805160208183018101805160088252928201919093012091525481565b8051602081830181018051600f8252928201919093012091525460ff1681565b60116020526000908152604090205481565b60008181526010602052604081205460ff16600f6121f2846109a2565b6040516121ff919061374b565b9081526040519081900360200190205460ff90811691909103169050919050565b600061222b82612477565b801561226257506001600160a01b0385166000908152600d602090815260408083206001600160801b038716845290915290205484145b806110fb57506001600160a01b03808616600090815260156020908152604080832093861683529281528282206001600160801b038716835290522054841495945050505050565b601a60209081526000938452604080852082529284528284209052825290205481565b601360209081526000928352604080842090915290825290205481565b606060006122f985858561233c565b90506110fb816109a2565b600d60209081526000928352604080842090915290825290205481565b600a602052600090815260409020546001600160a01b031681565b60008061234883612477565b6001600160a01b03808716600090815260156020908152604080832093881683529281528282206001600160801b0389168352905290812054919250826123905760006123be565b6001600160a01b0387166000908152600d602090815260408083206001600160801b038a1684529091529020545b90506000836123ce576000612450565b600254604051630d06322560e21b81526001600160a01b0390911690633418c89490612400908b908b90600401613830565b60206040518083038186803b15801561241857600080fd5b505afa15801561242c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612450919061368e565b90508261246957816124625780612464565b815b61246b565b825b98975050505050505050565b6000546001600160a01b0390811691161490565b805160208183018101805160068252928201919093012091525481565b601560209081526000938452604080852082529284528284209052825290205481565b6004546001600160a01b031633146124f55760405162461bcd60e51b8152600401610bb990613c31565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006110fb858585856000610b87565b6004546001600160a01b031633146125515760405162461bcd60e51b8152600401610bb990613c31565b6001600160a01b03166000908152601460209081526040808320805460ff19908116909155601790925290912080549091169055565b6003546001600160a01b03163314806125aa57506004546001600160a01b031633145b6125c65760405162461bcd60e51b8152600401610bb990613c31565b6001600160a01b0381166000908152601960205260409081902090518491906125f090879061374b565b9081526040805160209281900383018120939093556001600160a01b038416600090815260189092529020839161262890879061374b565b9081526040519081900360200190205550505050565b63bc197c8160e01b95945050505050565b6002546001600160a01b031681565b805160208183018101805160098252928201919093012091525481565b60606005805480602002602001604051908101604052809291908181526020016000905b8282101561274a5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156127365780601f1061270b57610100808354040283529160200191612736565b820191906000526020600020905b81548152906001019060200180831161271957829003601f168201915b50505050508152602001906001019061269f565b50505050905090565b6003546001600160a01b031633148061277657506004546001600160a01b031633145b6127925760405162461bcd60e51b8152600401610bb990613c31565b6000805b60055460ff8216101561281d57876040516020016127b4919061395e565b6040516020818303038152906040528051906020012060058260ff16815481106127da57fe5b906000526020600020016040516020016127f49190613971565b60405160208183030381529060405280519060200120141561281557600191505b600101612796565b508061286857600580546001810182556000919091528751612866917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0019060208a0190612ecb565b505b85600688604051612879919061374b565b9081526020016040518091039020819055508460078860405161289c919061374b565b908152602001604051809103902081905550836008886040516128bf919061374b565b90815260405190819003602001902055826128da57436128dc565b825b6009886040516128ec919061374b565b90815260200160405180910390208190555081600f8860405161290f919061374b565b908152604051908190036020019020805460ff9290921660ff1990921691909117905550505050505050565b6004546001600160a01b031633146129655760405162461bcd60e51b8152600401610bb990613c31565b6001600160a01b039091166000908152601460209081526040808320805460ff199081166001179091556017909252909120805492151592909116919091179055565b601660209081526000938452604080852082529284528284209052825290205481565b600b602052600090815260409020546001600160801b031681565b6019602090815260009283526040909220815180830184018051928152908401929093019190912091525481565b6003546001600160a01b031681565b63f23a6e6160e01b95945050505050565b60106020526000908152604090205460ff1681565b600080546001600160a01b031690612a6286868461233c565b9050336001600160a01b03831614612a7957600080fd5b6001600160a01b03831660009081526014602052604090205460ff16612ab15760405162461bcd60e51b8152600401610bb990613b32565b6040516313332ab160e11b81526001600160a01b03841690632666556290612adf9089908890600401613830565b60206040518083038186803b158015612af757600080fd5b505afa158015612b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2f91906134b1565b612b4b5760405162461bcd60e51b8152600401610bb990613a7a565b612b5686858561233c565b15612b735760405162461bcd60e51b8152600401610bb990613c54565b6000805b6001600160a01b03881660009081526012602052604090205460ff82161015612be6576001600160a01b0388166000908152601260205260409020805484919060ff8416908110612bc457fe5b90600052602060002001541415612bde5760019150612be6565b600101612b77565b50811580612bf2575080155b15612bff57505050612d53565b6001600160a01b03808816600081815260156020908152604080832088861684528083528184206001600160801b03808e16808752918552838620869055868652600d8552838620918652908452828520859055958a16808552908352818420958b16808552958352818420889055878452600a835281842080546001600160a01b03191686179055848452601a8352818420908452825280832094835293905282902042905590517f71d135e12a0a354469f06fae55d676e28a84fec8b3a2e61f0a5a0f3208e3b6ac90612cdb9085908a9043908990613ce6565b60405180910390a26001600160a01b03848116600090815260176020526040902054908816907f2091db4757417ee6930004b3e4755720fdcb20ee7613e053f8effd4d173d3749908490889060ff16612d345743612d36565b425b88604051612d479493929190613ce6565b60405180910390a25050505b50505050565b6000546001600160a01b031681565b600254600160a01b900460ff1681565b600082821115612d9a5760405162461bcd60e51b8152600401610bb990613b60565b50900390565b600082612daf57506000610b81565b82820282848281612dbc57fe5b0414612dda5760405162461bcd60e51b8152600401610bb990613bdf565b9392505050565b6001600160e01b03198082161415612e0b5760405162461bcd60e51b8152600401610bb990613a43565b6001600160e01b0319166000908152600e60205260409020805460ff19166001179055565b8154600090612e40906001612d78565b90506000838281548110612e5057fe5b9060005260206000200154905081831415612e8a5783805480612e6f57fe5b60019003818190600052602060002001600090559055612d53565b80848481548110612e9757fe5b906000526020600020018190555083805480612eaf57fe5b6001900381819060005260206000200160009055905550505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f0c57805160ff1916838001178555612f39565b82800160010185558215612f39579182015b82811115612f39578251825591602001919060010190612f1e565b50612f45929150612f49565b5090565b5b80821115612f455760008155600101612f4a565b80356001600160a01b0381168114610b8157600080fd5b600082601f830112612f85578081fd5b813567ffffffffffffffff811115612f9b578182fd5b6020808202612fab828201613d21565b83815293508184018583018287018401881015612fc757600080fd5b600092505b84831015612fea578035825260019290920191908301908301612fcc565b505050505092915050565b600082601f830112613005578081fd5b813567ffffffffffffffff81111561301b578182fd5b61302e601f8201601f1916602001613d21565b915080825283602082850101111561304557600080fd5b8060208401602084013760009082016020015292915050565b80356001600160801b0381168114610b8157600080fd5b600060208284031215613086578081fd5b612dda8383612f5e565b600080600080600060a086880312156130a7578081fd5b6130b18787612f5e565b94506130c08760208801612f5e565b93506130cf8760408801612f5e565b92506130de8760608801612f5e565b91506130ed8760808801612f5e565b90509295509295909350565b600080600080600060a08688031215613110578081fd5b853561311b81613d80565b9450602086013561312b81613d80565b9350604086013567ffffffffffffffff80821115613147578283fd5b61315389838a01612f75565b94506060880135915080821115613168578283fd5b61317489838a01612f75565b93506080880135915080821115613189578283fd5b5061319688828901612ff5565b9150509295509295909350565b6000806000606084860312156131b7578283fd5b83356131c281613d80565b925060208401356131d281613d80565b915060408401356131e281613da6565b809150509250925092565b600080600080600060a08688031215613204578081fd5b61320e8787612f5e565b945061321d8760208801612f5e565b93506040860135925060608601359150608086013567ffffffffffffffff811115613246578182fd5b61319688828901612ff5565b60008060408385031215613264578182fd5b61326e8484612f5e565b9150602083013561327e81613d98565b809150509250929050565b6000806040838503121561329b578182fd5b82356132a681613d80565b9150602083013567ffffffffffffffff8111156132c1578182fd5b6132cd85828601612ff5565b9150509250929050565b600080604083850312156132e9578182fd5b6132f38484612f5e565b9150613302846020850161305e565b90509250929050565b60008060006060848603121561331f578283fd5b833561332a81613d80565b9250602084013561333a81613da6565b915060408401356131e281613d80565b6000806000806080858703121561335f578182fd5b843561336a81613d80565b9350602085013561337a81613da6565b9250604085013561338a81613da6565b9150606085013561339a81613d80565b939692955090935050565b600080600080608085870312156133ba578182fd5b6133c48686612f5e565b93506133d3866020870161305e565b93969395505050506040820135916060013590565b600080600080600060a086880312156133ff578283fd5b853561340a81613d80565b9450602086013561341a81613da6565b94979496505050506040830135926060810135926080909101359150565b6000806040838503121561344a578182fd5b6134548484612f5e565b946020939093013593505050565b60008060008060808587031215613477578182fd5b6134818686612f5e565b935060208501359250613497866040870161305e565b91506134a68660608701612f5e565b905092959194509250565b6000602082840312156134c2578081fd5b8151612dda81613d98565b6000602082840312156134de578081fd5b81356001600160e01b031981168114612dda578182fd5b600060208284031215613506578081fd5b813567ffffffffffffffff81111561351c578182fd5b61352884828501612ff5565b949350505050565b60008060008060808587031215613545578182fd5b843567ffffffffffffffff81111561355b578283fd5b61356787828801612ff5565b9450506020850135925060408501359150606085013561339a81613d80565b60008060008060008060c0878903121561359e578384fd5b863567ffffffffffffffff8111156135b4578485fd5b6135c089828a01612ff5565b9650506020870135945060408701359350606087013592506080870135915060a087013560ff811681146135f2578182fd5b809150509295509295509295565b60008060008060808587031215613615578182fd5b843567ffffffffffffffff81111561362b578283fd5b61363787828801612ff5565b9450506020850135925060408501359150606085013560ff8116811461339a578182fd5b60006020828403121561366c578081fd5b612dda838361305e565b600060208284031215613687578081fd5b5035919050565b60006020828403121561369f578081fd5b5051919050565b6000806000606084860312156136ba578081fd5b833592506136cb856020860161305e565b91506136da8560408601612f5e565b90509250925092565b600080600080608085870312156136f8578182fd5b84359350613709866020870161305e565b9250604085013591506134a68660608701612f5e565b60008151808452613737816020860160208601613d54565b601f01601f19169290920160200192915050565b6000825161375d818460208701613d54565b9190910192915050565b6000808354600180821660008114613786576001811461379d576137cc565b60ff198316865260028304607f16860193506137cc565b600283048786526020808720875b838110156137c45781548a8201529085019082016137ab565b505050860193505b509195945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906138259083018461371f565b979650505050505050565b6001600160a01b039290921682526001600160801b0316602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039490941684526001600160801b039290921660208401526040830152606082015260800190565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156138ed57603f198886030184526138db85835161371f565b945092850192908501906001016138bf565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561393257835183529284019291840191600101613916565b50909695505050505050565b901515815260200190565b6001600160e01b031991909116815260200190565b600060208252612dda602083018461371f565b6000602080830181845282855460018082166000811461399857600181146139b6576139ee565b60028304607f16855260ff19831660408901526060880193506139ee565b600283048086526139c68a613d48565b885b828110156139e45781548b8201604001529084019088016139c8565b8a01604001955050505b5091979650505050505050565b6020808252600a90820152691bdd995c881b1a5b5a5d60b21b604082015260600190565b6020808252600a908201526977726f6e67206e6f646560b01b604082015260600190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b6020808252601190820152701b9bd91948191bd95cdb9d08195e1a5cdd607a1b604082015260600190565b6020808252600a90820152690dcdee840cadcdeeaced60b31b604082015260600190565b602080825260099082015268696e697420646f6e6560b81b604082015260600190565b60208082526006908201526542524f4e5a4560d01b604082015260600190565b6020808252600c908201526b6e6f7420656c696769626c6560a01b604082015260600190565b6020808252601490820152731cd95c9d9a58d948191bd95cdb9d08195e1a5cdd60621b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600a90820152693737ba1039ba30b5b2b960b11b604082015260600190565b6020808252600a90820152691b9bdd081cdd185ad95960b21b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260009082015260400190565b6020808252600990820152683737ba1030b236b4b760b91b604082015260600190565b6020808252600e908201526d185b1c9958591e481cdd185ad95960921b604082015260600190565b6001600160801b0391909116815260200190565b6001600160801b0393909316835260208301919091526001600160a01b0316604082015260600190565b6001600160801b0393909316835260208301919091521515604082015260600190565b90815260200190565b9384526001600160801b0392909216602084015260408301526001600160a01b0316606082015260800190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613d4057600080fd5b604052919050565b60009081526020902090565b60005b83811015613d6f578181015183820152602001613d57565b83811115612d535750506000910152565b6001600160a01b0381168114613d9557600080fd5b50565b8015158114613d9557600080fd5b6001600160801b0381168114613d9557600080fdfea264697066735822122090998401ed3fc541a264e9b6891fd88a439c2f2d35df18cc92161db8a963133364736f6c634300060c0033

Deployed Bytecode

0x6080604052600436106102e45760003560e01c806394d14a9b11610190578063c2c9b3c1116100dc578063d90766ca11610095578063f304e01d1161006f578063f304e01d146108f8578063f678b14114610918578063fc7ea8d114610938578063fed0a20e1461094d576102e4565b8063d90766ca146108a3578063da998dca146108c3578063f23a6e61146108d8576102e4565b8063c2c9b3c1146107d4578063c712d34a146107f4578063cb4dd51e14610816578063d287607814610836578063d4a8c08214610856578063d60444ff14610876576102e4565b8063ac3a760111610149578063b64ac8e411610123578063b64ac8e414610752578063b810484e14610772578063bc197c8114610792578063c153dc0b146107bf576102e4565b8063ac3a7601146106f2578063ad553eef14610712578063b07d9cbb14610732576102e4565b806394d14a9b146106325780639954a804146106525780639f4808da14610672578063a68b62e514610692578063a8306cf2146106b2578063a8936d59146106d2576102e4565b806339e3aea21161024f578063674edb721161020857806378592e74116101e257806378592e74146105b25780638202365f146105d25780638e9f2e32146105f2578063916db6eb14610612576102e4565b8063674edb721461054557806368b087e81461056557806372ab973f14610592576102e4565b806339e3aea2146104905780635571602b146104a3578063559b12fe146104c35780635ab9daf0146104f05780635ed44191146105105780636441d37914610530576102e4565b8063279958a9116102a1578063279958a9146103d957806329575f6a146103fb5780633183685b1461041d57806331e410a81461043d578063328f723314610450578063359ef75b14610470576102e4565b806301ffc9a7146102e957806304dc6ada1461031f57806313f934841461034c5780631f8e027b146103795780632034eb51146103995780632507cba5146103b9575b600080fd5b3480156102f557600080fd5b506103096103043660046134cd565b610962565b604051610316919061393e565b60405180910390f35b34801561032b57600080fd5b5061033f61033a3660046134f5565b610985565b6040516103169190613cdd565b34801561035857600080fd5b5061036c610367366004613676565b6109a2565b604051610316919061395e565b34801561038557600080fd5b50610309610394366004613676565b610b00565b3480156103a557600080fd5b5061033f6103b43660046133e8565b610b87565b3480156103c557600080fd5b5061033f6103d4366004613289565b611104565b3480156103e557600080fd5b506103f96103f4366004613075565b611132565b005b34801561040757600080fd5b5061041061117e565b60405161031691906137d7565b34801561042957600080fd5b5061033f610438366004613676565b61118d565b6103f961044b3660046136a6565b61119f565b34801561045c57600080fd5b5061030961046b366004613676565b61185e565b34801561047c57600080fd5b506103f961048b366004613090565b611896565b6103f961049e3660046136e3565b61194e565b3480156104af57600080fd5b506103f96104be366004613600565b611ea1565b3480156104cf57600080fd5b506104e36104de366004613075565b612037565b60405161031691906138fa565b3480156104fc57600080fd5b5061036c61050b366004613676565b6120a3565b34801561051c57600080fd5b5061033f61052b366004613438565b612149565b34801561053c57600080fd5b50610410612177565b34801561055157600080fd5b5061033f6105603660046134f5565b612186565b34801561057157600080fd5b506105856105803660046134f5565b6121a3565b6040516103169190613d13565b34801561059e57600080fd5b5061033f6105ad36600461365b565b6121c3565b3480156105be57600080fd5b5061033f6105cd366004613676565b6121d5565b3480156105de57600080fd5b506103096105ed366004613462565b612220565b3480156105fe57600080fd5b5061033f61060d3660046131a3565b6122aa565b34801561061e57600080fd5b5061033f61062d3660046132d7565b6122cd565b34801561063e57600080fd5b5061036c61064d36600461330b565b6122ea565b34801561065e57600080fd5b5061033f61066d3660046132d7565b612304565b34801561067e57600080fd5b5061041061068d366004613676565b612321565b34801561069e57600080fd5b5061033f6106ad36600461330b565b61233c565b3480156106be57600080fd5b506103096106cd366004613075565b612477565b3480156106de57600080fd5b5061033f6106ed3660046134f5565b61248b565b3480156106fe57600080fd5b5061033f61070d3660046131a3565b6124a8565b34801561071e57600080fd5b506103f961072d366004613075565b6124cb565b34801561073e57600080fd5b5061033f61074d3660046133a5565b612517565b34801561075e57600080fd5b506103f961076d366004613075565b612527565b34801561077e57600080fd5b506103f961078d366004613530565b612587565b34801561079e57600080fd5b506107b26107ad3660046130f9565b61263e565b6040516103169190613949565b3480156107cb57600080fd5b5061041061264f565b3480156107e057600080fd5b5061033f6107ef3660046134f5565b61265e565b34801561080057600080fd5b5061080961267b565b604051610316919061389a565b34801561082257600080fd5b506103f9610831366004613586565b612753565b34801561084257600080fd5b506103f9610851366004613252565b61293b565b34801561086257600080fd5b5061033f6108713660046131a3565b6129a8565b34801561088257600080fd5b50610896610891366004613676565b6129cb565b6040516103169190613c7c565b3480156108af57600080fd5b5061033f6108be366004613289565b6129e6565b3480156108cf57600080fd5b50610410612a14565b3480156108e457600080fd5b506107b26108f33660046131ed565b612a23565b34801561090457600080fd5b50610585610913366004613676565b612a34565b34801561092457600080fd5b506103f961093336600461334a565b612a49565b34801561094457600080fd5b50610410612d59565b34801561095957600080fd5b50610309612d68565b6001600160e01b031981166000908152600e602052604090205460ff165b919050565b805160208183018101805160078252928201919093012091525481565b606060005b60055460ff82161015610aea57600660058260ff16815481106109c657fe5b906000526020600020016040516109dd9190613767565b9081526020016040518091039020548310158015610a325750600760058260ff1681548110610a0857fe5b90600052602060002001604051610a1f9190613767565b9081526020016040518091039020548311155b15610ae25760058160ff1681548110610a4757fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610ad55780601f10610aaa57610100808354040283529160200191610ad5565b820191906000526020600020905b815481529060010190602001808311610ab857829003601f168201915b5050505050915050610980565b6001016109a7565b5050604080516020810190915260008152919050565b60025460405163328f723360e01b81526000916001600160a01b03169063328f723390610b31908590600401613cdd565b60206040518083038186803b158015610b4957600080fd5b505afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8191906134b1565b92915050565b3360008181526014602052604081205490919060ff16610bc25760405162461bcd60e51b8152600401610bb990613b32565b60405180910390fd5b6000610bcf88888461233c565b90506060610bdc826109a2565b9050604051602001610bed90613c20565b6040516020818303038152906040528051906020012081604051602001610c14919061395e565b604051602081830303815290604052805190602001201415610c3c57600093505050506110fb565b6001600160a01b03831660009081526017602052604081205460ff1615610c9a57506001600160a01b03808a166000908152601a6020908152604080832093871683529281528282206001600160801b038c16835290522054610d88565b6001600160a01b03808b16600090815260166020908152604080832093881683529281528282206001600160801b038d16835290522054610d4d576001600160a01b038a1660009081526013602090815260408083206001600160801b038d168452909152902054610d1a576000838152600c6020526040902054610d48565b6001600160a01b038a1660009081526013602090815260408083206001600160801b038d1684529091529020545b610d85565b6001600160a01b03808b16600090815260166020908152604080832093881683529281528282206001600160801b038d168352905220545b90505b600086610e29576001600160a01b0385166000908152601960205260408082209051610db590869061374b565b90815260200160405180910390205411610ded57600883604051610dd9919061374b565b908152602001604051809103902054610e24565b6001600160a01b038516600090815260196020526040908190209051610e1490859061374b565b9081526020016040518091039020545b610e2b565b865b905060008060186000886001600160a01b03166001600160a01b0316815260200190815260200160002085604051610e63919061374b565b90815260200160405180910390205411610e9b57600984604051610e87919061374b565b908152602001604051809103902054610ed2565b6001600160a01b038616600090815260186020526040908190209051610ec290869061374b565b9081526020016040518091039020545b905060008a8411610ee3578a610ee5565b835b905081811015610ef25750805b83158015610f495750604051602001610f0a90613aec565b6040516020818303038152906040528051906020012085604051602001610f31919061395e565b60405160208183030381529060405280519060200120145b15610ff357600260009054906101000a90046001600160a01b03166001600160a01b031663b07d9cbb8e8e848e6040518563ffffffff1660e01b8152600401610f95949392919061386b565b60206040518083038186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe5919061368e565b9750505050505050506110fb565b856110085760009750505050505050506110fb565b8361101d5760009750505050505050506110fb565b816110325760009750505050505050506110fb565b8981106110495760009750505050505050506110fb565b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906110799030908a90600401613852565b60206040518083038186803b15801561109157600080fd5b505afa1580156110a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c9919061368e565b6110dd5760009750505050505050506110fb565b6110f1836110eb8c84612d78565b90612da0565b9750505050505050505b95945050505050565b6018602090815260009283526040909220815180830184018051928152908401929093019190912091525481565b6004546001600160a01b0316331461115c5760405162461bcd60e51b8152600401610bb990613c31565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b600c6020526000908152604090205481565b60606111aa846109a2565b90506040516020016111bb90613c20565b60405160208183030381529060405280519060200120816040516020016111e2919061395e565b6040516020818303038152906040528051906020012014156112165760405162461bcd60e51b8152600401610bb990613b0c565b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906112469033908890600401613852565b60206040518083038186803b15801561125e57600080fd5b505afa158015611272573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611296919061368e565b1515806113425750600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906112ce9030908890600401613852565b60206040518083038186803b1580156112e657600080fd5b505afa1580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e919061368e565b1580159061134257506000848152600a60205260409020546001600160a01b031633145b61135e5760405162461bcd60e51b8152600401610bb990613aa5565b600f8160405161136e919061374b565b9081526040805160209281900383019020546000878152601090935291205460ff9182169116106113b15760405162461bcd60e51b8152600401610bb9906139fb565b6001600160a01b03821660009081526014602052604090205460ff166113e95760405162461bcd60e51b8152600401610bb990613b32565b6113f433848461233c565b156114115760405162461bcd60e51b8152600401610bb990613c54565b6001600160a01b03821660009081526017602052604090205460ff16156114da57604051630276bc2360e61b81526001600160a01b03831690639daf08c0906114699033906001600160801b03881690600401613852565b60206040518083038186803b15801561148157600080fd5b505afa158015611495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b991906134b1565b6114d55760405162461bcd60e51b8152600401610bb990613a7a565b611574565b6040516313332ab160e11b81526001600160a01b038316906326665562906115089033908790600401613830565b60206040518083038186803b15801561152057600080fd5b505afa158015611534573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155891906134b1565b6115745760405162461bcd60e51b8152600401610bb990613a7a565b3360008181526015602090815260408083206001600160a01b0387168085529083528184206001600160801b03891685528352818420899055888452600a835281842080546001600160a01b03191690951790945560108252808320805460ff19811660ff9182166001018216179091559383526017909152902054161561163257336000908152601a602090815260408083206001600160a01b038616845282528083206001600160801b0387168452909152902042905561166a565b3360009081526016602090815260408083206001600160a01b038616845282528083206001600160801b038716845290915290204390555b6000805b3360009081526012602052604090205460ff821610156116cb57336000908152601260205260409020805487919060ff84169081106116a957fe5b906000526020600020015414156116c357600191506116cb565b60010161166e565b50806116f457336000908152601260209081526040822080546001810182559083529120018590555b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e906117249030908990600401613852565b60206040518083038186803b15801561173c57600080fd5b505afa158015611750573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611774919061368e565b6117ee576001805460408051602081018252600081529051637921219560e11b81526001600160a01b039092169263f242432a926117bb92339230928c92906004016137eb565b600060405180830381600087803b1580156117d557600080fd5b505af11580156117e9573d6000803e3d6000fd5b505050505b6001600160a01b03831660009081526017602052604090205433907f2091db4757417ee6930004b3e4755720fdcb20ee7613e053f8effd4d173d3749908790879060ff1661183c574361183e565b425b8760405161184f9493929190613ce6565b60405180910390a25050505050565b6000818152600b60205260408120546001600160801b0316151580610b8157505060009081526010602052604090205460ff16151590565b600254600160a01b900460ff16156118c05760405162461bcd60e51b8152600401610bb990613ac9565b6118d06301ffc9a760e01b612de1565b6118e0630271189760e51b612de1565b600380546001600160a01b03199081166001600160a01b039485161790915560048054821692841692909217909155600080548216958316959095179094556001805485169382169390931790925560028054600160a01b9416919092161760ff60a01b1916919091179055565b61195a33858584612220565b6119765760405162461bcd60e51b8152600401610bb990613a1f565b6000848152600a60205260409020546001600160a01b03166119aa5760405162461bcd60e51b8152600401610bb990613bbb565b6000848152600a60205260409020546001600160a01b031633146119e05760405162461bcd60e51b8152600401610bb990613b97565b6001600160a01b03811660009081526014602052604090205460ff16611a185760405162461bcd60e51b8152600401610bb990613b32565b6001600160a01b03811660009081526017602052604081205460ff16611abb576040516306c52ec160e41b81526001600160a01b03831690636c52ec1090611a669033908890600401613830565b60206040518083038186803b158015611a7e57600080fd5b505afa158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab691906134b1565b611b42565b60405163d1c25be360e01b81526001600160a01b0383169063d1c25be390611af29033906001600160801b03891690600401613852565b60206040518083038186803b158015611b0a57600080fd5b505afa158015611b1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4291906134b1565b905080611c7c576001600160a01b03821660009081526017602052604090205460ff1615611bf55760405163ac44ff3160e01b81526001600160a01b0383169063ac44ff31903490611b9d9088908890600090600401613c90565b6020604051808303818588803b158015611bb657600080fd5b505af1158015611bca573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611bef919061368e565b50611c7c565b604051630e6507e960e21b81526001600160a01b038316906339941fa4903490611c289088908890600090600401613cba565b6020604051808303818588803b158015611c4157600080fd5b505af1158015611c55573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611c7a919061368e565b505b3360009081526015602090815260408083206001600160a01b038616845282528083206001600160801b03881684528252808320839055878352600b909152902080546fffffffffffffffffffffffffffffffff19169055611cdd82612477565b15611d0757336000908152600d602090815260408083206001600160801b03881684529091528120555b60008581526010602052604090205460ff1615611d43576000858152601060205260409020805460ff19811660ff918216600019019091161790555b60008581526010602052604090205460ff16611e62576000858152600a6020526040812080546001600160a01b03191690555b3360009081526012602052604090205460ff82161015611deb57336000908152601260205260409020805487919060ff8416908110611db157fe5b90600052602060002001541415611de357336000908152601260205260409020611dde9060ff8316612e30565b611deb565b600101611d76565b506001805460408051602081018252600081529051637921219560e11b81526001600160a01b039092169263f242432a92611e2f92309233928c92906004016137eb565b600060405180830381600087803b158015611e4957600080fd5b505af1158015611e5d573d6000803e3d6000fd5b505050505b336001600160a01b03167f71d135e12a0a354469f06fae55d676e28a84fec8b3a2e61f0a5a0f3208e3b6ac8686868660405161184f9493929190613ce6565b6003546001600160a01b0316331480611ec457506004546001600160a01b031633145b611ee05760405162461bcd60e51b8152600401610bb990613c31565b6000805b60055460ff82161015611f6b5785604051602001611f02919061395e565b6040516020818303038152906040528051906020012060058260ff1681548110611f2857fe5b90600052602060002001604051602001611f429190613971565b604051602081830303815290604052805190602001201415611f6357600191505b600101611ee4565b5080611fb657600580546001810182556000919091528551611fb4917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001906020880190612ecb565b505b83600686604051611fc7919061374b565b90815260200160405180910390208190555082600786604051611fea919061374b565b90815260200160405180910390208190555081600f8660405161200d919061374b565b908152604051908190036020019020805460ff9290921660ff199092169190911790555050505050565b6001600160a01b03811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561209757602002820191906000526020600020905b815481526020019060010190808311612083575b50505050509050919050565b600581815481106120b057fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152935090918301828280156121415780601f1061211657610100808354040283529160200191612141565b820191906000526020600020905b81548152906001019060200180831161212457829003601f168201915b505050505081565b6012602052816000526040600020818154811061216257fe5b90600052602060002001600091509150505481565b6001546001600160a01b031681565b805160208183018101805160088252928201919093012091525481565b8051602081830181018051600f8252928201919093012091525460ff1681565b60116020526000908152604090205481565b60008181526010602052604081205460ff16600f6121f2846109a2565b6040516121ff919061374b565b9081526040519081900360200190205460ff90811691909103169050919050565b600061222b82612477565b801561226257506001600160a01b0385166000908152600d602090815260408083206001600160801b038716845290915290205484145b806110fb57506001600160a01b03808616600090815260156020908152604080832093861683529281528282206001600160801b038716835290522054841495945050505050565b601a60209081526000938452604080852082529284528284209052825290205481565b601360209081526000928352604080842090915290825290205481565b606060006122f985858561233c565b90506110fb816109a2565b600d60209081526000928352604080842090915290825290205481565b600a602052600090815260409020546001600160a01b031681565b60008061234883612477565b6001600160a01b03808716600090815260156020908152604080832093881683529281528282206001600160801b0389168352905290812054919250826123905760006123be565b6001600160a01b0387166000908152600d602090815260408083206001600160801b038a1684529091529020545b90506000836123ce576000612450565b600254604051630d06322560e21b81526001600160a01b0390911690633418c89490612400908b908b90600401613830565b60206040518083038186803b15801561241857600080fd5b505afa15801561242c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612450919061368e565b90508261246957816124625780612464565b815b61246b565b825b98975050505050505050565b6000546001600160a01b0390811691161490565b805160208183018101805160068252928201919093012091525481565b601560209081526000938452604080852082529284528284209052825290205481565b6004546001600160a01b031633146124f55760405162461bcd60e51b8152600401610bb990613c31565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006110fb858585856000610b87565b6004546001600160a01b031633146125515760405162461bcd60e51b8152600401610bb990613c31565b6001600160a01b03166000908152601460209081526040808320805460ff19908116909155601790925290912080549091169055565b6003546001600160a01b03163314806125aa57506004546001600160a01b031633145b6125c65760405162461bcd60e51b8152600401610bb990613c31565b6001600160a01b0381166000908152601960205260409081902090518491906125f090879061374b565b9081526040805160209281900383018120939093556001600160a01b038416600090815260189092529020839161262890879061374b565b9081526040519081900360200190205550505050565b63bc197c8160e01b95945050505050565b6002546001600160a01b031681565b805160208183018101805160098252928201919093012091525481565b60606005805480602002602001604051908101604052809291908181526020016000905b8282101561274a5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156127365780601f1061270b57610100808354040283529160200191612736565b820191906000526020600020905b81548152906001019060200180831161271957829003601f168201915b50505050508152602001906001019061269f565b50505050905090565b6003546001600160a01b031633148061277657506004546001600160a01b031633145b6127925760405162461bcd60e51b8152600401610bb990613c31565b6000805b60055460ff8216101561281d57876040516020016127b4919061395e565b6040516020818303038152906040528051906020012060058260ff16815481106127da57fe5b906000526020600020016040516020016127f49190613971565b60405160208183030381529060405280519060200120141561281557600191505b600101612796565b508061286857600580546001810182556000919091528751612866917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0019060208a0190612ecb565b505b85600688604051612879919061374b565b9081526020016040518091039020819055508460078860405161289c919061374b565b908152602001604051809103902081905550836008886040516128bf919061374b565b90815260405190819003602001902055826128da57436128dc565b825b6009886040516128ec919061374b565b90815260200160405180910390208190555081600f8860405161290f919061374b565b908152604051908190036020019020805460ff9290921660ff1990921691909117905550505050505050565b6004546001600160a01b031633146129655760405162461bcd60e51b8152600401610bb990613c31565b6001600160a01b039091166000908152601460209081526040808320805460ff199081166001179091556017909252909120805492151592909116919091179055565b601660209081526000938452604080852082529284528284209052825290205481565b600b602052600090815260409020546001600160801b031681565b6019602090815260009283526040909220815180830184018051928152908401929093019190912091525481565b6003546001600160a01b031681565b63f23a6e6160e01b95945050505050565b60106020526000908152604090205460ff1681565b600080546001600160a01b031690612a6286868461233c565b9050336001600160a01b03831614612a7957600080fd5b6001600160a01b03831660009081526014602052604090205460ff16612ab15760405162461bcd60e51b8152600401610bb990613b32565b6040516313332ab160e11b81526001600160a01b03841690632666556290612adf9089908890600401613830565b60206040518083038186803b158015612af757600080fd5b505afa158015612b0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2f91906134b1565b612b4b5760405162461bcd60e51b8152600401610bb990613a7a565b612b5686858561233c565b15612b735760405162461bcd60e51b8152600401610bb990613c54565b6000805b6001600160a01b03881660009081526012602052604090205460ff82161015612be6576001600160a01b0388166000908152601260205260409020805484919060ff8416908110612bc457fe5b90600052602060002001541415612bde5760019150612be6565b600101612b77565b50811580612bf2575080155b15612bff57505050612d53565b6001600160a01b03808816600081815260156020908152604080832088861684528083528184206001600160801b03808e16808752918552838620869055868652600d8552838620918652908452828520859055958a16808552908352818420958b16808552958352818420889055878452600a835281842080546001600160a01b03191686179055848452601a8352818420908452825280832094835293905282902042905590517f71d135e12a0a354469f06fae55d676e28a84fec8b3a2e61f0a5a0f3208e3b6ac90612cdb9085908a9043908990613ce6565b60405180910390a26001600160a01b03848116600090815260176020526040902054908816907f2091db4757417ee6930004b3e4755720fdcb20ee7613e053f8effd4d173d3749908490889060ff16612d345743612d36565b425b88604051612d479493929190613ce6565b60405180910390a25050505b50505050565b6000546001600160a01b031681565b600254600160a01b900460ff1681565b600082821115612d9a5760405162461bcd60e51b8152600401610bb990613b60565b50900390565b600082612daf57506000610b81565b82820282848281612dbc57fe5b0414612dda5760405162461bcd60e51b8152600401610bb990613bdf565b9392505050565b6001600160e01b03198082161415612e0b5760405162461bcd60e51b8152600401610bb990613a43565b6001600160e01b0319166000908152600e60205260409020805460ff19166001179055565b8154600090612e40906001612d78565b90506000838281548110612e5057fe5b9060005260206000200154905081831415612e8a5783805480612e6f57fe5b60019003818190600052602060002001600090559055612d53565b80848481548110612e9757fe5b906000526020600020018190555083805480612eaf57fe5b6001900381819060005260206000200160009055905550505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612f0c57805160ff1916838001178555612f39565b82800160010185558215612f39579182015b82811115612f39578251825591602001919060010190612f1e565b50612f45929150612f49565b5090565b5b80821115612f455760008155600101612f4a565b80356001600160a01b0381168114610b8157600080fd5b600082601f830112612f85578081fd5b813567ffffffffffffffff811115612f9b578182fd5b6020808202612fab828201613d21565b83815293508184018583018287018401881015612fc757600080fd5b600092505b84831015612fea578035825260019290920191908301908301612fcc565b505050505092915050565b600082601f830112613005578081fd5b813567ffffffffffffffff81111561301b578182fd5b61302e601f8201601f1916602001613d21565b915080825283602082850101111561304557600080fd5b8060208401602084013760009082016020015292915050565b80356001600160801b0381168114610b8157600080fd5b600060208284031215613086578081fd5b612dda8383612f5e565b600080600080600060a086880312156130a7578081fd5b6130b18787612f5e565b94506130c08760208801612f5e565b93506130cf8760408801612f5e565b92506130de8760608801612f5e565b91506130ed8760808801612f5e565b90509295509295909350565b600080600080600060a08688031215613110578081fd5b853561311b81613d80565b9450602086013561312b81613d80565b9350604086013567ffffffffffffffff80821115613147578283fd5b61315389838a01612f75565b94506060880135915080821115613168578283fd5b61317489838a01612f75565b93506080880135915080821115613189578283fd5b5061319688828901612ff5565b9150509295509295909350565b6000806000606084860312156131b7578283fd5b83356131c281613d80565b925060208401356131d281613d80565b915060408401356131e281613da6565b809150509250925092565b600080600080600060a08688031215613204578081fd5b61320e8787612f5e565b945061321d8760208801612f5e565b93506040860135925060608601359150608086013567ffffffffffffffff811115613246578182fd5b61319688828901612ff5565b60008060408385031215613264578182fd5b61326e8484612f5e565b9150602083013561327e81613d98565b809150509250929050565b6000806040838503121561329b578182fd5b82356132a681613d80565b9150602083013567ffffffffffffffff8111156132c1578182fd5b6132cd85828601612ff5565b9150509250929050565b600080604083850312156132e9578182fd5b6132f38484612f5e565b9150613302846020850161305e565b90509250929050565b60008060006060848603121561331f578283fd5b833561332a81613d80565b9250602084013561333a81613da6565b915060408401356131e281613d80565b6000806000806080858703121561335f578182fd5b843561336a81613d80565b9350602085013561337a81613da6565b9250604085013561338a81613da6565b9150606085013561339a81613d80565b939692955090935050565b600080600080608085870312156133ba578182fd5b6133c48686612f5e565b93506133d3866020870161305e565b93969395505050506040820135916060013590565b600080600080600060a086880312156133ff578283fd5b853561340a81613d80565b9450602086013561341a81613da6565b94979496505050506040830135926060810135926080909101359150565b6000806040838503121561344a578182fd5b6134548484612f5e565b946020939093013593505050565b60008060008060808587031215613477578182fd5b6134818686612f5e565b935060208501359250613497866040870161305e565b91506134a68660608701612f5e565b905092959194509250565b6000602082840312156134c2578081fd5b8151612dda81613d98565b6000602082840312156134de578081fd5b81356001600160e01b031981168114612dda578182fd5b600060208284031215613506578081fd5b813567ffffffffffffffff81111561351c578182fd5b61352884828501612ff5565b949350505050565b60008060008060808587031215613545578182fd5b843567ffffffffffffffff81111561355b578283fd5b61356787828801612ff5565b9450506020850135925060408501359150606085013561339a81613d80565b60008060008060008060c0878903121561359e578384fd5b863567ffffffffffffffff8111156135b4578485fd5b6135c089828a01612ff5565b9650506020870135945060408701359350606087013592506080870135915060a087013560ff811681146135f2578182fd5b809150509295509295509295565b60008060008060808587031215613615578182fd5b843567ffffffffffffffff81111561362b578283fd5b61363787828801612ff5565b9450506020850135925060408501359150606085013560ff8116811461339a578182fd5b60006020828403121561366c578081fd5b612dda838361305e565b600060208284031215613687578081fd5b5035919050565b60006020828403121561369f578081fd5b5051919050565b6000806000606084860312156136ba578081fd5b833592506136cb856020860161305e565b91506136da8560408601612f5e565b90509250925092565b600080600080608085870312156136f8578182fd5b84359350613709866020870161305e565b9250604085013591506134a68660608701612f5e565b60008151808452613737816020860160208601613d54565b601f01601f19169290920160200192915050565b6000825161375d818460208701613d54565b9190910192915050565b6000808354600180821660008114613786576001811461379d576137cc565b60ff198316865260028304607f16860193506137cc565b600283048786526020808720875b838110156137c45781548a8201529085019082016137ab565b505050860193505b509195945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906138259083018461371f565b979650505050505050565b6001600160a01b039290921682526001600160801b0316602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039490941684526001600160801b039290921660208401526040830152606082015260800190565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156138ed57603f198886030184526138db85835161371f565b945092850192908501906001016138bf565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561393257835183529284019291840191600101613916565b50909695505050505050565b901515815260200190565b6001600160e01b031991909116815260200190565b600060208252612dda602083018461371f565b6000602080830181845282855460018082166000811461399857600181146139b6576139ee565b60028304607f16855260ff19831660408901526060880193506139ee565b600283048086526139c68a613d48565b885b828110156139e45781548b8201604001529084019088016139c8565b8a01604001955050505b5091979650505050505050565b6020808252600a90820152691bdd995c881b1a5b5a5d60b21b604082015260600190565b6020808252600a908201526977726f6e67206e6f646560b01b604082015260600190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b6020808252601190820152701b9bd91948191bd95cdb9d08195e1a5cdd607a1b604082015260600190565b6020808252600a90820152690dcdee840cadcdeeaced60b31b604082015260600190565b602080825260099082015268696e697420646f6e6560b81b604082015260600190565b60208082526006908201526542524f4e5a4560d01b604082015260600190565b6020808252600c908201526b6e6f7420656c696769626c6560a01b604082015260600190565b6020808252601490820152731cd95c9d9a58d948191bd95cdb9d08195e1a5cdd60621b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600a90820152693737ba1039ba30b5b2b960b11b604082015260600190565b6020808252600a90820152691b9bdd081cdd185ad95960b21b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260009082015260400190565b6020808252600990820152683737ba1030b236b4b760b91b604082015260600190565b6020808252600e908201526d185b1c9958591e481cdd185ad95960921b604082015260600190565b6001600160801b0391909116815260200190565b6001600160801b0393909316835260208301919091526001600160a01b0316604082015260600190565b6001600160801b0393909316835260208301919091521515604082015260600190565b90815260200190565b9384526001600160801b0392909216602084015260408301526001600160a01b0316606082015260800190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613d4057600080fd5b604052919050565b60009081526020902090565b60005b83811015613d6f578181015183820152602001613d57565b83811115612d535750506000910152565b6001600160a01b0381168114613d9557600080fd5b50565b8015158114613d9557600080fd5b6001600160801b0381168114613d9557600080fdfea264697066735822122090998401ed3fc541a264e9b6891fd88a439c2f2d35df18cc92161db8a963133364736f6c634300060c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.