Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 13449576 | 1132 days ago | IN | 0 ETH | 0.31601152 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StrongNFTBonusV6
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicensed pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./interfaces/ServiceInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusLegacyInterface.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol"; contract StrongNFTBonusV6 is Context { 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); function init(address serviceContract, address nftContract, address strongNFTBonusContract, address serviceAdminAddress, address superAdminAddress) public { 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) public view returns (bool) { return nftIdStakedToNodeId[_nftId] != 0 || nftIdStakedToNodesCount[_nftId] > 0; } function isNftStakedLegacy(uint256 _nftId) public view returns (bool) { return CStrongNFTBonus.isNftStaked(_nftId); } function getStakedNftId(address _entity, uint128 _nodeId, address _serviceContract) public view returns (uint256) { uint256 stakedNftId = entityNodeStakedNftId[_entity][_nodeId]; uint256 stakedNftIdNew = entityServiceNodeStakedNftId[_entity][_serviceContract][_nodeId]; uint256 stakedNftIdLegacy = CStrongNFTBonus.getStakedNftId(_entity, _nodeId); return stakedNftIdNew != 0 ? stakedNftIdNew : (stakedNftId != 0 ? stakedNftId : stakedNftIdLegacy); } function getStakedNftIds(address _entity) public view returns (uint256[] memory) { return entityStakedNftIds[_entity]; } function getNftBonusNames() public view returns (string[] memory) { return nftBonusNames; } function getNftNodesLeft(uint256 _nftId) public 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 _fromBlock, uint256 _toBlock) public view returns (uint256) { address serviceContract = _msgSender(); 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 stakedAtBlock = entityServiceNodeStakedAtBlock[_entity][serviceContract][_nodeId] > 0 ? entityServiceNodeStakedAtBlock[_entity][serviceContract][_nodeId] : (entityNodeStakedAtBlock[_entity][_nodeId] > 0 ? entityNodeStakedAtBlock[_entity][_nodeId] : nftIdStakedAtBlock[nftId]); uint256 effectiveBlock = nftBonusEffectiveBlock[bonusName]; uint256 startFromBlock = stakedAtBlock > _fromBlock ? stakedAtBlock : _fromBlock; if (startFromBlock < effectiveBlock) { startFromBlock = effectiveBlock; } if (stakedAtBlock == 0 && keccak256(abi.encode(bonusName)) == keccak256(abi.encode("BRONZE"))) { return CStrongNFTBonus.getBonus(_entity, _nodeId, startFromBlock, _toBlock); } if (nftId == 0) return 0; if (stakedAtBlock == 0) return 0; if (effectiveBlock == 0) return 0; if (startFromBlock >= _toBlock) return 0; if (CERC1155.balanceOf(address(this), nftId) == 0) return 0; return _toBlock.sub(startFromBlock).mul(nftBonusValue[bonusName]); } function isStaked(uint256 _nftId, uint128 _nodeId, address _serviceContract) public returns (bool) { return (_serviceContract == address(CService) && entityNodeStakedNftId[_msgSender()][_nodeId] == _nftId) || entityServiceNodeStakedNftId[_msgSender()][_serviceContract][_nodeId] == _nftId; } // // Staking // ------------------------------------------------------------------------------------------------------------------- function stakeNFT(uint256 _nftId, uint128 _nodeId, address _serviceContract) public payable { string memory bonusName = getNftBonusName(_nftId); require(keccak256(abi.encode(bonusName)) != keccak256(abi.encode("")), "not eligible"); require(CERC1155.balanceOf(_msgSender(), _nftId) != 0 || (CERC1155.balanceOf(address(this), _nftId) != 0 && nftIdStakedToEntity[_nftId] == _msgSender()), "not enough"); require(nftIdStakedToNodesCount[_nftId] < nftBonusNodesLimit[bonusName], "over limit"); require(serviceContracts[_serviceContract], "service doesnt exist"); require(ServiceInterface(_serviceContract).doesNodeExist(_msgSender(), _nodeId), "node doesnt exist"); require(!isStaked(_nftId, _nodeId, _serviceContract), "already staked"); entityServiceNodeStakedNftId[_msgSender()][_serviceContract][_nodeId] = _nftId; nftIdStakedToEntity[_nftId] = _msgSender(); entityServiceNodeStakedAtBlock[_msgSender()][_serviceContract][_nodeId] = block.number; nftIdStakedToNodesCount[_nftId] += 1; bool alreadyExists = false; for (uint8 i = 0; i < entityStakedNftIds[_msgSender()].length; i++) { if (entityStakedNftIds[_msgSender()][i] == _nftId) { alreadyExists = true; break; } } if (!alreadyExists) { entityStakedNftIds[_msgSender()].push(_nftId); } if (CERC1155.balanceOf(address(this), _nftId) == 0) { CERC1155.safeTransferFrom(_msgSender(), address(this), _nftId, 1, bytes("")); } emit StakedToNode(_msgSender(), _nftId, _nodeId, block.number, _serviceContract); } function unStakeNFT(uint256 _nftId, uint128 _nodeId, uint256 _blockNumber, address _serviceContract) public payable { require(isStaked(_nftId, _nodeId, _serviceContract), "wrong node"); require(nftIdStakedToEntity[_nftId] != address(0), "not staked"); require(nftIdStakedToEntity[_nftId] == _msgSender(), "not staker"); require(serviceContracts[_serviceContract], "service doesnt exist"); if (!ServiceInterface(_serviceContract).hasNodeExpired(_msgSender(), _nodeId)) { ServiceInterface(_serviceContract).claim{value : msg.value}(_nodeId, _blockNumber, false); } entityNodeStakedNftId[_msgSender()][_nodeId] = 0; entityServiceNodeStakedNftId[_msgSender()][_serviceContract][_nodeId] = 0; nftIdStakedToNodeId[_nftId] = 0; if (nftIdStakedToNodesCount[_nftId] > 0) { nftIdStakedToNodesCount[_nftId] -= 1; } if (nftIdStakedToNodesCount[_nftId] == 0) { nftIdStakedToEntity[_nftId] = address(0); for (uint8 i = 0; i < entityStakedNftIds[_msgSender()].length; i++) { if (entityStakedNftIds[_msgSender()][i] == _nftId) { _deleteIndex(entityStakedNftIds[_msgSender()], i); break; } } CERC1155.safeTransferFrom(address(this), _msgSender(), _nftId, 1, bytes("")); } emit UnstakedFromNode(_msgSender(), _nftId, _nodeId, _blockNumber, _serviceContract); } // // Admin // ------------------------------------------------------------------------------------------------------------------- function updateBonus(string memory _name, uint256 _lowerBound, uint256 _upperBound, uint256 _value, uint256 _block, uint8 _nodesLimit) public { require(_msgSender() == serviceAdmin || _msgSender() == 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) public { require(_msgSender() == superAdmin, "not admin"); CERC1155 = IERC1155Preset(_nftContract); } function addServiceContract(address _contract) public { require(_msgSender() == superAdmin, "not admin"); serviceContracts[_contract] = true; } function removeServiceContract(address _contract) public { require(_msgSender() == superAdmin, "not admin"); serviceContracts[_contract] = false; } function updateServiceAdmin(address newServiceAdmin) public { require(_msgSender() == superAdmin, "not admin"); serviceAdmin = newServiceAdmin; } function updateEntityNodeStakedAtBlock(address _entity, uint128 _nodeId, uint256 _block) public { require(_msgSender() == serviceAdmin || _msgSender() == superAdmin, "not admin"); entityNodeStakedAtBlock[_entity][_nodeId] = _block; } function updateEntityServiceNodeStakedAtBlock(address _entity, uint128 _nodeId, address _serviceContract, uint256 _block) public { require(_msgSender() == serviceAdmin || _msgSender() == superAdmin, "not admin"); entityServiceNodeStakedAtBlock[_entity][_serviceContract][_nodeId] = _block; } // // 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(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; interface ServiceInterface { function traunch(address) external view returns(uint256); 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 getTraunch(address entity) external view returns (uint256); function hasNodeExpired(address _entity, uint128 _nodeId) external view returns (bool); function isEntityActive(address entity) external view returns (bool); function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) external payable; }
// 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); }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol";
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC1155Receiver.sol"; import "../../introspection/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 ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../introspection/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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./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; } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}],"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":"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":"_fromBlock","type":"uint256"},{"internalType":"uint256","name":"_toBlock","type":"uint256"}],"name":"getBonus","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":"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":"uint256","name":"_nftId","type":"uint256"}],"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":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"address","name":"_serviceContract","type":"address"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"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":"address","name":"_nftContract","type":"address"}],"name":"updateContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"uint256","name":"_block","type":"uint256"}],"name":"updateEntityNodeStakedAtBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_entity","type":"address"},{"internalType":"uint128","name":"_nodeId","type":"uint128"},{"internalType":"address","name":"_serviceContract","type":"address"},{"internalType":"uint256","name":"_block","type":"uint256"}],"name":"updateEntityServiceNodeStakedAtBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newServiceAdmin","type":"address"}],"name":"updateServiceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50613300806100206000396000f3fe6080604052600436106102675760003560e01c80639171ce7111610144578063c153dc0b116100b6578063d60444ff1161007a578063d60444ff14610759578063da998dca14610786578063f23a6e611461079b578063f304e01d146107bb578063fc7ea8d1146107db578063fed0a20e146107f057610267565b8063c153dc0b146106c2578063c2c9b3c1146106d7578063c712d34a146106f7578063cb4dd51e14610719578063d4a8c0821461073957610267565b8063ac3a760111610108578063ac3a7601146105f5578063ad553eef14610615578063b07d9cbb14610635578063b64ac8e414610655578063b86bb8e314610675578063bc197c811461069557610267565b80639171ce71146105555780639954a804146105755780639f4808da14610595578063a68b62e5146105b5578063a8936d59146105d557610267565b806339e3aea2116101dd578063674edb72116101a1578063674edb721461048857806368b087e8146104a857806372ab973f146104d55780637760c6c7146104f557806378592e7414610515578063916db6eb1461053557610267565b806339e3aea2146103f3578063559b12fe146104065780635ab9daf0146104335780635ed44191146104535780636441d3791461047357610267565b8063279958a91161022f578063279958a91461033e57806329575f6a1461035e5780633183685b1461038057806331e410a8146103a0578063328f7233146103b3578063359ef75b146103d357610267565b806301ffc9a71461026c578063048cde02146102a257806304dc6ada146102c457806313f93484146102f15780631f8e027b1461031e575b600080fd5b34801561027857600080fd5b5061028c610287366004612acd565b610805565b6040516102999190612e85565b60405180910390f35b3480156102ae57600080fd5b506102c26102bd3660046129b3565b610828565b005b3480156102d057600080fd5b506102e46102df366004612af5565b6108cf565b60405161029991906131fa565b3480156102fd57600080fd5b5061031161030c366004612bbd565b6108ec565b6040516102999190612ea5565b34801561032a57600080fd5b5061028c610339366004612bbd565b610a4a565b34801561034a57600080fd5b506102c2610359366004612763565b610ad1565b34801561036a57600080fd5b50610373610b2d565b6040516102999190612d29565b34801561038c57600080fd5b506102e461039b366004612bbd565b610b3c565b6102c26103ae366004612bed565b610b4e565b3480156103bf57600080fd5b5061028c6103ce366004612bbd565b611186565b3480156103df57600080fd5b506102c26103ee36600461277e565b6111be565b6102c2610401366004612c2a565b611276565b34801561041257600080fd5b50610426610421366004612763565b6116e4565b6040516102999190612e41565b34801561043f57600080fd5b5061031161044e366004612bbd565b611750565b34801561045f57600080fd5b506102e461046e366004612a83565b6117f6565b34801561047f57600080fd5b50610373611824565b34801561049457600080fd5b506102e46104a3366004612af5565b611833565b3480156104b457600080fd5b506104c86104c3366004612af5565b611850565b6040516102999190613230565b3480156104e157600080fd5b506102e46104f0366004612ba2565b611870565b34801561050157600080fd5b506102c2610510366004612763565b611882565b34801561052157600080fd5b506102e4610530366004612bbd565b6118e0565b34801561054157600080fd5b506102e4610550366004612940565b61192b565b34801561056157600080fd5b506102c2610570366004612a00565b611948565b34801561058157600080fd5b506102e4610590366004612940565b6119d7565b3480156105a157600080fd5b506103736105b0366004612bbd565b6119f4565b3480156105c157600080fd5b506102e46105d0366004612974565b611a0f565b3480156105e157600080fd5b506102e46105f0366004612af5565b611b02565b34801561060157600080fd5b506102e4610610366004612891565b611b1f565b34801561062157600080fd5b506102c2610630366004612763565b611b42565b34801561064157600080fd5b506102e4610650366004612a40565b611b9e565b34801561066157600080fd5b506102c2610670366004612763565b611fa6565b34801561068157600080fd5b5061028c610690366004612bed565b612001565b3480156106a157600080fd5b506106b56106b03660046127e7565b6120b2565b6040516102999190612e90565b3480156106ce57600080fd5b506103736120c3565b3480156106e357600080fd5b506102e46106f2366004612af5565b6120d2565b34801561070357600080fd5b5061070c6120ef565b6040516102999190612de1565b34801561072557600080fd5b506102c2610734366004612b28565b6121c7565b34801561074557600080fd5b506102e4610754366004612891565b6123cf565b34801561076557600080fd5b50610779610774366004612bbd565b6123f2565b60405161029991906131c3565b34801561079257600080fd5b5061037361240d565b3480156107a757600080fd5b506106b56107b63660046128db565b61241c565b3480156107c757600080fd5b506104c86107d6366004612bbd565b61242d565b3480156107e757600080fd5b50610373612442565b3480156107fc57600080fd5b5061028c612451565b6001600160e01b031981166000908152600e602052604090205460ff165b919050565b6003546001600160a01b031661083c612461565b6001600160a01b0316148061086b57506004546001600160a01b0316610860612461565b6001600160a01b0316145b6108905760405162461bcd60e51b815260040161088790613178565b60405180910390fd5b6001600160a01b0393841660009081526016602090815260408083209490961682529283528481206001600160801b0390941681529290915291902055565b805160208183018101805160078252928201919093012091525481565b606060005b60055460ff82161015610a3457600660058260ff168154811061091057fe5b906000526020600020016040516109279190612cb9565b908152602001604051809103902054831015801561097c5750600760058260ff168154811061095257fe5b906000526020600020016040516109699190612cb9565b9081526020016040518091039020548311155b15610a2c5760058160ff168154811061099157fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a1f5780601f106109f457610100808354040283529160200191610a1f565b820191906000526020600020905b815481529060010190602001808311610a0257829003601f168201915b5050505050915050610823565b6001016108f1565b5050604080516020810190915260008152919050565b60025460405163328f723360e01b81526000916001600160a01b03169063328f723390610a7b9085906004016131fa565b60206040518083038186803b158015610a9357600080fd5b505afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612aad565b92915050565b6004546001600160a01b0316610ae5612461565b6001600160a01b031614610b0b5760405162461bcd60e51b815260040161088790613178565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b600c6020526000908152604090205481565b6060610b59846108ec565b9050604051602001610b6a90613167565b6040516020818303038152906040528051906020012081604051602001610b919190612ea5565b604051602081830303815290604052805190602001201415610bc55760405162461bcd60e51b815260040161088790613053565b6001546001600160a01b031662fdd58e610bdd612461565b866040518363ffffffff1660e01b8152600401610bfb929190612d99565b60206040518083038186803b158015610c1357600080fd5b505afa158015610c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4b9190612bd5565b151580610d025750600154604051627eeac760e11b81526001600160a01b039091169062fdd58e90610c839030908890600401612d99565b60206040518083038186803b158015610c9b57600080fd5b505afa158015610caf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd39190612bd5565b15801590610d025750610ce4612461565b6000858152600a60205260409020546001600160a01b039081169116145b610d1e5760405162461bcd60e51b815260040161088790612fec565b600f81604051610d2e9190612c9d565b9081526040805160209281900383019020546000878152601090935291205460ff918216911610610d715760405162461bcd60e51b815260040161088790612f42565b6001600160a01b03821660009081526014602052604090205460ff16610da95760405162461bcd60e51b815260040161088790613079565b816001600160a01b03166326665562610dc0612461565b856040518363ffffffff1660e01b8152600401610dde929190612d77565b60206040518083038186803b158015610df657600080fd5b505afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e9190612aad565b610e4a5760405162461bcd60e51b815260040161088790612fc1565b610e55848484612001565b15610e725760405162461bcd60e51b81526004016108879061319b565b8360156000610e7f612461565b6001600160a01b0390811682526020808301939093526040918201600090812091871681529083528181206001600160801b0388168252909252902055610ec4612461565b6000858152600a6020526040812080546001600160a01b0319166001600160a01b0393909316929092179091554390601690610efe612461565b6001600160a01b0390811682526020808301939093526040918201600090812091871681529083528181206001600160801b038816825283528181209390935586835260109091528120805460ff8082166001011660ff19909116179055805b60126000610f6a612461565b6001600160a01b0316815260208101919091526040016000205460ff82161015610feb578560126000610f9b612461565b6001600160a01b03166001600160a01b031681526020019081526020016000208260ff1681548110610fc957fe5b90600052602060002001541415610fe35760019150610feb565b600101610f5e565b508061102c5760126000610ffd612461565b6001600160a01b0316815260208082019290925260400160009081208054600181018255908252919020018590555b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e9061105c9030908990600401612d99565b60206040518083038186803b15801561107457600080fd5b505afa158015611088573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ac9190612bd5565b611131576001546001600160a01b031663f242432a6110c9612461565b604080516020810182526000815290516001600160e01b031960e085901b1681526110fe929130918b91600191600401612d3d565b600060405180830381600087803b15801561111857600080fd5b505af115801561112c573d6000803e3d6000fd5b505050505b611139612461565b6001600160a01b03167f2091db4757417ee6930004b3e4755720fdcb20ee7613e053f8effd4d173d3749868643876040516111779493929190613203565b60405180910390a25050505050565b6000818152600b60205260408120546001600160801b0316151580610acb57505060009081526010602052604090205460ff16151590565b600254600160a01b900460ff16156111e85760405162461bcd60e51b815260040161088790613010565b6111f86301ffc9a760e01b612465565b611208630271189760e51b612465565b600380546001600160a01b03199081166001600160a01b039485161790915560048054821692841692909217909155600080548216958316959095179094556001805485169382169390931790925560028054600160a01b9416919092161760ff60a01b1916919091179055565b611281848483612001565b61129d5760405162461bcd60e51b815260040161088790612f66565b6000848152600a60205260409020546001600160a01b03166112d15760405162461bcd60e51b815260040161088790613102565b6112d9612461565b6000858152600a60205260409020546001600160a01b039081169116146113125760405162461bcd60e51b8152600401610887906130de565b6001600160a01b03811660009081526014602052604090205460ff1661134a5760405162461bcd60e51b815260040161088790613079565b806001600160a01b0316636c52ec10611361612461565b856040518363ffffffff1660e01b815260040161137f929190612d77565b60206040518083038186803b15801561139757600080fd5b505afa1580156113ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cf9190612aad565b61143957604051630e6507e960e21b81526001600160a01b038216906339941fa490349061140690879087906000906004016131d7565b6000604051808303818588803b15801561141f57600080fd5b505af1158015611433573d6000803e3d6000fd5b50505050505b6000600d6000611447612461565b6001600160a01b03168152602080820192909252604090810160009081206001600160801b0388168252909252812091909155601581611485612461565b6001600160a01b0390811682526020808301939093526040918201600090812091861681529083528181206001600160801b0388168252835281812093909355868352600b825280832080546fffffffffffffffffffffffffffffffff19169055601090915290205460ff161561151b576000848152601060205260409020805460ff19811660ff918216600019019091161790555b60008481526010602052604090205460ff16611690576000848152600a6020526040812080546001600160a01b03191690555b6012600061155a612461565b6001600160a01b0316815260208101919091526040016000205460ff8216101561160f57846012600061158b612461565b6001600160a01b03166001600160a01b031681526020019081526020016000208260ff16815481106115b957fe5b9060005260206000200154141561160757611602601260006115d9612461565b6001600160a01b03166001600160a01b031681526020019081526020016000208260ff166124b4565b61160f565b60010161154e565b506001546001600160a01b031663f242432a3061162a612461565b876001604051806020016040528060008152506040518663ffffffff1660e01b815260040161165d959493929190612d3d565b600060405180830381600087803b15801561167757600080fd5b505af115801561168b573d6000803e3d6000fd5b505050505b611698612461565b6001600160a01b03167f71d135e12a0a354469f06fae55d676e28a84fec8b3a2e61f0a5a0f3208e3b6ac858585856040516116d69493929190613203565b60405180910390a250505050565b6001600160a01b03811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561174457602002820191906000526020600020905b815481526020019060010190808311611730575b50505050509050919050565b6005818154811061175d57fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152935090918301828280156117ee5780601f106117c3576101008083540402835291602001916117ee565b820191906000526020600020905b8154815290600101906020018083116117d157829003601f168201915b505050505081565b6012602052816000526040600020818154811061180f57fe5b90600052602060002001600091509150505481565b6001546001600160a01b031681565b805160208183018101805160088252928201919093012091525481565b8051602081830181018051600f8252928201919093012091525460ff1681565b60116020526000908152604090205481565b6004546001600160a01b0316611896612461565b6001600160a01b0316146118bc5760405162461bcd60e51b815260040161088790613178565b6001600160a01b03166000908152601460205260409020805460ff19166001179055565b60008181526010602052604081205460ff16600f6118fd846108ec565b60405161190a9190612c9d565b9081526040519081900360200190205460ff90811691909103169050919050565b601360209081526000928352604080842090915290825290205481565b6003546001600160a01b031661195c612461565b6001600160a01b0316148061198b57506004546001600160a01b0316611980612461565b6001600160a01b0316145b6119a75760405162461bcd60e51b815260040161088790613178565b6001600160a01b0390921660009081526013602090815260408083206001600160801b0390941683529290522055565b600d60209081526000928352604080842090915290825290205481565b600a602052600090815260409020546001600160a01b031681565b6001600160a01b038084166000818152600d602090815260408083206001600160801b038816808552908352818420549484526015835281842087871685528352818420908452909152808220546002549151630d06322560e21b815292949092859290911690633418c89490611a8c908a908a90600401612d77565b60206040518083038186803b158015611aa457600080fd5b505afa158015611ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adc9190612bd5565b905081611af55782611aee5780611af0565b825b611af7565b815b979650505050505050565b805160208183018101805160068252928201919093012091525481565b601560209081526000938452604080852082529284528284209052825290205481565b6004546001600160a01b0316611b56612461565b6001600160a01b031614611b7c5760405162461bcd60e51b815260040161088790613178565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080611ba9612461565b6001600160a01b03811660009081526014602052604090205490915060ff16611be45760405162461bcd60e51b815260040161088790613079565b6000611bf1878784611a0f565b90506060611bfe826108ec565b9050604051602001611c0f90613167565b6040516020818303038152906040528051906020012081604051602001611c369190612ea5565b604051602081830303815290604052805190602001201415611c5e5760009350505050611f9e565b6001600160a01b03808916600090815260166020908152604080832093871683529281528282206001600160801b038b168352905290812054611d13576001600160a01b03891660009081526013602090815260408083206001600160801b038c168452909152902054611ce0576000838152600c6020526040902054611d0e565b6001600160a01b03891660009081526013602090815260408083206001600160801b038c1684529091529020545b611d4b565b6001600160a01b03808a16600090815260166020908152604080832093881683529281528282206001600160801b038c168352905220545b90506000600983604051611d5f9190612c9d565b90815260200160405180910390205490506000888311611d7f5788611d81565b825b905081811015611d8e5750805b82158015611de55750604051602001611da690613033565b6040516020818303038152906040528051906020012084604051602001611dcd9190612ea5565b60405160208183030381529060405280519060200120145b15611e7d5760025460405163b07d9cbb60e01b81526001600160a01b039091169063b07d9cbb90611e20908e908e9086908e90600401612db2565b60206040518083038186803b158015611e3857600080fd5b505afa158015611e4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e709190612bd5565b9650505050505050611f9e565b84611e915760009650505050505050611f9e565b82611ea55760009650505050505050611f9e565b81611eb95760009650505050505050611f9e565b878110611ecf5760009650505050505050611f9e565b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e90611eff9030908990600401612d99565b60206040518083038186803b158015611f1757600080fd5b505afa158015611f2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4f9190612bd5565b611f625760009650505050505050611f9e565b611f95600885604051611f759190612c9d565b90815260405190819003602001902054611f8f8a84612550565b90612578565b96505050505050505b949350505050565b6004546001600160a01b0316611fba612461565b6001600160a01b031614611fe05760405162461bcd60e51b815260040161088790613178565b6001600160a01b03166000908152601460205260409020805460ff19169055565b600080546001600160a01b038381169116148015612059575083600d6000612027612461565b6001600160a01b03168152602080820192909252604090810160009081206001600160801b0388168252909252902054145b80611f9e5750836015600061206c612461565b6001600160a01b0390811682526020808301939093526040918201600090812091871681529083528181206001600160801b038816825290925290205414949350505050565b63bc197c8160e01b95945050505050565b6002546001600160a01b031681565b805160208183018101805160098252928201919093012091525481565b60606005805480602002602001604051908101604052809291908181526020016000905b828210156121be5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156121aa5780601f1061217f576101008083540402835291602001916121aa565b820191906000526020600020905b81548152906001019060200180831161218d57829003601f168201915b505050505081526020019060010190612113565b50505050905090565b6003546001600160a01b03166121db612461565b6001600160a01b0316148061220a57506004546001600160a01b03166121ff612461565b6001600160a01b0316145b6122265760405162461bcd60e51b815260040161088790613178565b6000805b60055460ff821610156122b157876040516020016122489190612ea5565b6040516020818303038152906040528051906020012060058260ff168154811061226e57fe5b906000526020600020016040516020016122889190612eb8565b6040516020818303038152906040528051906020012014156122a957600191505b60010161222a565b50806122fc576005805460018101825560009190915287516122fa917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0019060208a01906125b9565b505b8560068860405161230d9190612c9d565b908152602001604051809103902081905550846007886040516123309190612c9d565b908152602001604051809103902081905550836008886040516123539190612c9d565b908152604051908190036020019020558261236e5743612370565b825b6009886040516123809190612c9d565b90815260200160405180910390208190555081600f886040516123a39190612c9d565b908152604051908190036020019020805460ff9290921660ff1990921691909117905550505050505050565b601660209081526000938452604080852082529284528284209052825290205481565b600b602052600090815260409020546001600160801b031681565b6003546001600160a01b031681565b63f23a6e6160e01b95945050505050565b60106020526000908152604090205460ff1681565b6000546001600160a01b031681565b600254600160a01b900460ff1681565b3390565b6001600160e01b0319808216141561248f5760405162461bcd60e51b815260040161088790612f8a565b6001600160e01b0319166000908152600e60205260409020805460ff19166001179055565b81546000906124c4906001612550565b905060008382815481106124d457fe5b906000526020600020015490508183141561250e57838054806124f357fe5b6001900381819060005260206000200160009055905561254a565b8084848154811061251b57fe5b90600052602060002001819055508380548061253357fe5b600190038181906000526020600020016000905590555b50505050565b6000828211156125725760405162461bcd60e51b8152600401610887906130a7565b50900390565b60008261258757506000610acb565b8282028284828161259457fe5b04146125b25760405162461bcd60e51b815260040161088790613126565b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106125fa57805160ff1916838001178555612627565b82800160010185558215612627579182015b8281111561262757825182559160200191906001019061260c565b50612633929150612637565b5090565b5b808211156126335760008155600101612638565b80356001600160a01b0381168114610acb57600080fd5b600082601f830112612673578081fd5b813567ffffffffffffffff811115612689578182fd5b602080820261269982820161323e565b838152935081840185830182870184018810156126b557600080fd5b600092505b848310156126d85780358252600192909201919083019083016126ba565b505050505092915050565b600082601f8301126126f3578081fd5b813567ffffffffffffffff811115612709578182fd5b61271c601f8201601f191660200161323e565b915080825283602082850101111561273357600080fd5b8060208401602084013760009082016020015292915050565b80356001600160801b0381168114610acb57600080fd5b600060208284031215612774578081fd5b6125b2838361264c565b600080600080600060a08688031215612795578081fd5b61279f878761264c565b94506127ae876020880161264c565b93506127bd876040880161264c565b92506127cc876060880161264c565b91506127db876080880161264c565b90509295509295909350565b600080600080600060a086880312156127fe578081fd5b85356128098161329d565b945060208601356128198161329d565b9350604086013567ffffffffffffffff80821115612835578283fd5b61284189838a01612663565b94506060880135915080821115612856578283fd5b61286289838a01612663565b93506080880135915080821115612877578283fd5b50612884888289016126e3565b9150509295509295909350565b6000806000606084860312156128a5578283fd5b83356128b08161329d565b925060208401356128c08161329d565b915060408401356128d0816132b5565b809150509250925092565b600080600080600060a086880312156128f2578081fd5b6128fc878761264c565b945061290b876020880161264c565b93506040860135925060608601359150608086013567ffffffffffffffff811115612934578182fd5b612884888289016126e3565b60008060408385031215612952578182fd5b61295c848461264c565b915061296b846020850161274c565b90509250929050565b600080600060608486031215612988578283fd5b83356129938161329d565b925060208401356129a3816132b5565b915060408401356128d08161329d565b600080600080608085870312156129c8578384fd5b6129d2868661264c565b93506129e1866020870161274c565b92506129f0866040870161264c565b9396929550929360600135925050565b600080600060608486031215612a14578081fd5b8335612a1f8161329d565b92506020840135612a2f816132b5565b929592945050506040919091013590565b60008060008060808587031215612a55578182fd5b612a5f868661264c565b9350612a6e866020870161274c565b93969395505050506040820135916060013590565b60008060408385031215612a95578182fd5b612a9f848461264c565b946020939093013593505050565b600060208284031215612abe578081fd5b815180151581146125b2578182fd5b600060208284031215612ade578081fd5b81356001600160e01b0319811681146125b2578182fd5b600060208284031215612b06578081fd5b813567ffffffffffffffff811115612b1c578182fd5b611f9e848285016126e3565b60008060008060008060c08789031215612b40578384fd5b863567ffffffffffffffff811115612b56578485fd5b612b6289828a016126e3565b9650506020870135945060408701359350606087013592506080870135915060a087013560ff81168114612b94578182fd5b809150509295509295509295565b600060208284031215612bb3578081fd5b6125b2838361274c565b600060208284031215612bce578081fd5b5035919050565b600060208284031215612be6578081fd5b5051919050565b600080600060608486031215612c01578081fd5b83359250612c12856020860161274c565b9150612c21856040860161264c565b90509250925092565b60008060008060808587031215612c3f578182fd5b84359350612c50866020870161274c565b925060408501359150612c66866060870161264c565b905092959194509250565b60008151808452612c89816020860160208601613271565b601f01601f19169290920160200192915050565b60008251612caf818460208701613271565b9190910192915050565b6000808354600180821660008114612cd85760018114612cef57612d1e565b60ff198316865260028304607f1686019350612d1e565b600283048786526020808720875b83811015612d165781548a820152908501908201612cfd565b505050860193505b509195945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611af790830184612c71565b6001600160a01b039290921682526001600160801b0316602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039490941684526001600160801b039290921660208401526040830152606082015260800190565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015612e3457603f19888603018452612e22858351612c71565b94509285019290850190600101612e06565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e7957835183529284019291840191600101612e5d565b50909695505050505050565b901515815260200190565b6001600160e01b031991909116815260200190565b6000602082526125b26020830184612c71565b60006020808301818452828554600180821660008114612edf5760018114612efd57612f35565b60028304607f16855260ff1983166040890152606088019350612f35565b60028304808652612f0d8a613265565b885b82811015612f2b5781548b820160400152908401908801612f0f565b8a01604001955050505b5091979650505050505050565b6020808252600a90820152691bdd995c881b1a5b5a5d60b21b604082015260600190565b6020808252600a908201526977726f6e67206e6f646560b01b604082015260600190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b6020808252601190820152701b9bd91948191bd95cdb9d08195e1a5cdd607a1b604082015260600190565b6020808252600a90820152690dcdee840cadcdeeaced60b31b604082015260600190565b602080825260099082015268696e697420646f6e6560b81b604082015260600190565b60208082526006908201526542524f4e5a4560d01b604082015260600190565b6020808252600c908201526b6e6f7420656c696769626c6560a01b604082015260600190565b6020808252601490820152731cd95c9d9a58d948191bd95cdb9d08195e1a5cdd60621b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600a90820152693737ba1039ba30b5b2b960b11b604082015260600190565b6020808252600a90820152691b9bdd081cdd185ad95960b21b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260009082015260400190565b6020808252600990820152683737ba1030b236b4b760b91b604082015260600190565b6020808252600e908201526d185b1c9958591e481cdd185ad95960921b604082015260600190565b6001600160801b0391909116815260200190565b6001600160801b0393909316835260208301919091521515604082015260600190565b90815260200190565b9384526001600160801b0392909216602084015260408301526001600160a01b0316606082015260800190565b60ff91909116815260200190565b60405181810167ffffffffffffffff8111828210171561325d57600080fd5b604052919050565b60009081526020902090565b60005b8381101561328c578181015183820152602001613274565b8381111561254a5750506000910152565b6001600160a01b03811681146132b257600080fd5b50565b6001600160801b03811681146132b257600080fdfea2646970667358221220f2f412eecbbc7712a544fb23a79e075beffc70c72a7925258e40dfca1951a6e064736f6c634300060c0033
Deployed Bytecode
0x6080604052600436106102675760003560e01c80639171ce7111610144578063c153dc0b116100b6578063d60444ff1161007a578063d60444ff14610759578063da998dca14610786578063f23a6e611461079b578063f304e01d146107bb578063fc7ea8d1146107db578063fed0a20e146107f057610267565b8063c153dc0b146106c2578063c2c9b3c1146106d7578063c712d34a146106f7578063cb4dd51e14610719578063d4a8c0821461073957610267565b8063ac3a760111610108578063ac3a7601146105f5578063ad553eef14610615578063b07d9cbb14610635578063b64ac8e414610655578063b86bb8e314610675578063bc197c811461069557610267565b80639171ce71146105555780639954a804146105755780639f4808da14610595578063a68b62e5146105b5578063a8936d59146105d557610267565b806339e3aea2116101dd578063674edb72116101a1578063674edb721461048857806368b087e8146104a857806372ab973f146104d55780637760c6c7146104f557806378592e7414610515578063916db6eb1461053557610267565b806339e3aea2146103f3578063559b12fe146104065780635ab9daf0146104335780635ed44191146104535780636441d3791461047357610267565b8063279958a91161022f578063279958a91461033e57806329575f6a1461035e5780633183685b1461038057806331e410a8146103a0578063328f7233146103b3578063359ef75b146103d357610267565b806301ffc9a71461026c578063048cde02146102a257806304dc6ada146102c457806313f93484146102f15780631f8e027b1461031e575b600080fd5b34801561027857600080fd5b5061028c610287366004612acd565b610805565b6040516102999190612e85565b60405180910390f35b3480156102ae57600080fd5b506102c26102bd3660046129b3565b610828565b005b3480156102d057600080fd5b506102e46102df366004612af5565b6108cf565b60405161029991906131fa565b3480156102fd57600080fd5b5061031161030c366004612bbd565b6108ec565b6040516102999190612ea5565b34801561032a57600080fd5b5061028c610339366004612bbd565b610a4a565b34801561034a57600080fd5b506102c2610359366004612763565b610ad1565b34801561036a57600080fd5b50610373610b2d565b6040516102999190612d29565b34801561038c57600080fd5b506102e461039b366004612bbd565b610b3c565b6102c26103ae366004612bed565b610b4e565b3480156103bf57600080fd5b5061028c6103ce366004612bbd565b611186565b3480156103df57600080fd5b506102c26103ee36600461277e565b6111be565b6102c2610401366004612c2a565b611276565b34801561041257600080fd5b50610426610421366004612763565b6116e4565b6040516102999190612e41565b34801561043f57600080fd5b5061031161044e366004612bbd565b611750565b34801561045f57600080fd5b506102e461046e366004612a83565b6117f6565b34801561047f57600080fd5b50610373611824565b34801561049457600080fd5b506102e46104a3366004612af5565b611833565b3480156104b457600080fd5b506104c86104c3366004612af5565b611850565b6040516102999190613230565b3480156104e157600080fd5b506102e46104f0366004612ba2565b611870565b34801561050157600080fd5b506102c2610510366004612763565b611882565b34801561052157600080fd5b506102e4610530366004612bbd565b6118e0565b34801561054157600080fd5b506102e4610550366004612940565b61192b565b34801561056157600080fd5b506102c2610570366004612a00565b611948565b34801561058157600080fd5b506102e4610590366004612940565b6119d7565b3480156105a157600080fd5b506103736105b0366004612bbd565b6119f4565b3480156105c157600080fd5b506102e46105d0366004612974565b611a0f565b3480156105e157600080fd5b506102e46105f0366004612af5565b611b02565b34801561060157600080fd5b506102e4610610366004612891565b611b1f565b34801561062157600080fd5b506102c2610630366004612763565b611b42565b34801561064157600080fd5b506102e4610650366004612a40565b611b9e565b34801561066157600080fd5b506102c2610670366004612763565b611fa6565b34801561068157600080fd5b5061028c610690366004612bed565b612001565b3480156106a157600080fd5b506106b56106b03660046127e7565b6120b2565b6040516102999190612e90565b3480156106ce57600080fd5b506103736120c3565b3480156106e357600080fd5b506102e46106f2366004612af5565b6120d2565b34801561070357600080fd5b5061070c6120ef565b6040516102999190612de1565b34801561072557600080fd5b506102c2610734366004612b28565b6121c7565b34801561074557600080fd5b506102e4610754366004612891565b6123cf565b34801561076557600080fd5b50610779610774366004612bbd565b6123f2565b60405161029991906131c3565b34801561079257600080fd5b5061037361240d565b3480156107a757600080fd5b506106b56107b63660046128db565b61241c565b3480156107c757600080fd5b506104c86107d6366004612bbd565b61242d565b3480156107e757600080fd5b50610373612442565b3480156107fc57600080fd5b5061028c612451565b6001600160e01b031981166000908152600e602052604090205460ff165b919050565b6003546001600160a01b031661083c612461565b6001600160a01b0316148061086b57506004546001600160a01b0316610860612461565b6001600160a01b0316145b6108905760405162461bcd60e51b815260040161088790613178565b60405180910390fd5b6001600160a01b0393841660009081526016602090815260408083209490961682529283528481206001600160801b0390941681529290915291902055565b805160208183018101805160078252928201919093012091525481565b606060005b60055460ff82161015610a3457600660058260ff168154811061091057fe5b906000526020600020016040516109279190612cb9565b908152602001604051809103902054831015801561097c5750600760058260ff168154811061095257fe5b906000526020600020016040516109699190612cb9565b9081526020016040518091039020548311155b15610a2c5760058160ff168154811061099157fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a1f5780601f106109f457610100808354040283529160200191610a1f565b820191906000526020600020905b815481529060010190602001808311610a0257829003601f168201915b5050505050915050610823565b6001016108f1565b5050604080516020810190915260008152919050565b60025460405163328f723360e01b81526000916001600160a01b03169063328f723390610a7b9085906004016131fa565b60206040518083038186803b158015610a9357600080fd5b505afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612aad565b92915050565b6004546001600160a01b0316610ae5612461565b6001600160a01b031614610b0b5760405162461bcd60e51b815260040161088790613178565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b600c6020526000908152604090205481565b6060610b59846108ec565b9050604051602001610b6a90613167565b6040516020818303038152906040528051906020012081604051602001610b919190612ea5565b604051602081830303815290604052805190602001201415610bc55760405162461bcd60e51b815260040161088790613053565b6001546001600160a01b031662fdd58e610bdd612461565b866040518363ffffffff1660e01b8152600401610bfb929190612d99565b60206040518083038186803b158015610c1357600080fd5b505afa158015610c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4b9190612bd5565b151580610d025750600154604051627eeac760e11b81526001600160a01b039091169062fdd58e90610c839030908890600401612d99565b60206040518083038186803b158015610c9b57600080fd5b505afa158015610caf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd39190612bd5565b15801590610d025750610ce4612461565b6000858152600a60205260409020546001600160a01b039081169116145b610d1e5760405162461bcd60e51b815260040161088790612fec565b600f81604051610d2e9190612c9d565b9081526040805160209281900383019020546000878152601090935291205460ff918216911610610d715760405162461bcd60e51b815260040161088790612f42565b6001600160a01b03821660009081526014602052604090205460ff16610da95760405162461bcd60e51b815260040161088790613079565b816001600160a01b03166326665562610dc0612461565b856040518363ffffffff1660e01b8152600401610dde929190612d77565b60206040518083038186803b158015610df657600080fd5b505afa158015610e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2e9190612aad565b610e4a5760405162461bcd60e51b815260040161088790612fc1565b610e55848484612001565b15610e725760405162461bcd60e51b81526004016108879061319b565b8360156000610e7f612461565b6001600160a01b0390811682526020808301939093526040918201600090812091871681529083528181206001600160801b0388168252909252902055610ec4612461565b6000858152600a6020526040812080546001600160a01b0319166001600160a01b0393909316929092179091554390601690610efe612461565b6001600160a01b0390811682526020808301939093526040918201600090812091871681529083528181206001600160801b038816825283528181209390935586835260109091528120805460ff8082166001011660ff19909116179055805b60126000610f6a612461565b6001600160a01b0316815260208101919091526040016000205460ff82161015610feb578560126000610f9b612461565b6001600160a01b03166001600160a01b031681526020019081526020016000208260ff1681548110610fc957fe5b90600052602060002001541415610fe35760019150610feb565b600101610f5e565b508061102c5760126000610ffd612461565b6001600160a01b0316815260208082019290925260400160009081208054600181018255908252919020018590555b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e9061105c9030908990600401612d99565b60206040518083038186803b15801561107457600080fd5b505afa158015611088573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ac9190612bd5565b611131576001546001600160a01b031663f242432a6110c9612461565b604080516020810182526000815290516001600160e01b031960e085901b1681526110fe929130918b91600191600401612d3d565b600060405180830381600087803b15801561111857600080fd5b505af115801561112c573d6000803e3d6000fd5b505050505b611139612461565b6001600160a01b03167f2091db4757417ee6930004b3e4755720fdcb20ee7613e053f8effd4d173d3749868643876040516111779493929190613203565b60405180910390a25050505050565b6000818152600b60205260408120546001600160801b0316151580610acb57505060009081526010602052604090205460ff16151590565b600254600160a01b900460ff16156111e85760405162461bcd60e51b815260040161088790613010565b6111f86301ffc9a760e01b612465565b611208630271189760e51b612465565b600380546001600160a01b03199081166001600160a01b039485161790915560048054821692841692909217909155600080548216958316959095179094556001805485169382169390931790925560028054600160a01b9416919092161760ff60a01b1916919091179055565b611281848483612001565b61129d5760405162461bcd60e51b815260040161088790612f66565b6000848152600a60205260409020546001600160a01b03166112d15760405162461bcd60e51b815260040161088790613102565b6112d9612461565b6000858152600a60205260409020546001600160a01b039081169116146113125760405162461bcd60e51b8152600401610887906130de565b6001600160a01b03811660009081526014602052604090205460ff1661134a5760405162461bcd60e51b815260040161088790613079565b806001600160a01b0316636c52ec10611361612461565b856040518363ffffffff1660e01b815260040161137f929190612d77565b60206040518083038186803b15801561139757600080fd5b505afa1580156113ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cf9190612aad565b61143957604051630e6507e960e21b81526001600160a01b038216906339941fa490349061140690879087906000906004016131d7565b6000604051808303818588803b15801561141f57600080fd5b505af1158015611433573d6000803e3d6000fd5b50505050505b6000600d6000611447612461565b6001600160a01b03168152602080820192909252604090810160009081206001600160801b0388168252909252812091909155601581611485612461565b6001600160a01b0390811682526020808301939093526040918201600090812091861681529083528181206001600160801b0388168252835281812093909355868352600b825280832080546fffffffffffffffffffffffffffffffff19169055601090915290205460ff161561151b576000848152601060205260409020805460ff19811660ff918216600019019091161790555b60008481526010602052604090205460ff16611690576000848152600a6020526040812080546001600160a01b03191690555b6012600061155a612461565b6001600160a01b0316815260208101919091526040016000205460ff8216101561160f57846012600061158b612461565b6001600160a01b03166001600160a01b031681526020019081526020016000208260ff16815481106115b957fe5b9060005260206000200154141561160757611602601260006115d9612461565b6001600160a01b03166001600160a01b031681526020019081526020016000208260ff166124b4565b61160f565b60010161154e565b506001546001600160a01b031663f242432a3061162a612461565b876001604051806020016040528060008152506040518663ffffffff1660e01b815260040161165d959493929190612d3d565b600060405180830381600087803b15801561167757600080fd5b505af115801561168b573d6000803e3d6000fd5b505050505b611698612461565b6001600160a01b03167f71d135e12a0a354469f06fae55d676e28a84fec8b3a2e61f0a5a0f3208e3b6ac858585856040516116d69493929190613203565b60405180910390a250505050565b6001600160a01b03811660009081526012602090815260409182902080548351818402810184019094528084526060939283018282801561174457602002820191906000526020600020905b815481526020019060010190808311611730575b50505050509050919050565b6005818154811061175d57fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152935090918301828280156117ee5780601f106117c3576101008083540402835291602001916117ee565b820191906000526020600020905b8154815290600101906020018083116117d157829003601f168201915b505050505081565b6012602052816000526040600020818154811061180f57fe5b90600052602060002001600091509150505481565b6001546001600160a01b031681565b805160208183018101805160088252928201919093012091525481565b8051602081830181018051600f8252928201919093012091525460ff1681565b60116020526000908152604090205481565b6004546001600160a01b0316611896612461565b6001600160a01b0316146118bc5760405162461bcd60e51b815260040161088790613178565b6001600160a01b03166000908152601460205260409020805460ff19166001179055565b60008181526010602052604081205460ff16600f6118fd846108ec565b60405161190a9190612c9d565b9081526040519081900360200190205460ff90811691909103169050919050565b601360209081526000928352604080842090915290825290205481565b6003546001600160a01b031661195c612461565b6001600160a01b0316148061198b57506004546001600160a01b0316611980612461565b6001600160a01b0316145b6119a75760405162461bcd60e51b815260040161088790613178565b6001600160a01b0390921660009081526013602090815260408083206001600160801b0390941683529290522055565b600d60209081526000928352604080842090915290825290205481565b600a602052600090815260409020546001600160a01b031681565b6001600160a01b038084166000818152600d602090815260408083206001600160801b038816808552908352818420549484526015835281842087871685528352818420908452909152808220546002549151630d06322560e21b815292949092859290911690633418c89490611a8c908a908a90600401612d77565b60206040518083038186803b158015611aa457600080fd5b505afa158015611ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adc9190612bd5565b905081611af55782611aee5780611af0565b825b611af7565b815b979650505050505050565b805160208183018101805160068252928201919093012091525481565b601560209081526000938452604080852082529284528284209052825290205481565b6004546001600160a01b0316611b56612461565b6001600160a01b031614611b7c5760405162461bcd60e51b815260040161088790613178565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080611ba9612461565b6001600160a01b03811660009081526014602052604090205490915060ff16611be45760405162461bcd60e51b815260040161088790613079565b6000611bf1878784611a0f565b90506060611bfe826108ec565b9050604051602001611c0f90613167565b6040516020818303038152906040528051906020012081604051602001611c369190612ea5565b604051602081830303815290604052805190602001201415611c5e5760009350505050611f9e565b6001600160a01b03808916600090815260166020908152604080832093871683529281528282206001600160801b038b168352905290812054611d13576001600160a01b03891660009081526013602090815260408083206001600160801b038c168452909152902054611ce0576000838152600c6020526040902054611d0e565b6001600160a01b03891660009081526013602090815260408083206001600160801b038c1684529091529020545b611d4b565b6001600160a01b03808a16600090815260166020908152604080832093881683529281528282206001600160801b038c168352905220545b90506000600983604051611d5f9190612c9d565b90815260200160405180910390205490506000888311611d7f5788611d81565b825b905081811015611d8e5750805b82158015611de55750604051602001611da690613033565b6040516020818303038152906040528051906020012084604051602001611dcd9190612ea5565b60405160208183030381529060405280519060200120145b15611e7d5760025460405163b07d9cbb60e01b81526001600160a01b039091169063b07d9cbb90611e20908e908e9086908e90600401612db2565b60206040518083038186803b158015611e3857600080fd5b505afa158015611e4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e709190612bd5565b9650505050505050611f9e565b84611e915760009650505050505050611f9e565b82611ea55760009650505050505050611f9e565b81611eb95760009650505050505050611f9e565b878110611ecf5760009650505050505050611f9e565b600154604051627eeac760e11b81526001600160a01b039091169062fdd58e90611eff9030908990600401612d99565b60206040518083038186803b158015611f1757600080fd5b505afa158015611f2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4f9190612bd5565b611f625760009650505050505050611f9e565b611f95600885604051611f759190612c9d565b90815260405190819003602001902054611f8f8a84612550565b90612578565b96505050505050505b949350505050565b6004546001600160a01b0316611fba612461565b6001600160a01b031614611fe05760405162461bcd60e51b815260040161088790613178565b6001600160a01b03166000908152601460205260409020805460ff19169055565b600080546001600160a01b038381169116148015612059575083600d6000612027612461565b6001600160a01b03168152602080820192909252604090810160009081206001600160801b0388168252909252902054145b80611f9e5750836015600061206c612461565b6001600160a01b0390811682526020808301939093526040918201600090812091871681529083528181206001600160801b038816825290925290205414949350505050565b63bc197c8160e01b95945050505050565b6002546001600160a01b031681565b805160208183018101805160098252928201919093012091525481565b60606005805480602002602001604051908101604052809291908181526020016000905b828210156121be5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156121aa5780601f1061217f576101008083540402835291602001916121aa565b820191906000526020600020905b81548152906001019060200180831161218d57829003601f168201915b505050505081526020019060010190612113565b50505050905090565b6003546001600160a01b03166121db612461565b6001600160a01b0316148061220a57506004546001600160a01b03166121ff612461565b6001600160a01b0316145b6122265760405162461bcd60e51b815260040161088790613178565b6000805b60055460ff821610156122b157876040516020016122489190612ea5565b6040516020818303038152906040528051906020012060058260ff168154811061226e57fe5b906000526020600020016040516020016122889190612eb8565b6040516020818303038152906040528051906020012014156122a957600191505b60010161222a565b50806122fc576005805460018101825560009190915287516122fa917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0019060208a01906125b9565b505b8560068860405161230d9190612c9d565b908152602001604051809103902081905550846007886040516123309190612c9d565b908152602001604051809103902081905550836008886040516123539190612c9d565b908152604051908190036020019020558261236e5743612370565b825b6009886040516123809190612c9d565b90815260200160405180910390208190555081600f886040516123a39190612c9d565b908152604051908190036020019020805460ff9290921660ff1990921691909117905550505050505050565b601660209081526000938452604080852082529284528284209052825290205481565b600b602052600090815260409020546001600160801b031681565b6003546001600160a01b031681565b63f23a6e6160e01b95945050505050565b60106020526000908152604090205460ff1681565b6000546001600160a01b031681565b600254600160a01b900460ff1681565b3390565b6001600160e01b0319808216141561248f5760405162461bcd60e51b815260040161088790612f8a565b6001600160e01b0319166000908152600e60205260409020805460ff19166001179055565b81546000906124c4906001612550565b905060008382815481106124d457fe5b906000526020600020015490508183141561250e57838054806124f357fe5b6001900381819060005260206000200160009055905561254a565b8084848154811061251b57fe5b90600052602060002001819055508380548061253357fe5b600190038181906000526020600020016000905590555b50505050565b6000828211156125725760405162461bcd60e51b8152600401610887906130a7565b50900390565b60008261258757506000610acb565b8282028284828161259457fe5b04146125b25760405162461bcd60e51b815260040161088790613126565b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106125fa57805160ff1916838001178555612627565b82800160010185558215612627579182015b8281111561262757825182559160200191906001019061260c565b50612633929150612637565b5090565b5b808211156126335760008155600101612638565b80356001600160a01b0381168114610acb57600080fd5b600082601f830112612673578081fd5b813567ffffffffffffffff811115612689578182fd5b602080820261269982820161323e565b838152935081840185830182870184018810156126b557600080fd5b600092505b848310156126d85780358252600192909201919083019083016126ba565b505050505092915050565b600082601f8301126126f3578081fd5b813567ffffffffffffffff811115612709578182fd5b61271c601f8201601f191660200161323e565b915080825283602082850101111561273357600080fd5b8060208401602084013760009082016020015292915050565b80356001600160801b0381168114610acb57600080fd5b600060208284031215612774578081fd5b6125b2838361264c565b600080600080600060a08688031215612795578081fd5b61279f878761264c565b94506127ae876020880161264c565b93506127bd876040880161264c565b92506127cc876060880161264c565b91506127db876080880161264c565b90509295509295909350565b600080600080600060a086880312156127fe578081fd5b85356128098161329d565b945060208601356128198161329d565b9350604086013567ffffffffffffffff80821115612835578283fd5b61284189838a01612663565b94506060880135915080821115612856578283fd5b61286289838a01612663565b93506080880135915080821115612877578283fd5b50612884888289016126e3565b9150509295509295909350565b6000806000606084860312156128a5578283fd5b83356128b08161329d565b925060208401356128c08161329d565b915060408401356128d0816132b5565b809150509250925092565b600080600080600060a086880312156128f2578081fd5b6128fc878761264c565b945061290b876020880161264c565b93506040860135925060608601359150608086013567ffffffffffffffff811115612934578182fd5b612884888289016126e3565b60008060408385031215612952578182fd5b61295c848461264c565b915061296b846020850161274c565b90509250929050565b600080600060608486031215612988578283fd5b83356129938161329d565b925060208401356129a3816132b5565b915060408401356128d08161329d565b600080600080608085870312156129c8578384fd5b6129d2868661264c565b93506129e1866020870161274c565b92506129f0866040870161264c565b9396929550929360600135925050565b600080600060608486031215612a14578081fd5b8335612a1f8161329d565b92506020840135612a2f816132b5565b929592945050506040919091013590565b60008060008060808587031215612a55578182fd5b612a5f868661264c565b9350612a6e866020870161274c565b93969395505050506040820135916060013590565b60008060408385031215612a95578182fd5b612a9f848461264c565b946020939093013593505050565b600060208284031215612abe578081fd5b815180151581146125b2578182fd5b600060208284031215612ade578081fd5b81356001600160e01b0319811681146125b2578182fd5b600060208284031215612b06578081fd5b813567ffffffffffffffff811115612b1c578182fd5b611f9e848285016126e3565b60008060008060008060c08789031215612b40578384fd5b863567ffffffffffffffff811115612b56578485fd5b612b6289828a016126e3565b9650506020870135945060408701359350606087013592506080870135915060a087013560ff81168114612b94578182fd5b809150509295509295509295565b600060208284031215612bb3578081fd5b6125b2838361274c565b600060208284031215612bce578081fd5b5035919050565b600060208284031215612be6578081fd5b5051919050565b600080600060608486031215612c01578081fd5b83359250612c12856020860161274c565b9150612c21856040860161264c565b90509250925092565b60008060008060808587031215612c3f578182fd5b84359350612c50866020870161274c565b925060408501359150612c66866060870161264c565b905092959194509250565b60008151808452612c89816020860160208601613271565b601f01601f19169290920160200192915050565b60008251612caf818460208701613271565b9190910192915050565b6000808354600180821660008114612cd85760018114612cef57612d1e565b60ff198316865260028304607f1686019350612d1e565b600283048786526020808720875b83811015612d165781548a820152908501908201612cfd565b505050860193505b509195945050505050565b6001600160a01b0391909116815260200190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611af790830184612c71565b6001600160a01b039290921682526001600160801b0316602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039490941684526001600160801b039290921660208401526040830152606082015260800190565b6000602080830181845280855180835260408601915060408482028701019250838701855b82811015612e3457603f19888603018452612e22858351612c71565b94509285019290850190600101612e06565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015612e7957835183529284019291840191600101612e5d565b50909695505050505050565b901515815260200190565b6001600160e01b031991909116815260200190565b6000602082526125b26020830184612c71565b60006020808301818452828554600180821660008114612edf5760018114612efd57612f35565b60028304607f16855260ff1983166040890152606088019350612f35565b60028304808652612f0d8a613265565b885b82811015612f2b5781548b820160400152908401908801612f0f565b8a01604001955050505b5091979650505050505050565b6020808252600a90820152691bdd995c881b1a5b5a5d60b21b604082015260600190565b6020808252600a908201526977726f6e67206e6f646560b01b604082015260600190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b6020808252601190820152701b9bd91948191bd95cdb9d08195e1a5cdd607a1b604082015260600190565b6020808252600a90820152690dcdee840cadcdeeaced60b31b604082015260600190565b602080825260099082015268696e697420646f6e6560b81b604082015260600190565b60208082526006908201526542524f4e5a4560d01b604082015260600190565b6020808252600c908201526b6e6f7420656c696769626c6560a01b604082015260600190565b6020808252601490820152731cd95c9d9a58d948191bd95cdb9d08195e1a5cdd60621b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600a90820152693737ba1039ba30b5b2b960b11b604082015260600190565b6020808252600a90820152691b9bdd081cdd185ad95960b21b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b602080825260009082015260400190565b6020808252600990820152683737ba1030b236b4b760b91b604082015260600190565b6020808252600e908201526d185b1c9958591e481cdd185ad95960921b604082015260600190565b6001600160801b0391909116815260200190565b6001600160801b0393909316835260208301919091521515604082015260600190565b90815260200190565b9384526001600160801b0392909216602084015260408301526001600160a01b0316606082015260800190565b60ff91909116815260200190565b60405181810167ffffffffffffffff8111828210171561325d57600080fd5b604052919050565b60009081526020902090565b60005b8381101561328c578181015183820152602001613274565b8381111561254a5750506000910152565b6001600160a01b03811681146132b257600080fd5b50565b6001600160801b03811681146132b257600080fdfea2646970667358221220f2f412eecbbc7712a544fb23a79e075beffc70c72a7925258e40dfca1951a6e064736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.