ERC-1155
Overview
Max Total Supply
78
Holders
14
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TreasureHunt
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-11-05 */ // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.3.2 (utils/introspection/IERC165.sol) pragma solidity ^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); } // OpenZeppelin Contracts v4.3.2 (utils/Context.sol) /** * @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 meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // OpenZeppelin Contracts v4.3.2 (token/ERC1155/ERC1155.sol) // OpenZeppelin Contracts v4.3.2 (token/ERC1155/IERC1155.sol) /** * @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 IERC1155 is IERC165 { /** * @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; } // OpenZeppelin Contracts v4.3.2 (token/ERC1155/IERC1155Receiver.sol) /** * @dev _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); } // OpenZeppelin Contracts v4.3.2 (token/ERC1155/extensions/IERC1155MetadataURI.sol) /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `{id}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); } // OpenZeppelin Contracts v4.3.2 (utils/Address.sol) /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // OpenZeppelin Contracts v4.3.2 (utils/introspection/ERC165.sol) /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `{id}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `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 memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - 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[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `{id}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/{id}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * 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 _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } } // OpenZeppelin Contracts v4.3.2 (utils/Strings.sol) /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // Author: Mrs. Click // OpenZeppelin Contracts v4.3.2 (token/ERC1155/extensions/ERC1155Supply.sol) /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_mint}. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual override { super._mint(account, id, amount, data); _totalSupply[id] += amount; } /** * @dev See {ERC1155-_mintBatch}. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._mintBatch(to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } /** * @dev See {ERC1155-_burn}. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual override { super._burn(account, id, amount); _totalSupply[id] -= amount; } /** * @dev See {ERC1155-_burnBatch}. */ function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual override { super._burnBatch(account, ids, amounts); for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } // OpenZeppelin Contracts v4.3.2 (token/ERC1155/extensions/ERC1155Burnable.sol) /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } } // OpenZeppelin Contracts v4.3.2 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } contract TreasureHunt is Context, Ownable, ERC1155Supply { string public base_uri_head = "https://treasurehunt.art/metadata/"; string public base_uri_tail = ".json"; //Chances out of 1000 to mint a particular map piece. uint[] public PIECES_CHANCES = [1, 5, 25, 40, 60, 80, 100, 150, 160, 180, 200]; uint constant public MAX_PIECES_PER_MINT = 20; uint constant public MAX_TOTAL_SUPPLY = 10000; uint constant public MAX_REDEEMS = 40; uint constant public PRICE_PER_PIECE = 0.05 ether; uint constant public TREASURE = 10 ether; uint public treasuresRedeemed; bool public saleStarted = false; bool public tradeStarted = false; uint tokensBurnt; constructor() ERC1155("TreasureHunt") { } function setApprovalForAll(address who, bool val) public override { require(tradeStarted, "Trade has not yet started"); super.setApprovalForAll(who, val); } function safeTransferFrom(address a, address b, uint c, uint d, bytes memory e) public override { require(tradeStarted, "Trade has not yet started"); super.safeTransferFrom(a,b,c,d,e); } function safeBatchTransferFrom(address a, address b, uint[] memory c, uint[] memory d, bytes memory e) public override { require(tradeStarted, "Trade has not yet started"); super.safeBatchTransferFrom(a,b,c,d,e); } function tokensMinted() public view returns(uint result){ for (uint i=1; i<=11; i++) { result += totalSupply(i); } result += tokensBurnt; } function startSale() public { require(msg.sender == owner()); saleStarted = true; } function startTrade() public { require(msg.sender == owner()); tradeStarted = true; } function withdraw() public { require(msg.sender == owner()); payable(owner()).call{value: address(this).balance}(""); // solhint-disable-line } function uri(uint _id) public view override returns(string memory){ return string(abi.encodePacked(base_uri_head, Strings.toString(_id), base_uri_tail)); } function saleIsActive() public view returns(bool){ return (saleStarted && tokensMinted() <= MAX_TOTAL_SUPPLY); } function calculatePieceRarity() internal view returns(uint) { uint numberOfOutcomes = PIECES_CHANCES.length; uint entropy = uint(keccak256(abi.encodePacked( blockhash(block.number-1), block.timestamp, msg.sender, tx.origin, tokensMinted(), block.chainid ))); uint result = entropy % 1000; uint sum = 0; for (uint i=0; i<numberOfOutcomes; i++) { sum += PIECES_CHANCES[i]; if (result < sum) { return numberOfOutcomes-i; //11th is the rarest piece, 1st is the least rare } } return(0); //cannot occur } function enoughMoneyToRedeem() internal view returns(bool) { return address(this).balance >= TREASURE; } function eligibleToRedeem(address who) public view returns(bool) { return enoughMoneyToRedeem() && ((balanceOf(who, 1) >=1 && balanceOf(who, 2) >=1 && balanceOf(who, 3) >=1 && balanceOf(who, 4) >=1 && balanceOf(who, 5) >=1 && balanceOf(who, 6) >=1 && balanceOf(who, 7) >=1 && balanceOf(who, 8) >=1 && balanceOf(who, 9) >=1 && balanceOf(who, 10) >=1) || balanceOf(who, 11) >= 1); } function burn( address account, uint256 id, uint256 value) internal virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved"); _burn(account, id, value); tokensBurnt += value; } function redeem() public { require(eligibleToRedeem(_msgSender()), "Cannot redeem treasure"); treasuresRedeemed++; if (balanceOf(_msgSender(), 11) < 1) { for (uint i=1; i<11; i++) { burn(_msgSender(), i, 1); } } else { burn(_msgSender(), 11, 1); } payable(_msgSender()).call{value: TREASURE}(""); } function mint(uint _amount) public payable { require(saleIsActive(), "Sale is not active"); if (_amount+tokensMinted() > MAX_TOTAL_SUPPLY) { _amount = MAX_TOTAL_SUPPLY-tokensMinted(); } uint amountToPay = _amount*PRICE_PER_PIECE; require(_amount <= MAX_PIECES_PER_MINT, "Amount is higher than maximum per call"); require(amountToPay <= msg.value, "Provided not enouth Ether for purchase"); for (uint i=0; i<_amount; i++) { _mint(_msgSender(), calculatePieceRarity(), 1, ''); } if (msg.value > amountToPay) { payable(_msgSender()).call{value: msg.value - amountToPay}(""); } } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155) returns (bool) { return super.supportsInterface(interfaceId); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"MAX_PIECES_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_REDEEMS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"PIECES_CHANCES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PER_PIECE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"base_uri_head","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"base_uri_tail","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"eligibleToRedeem","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"},{"internalType":"address","name":"b","type":"address"},{"internalType":"uint256[]","name":"c","type":"uint256[]"},{"internalType":"uint256[]","name":"d","type":"uint256[]"},{"internalType":"bytes","name":"e","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"},{"internalType":"address","name":"b","type":"address"},{"internalType":"uint256","name":"c","type":"uint256"},{"internalType":"uint256","name":"d","type":"uint256"},{"internalType":"bytes","name":"e","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"bool","name":"val","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensMinted","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradeStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuresRedeemed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e060405260226080818152906200293460a0398051620000299160059160209091019062000188565b5060408051808201909152600580825264173539b7b760d91b6020909201918252620000589160069162000188565b506040805161016081018252600181526005602082015260199181019190915260286060820152603c6080820152605060a080830191909152606460c0830152609660e083015261010082015260b461012082015260c8610140820152620000c590600790600b62000217565b506009805461ffff19169055348015620000de57600080fd5b5060408051808201909152600c81526b151c99585cdd5c99521d5b9d60a21b60208201526200010d336200011f565b62000118816200016f565b50620002ae565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516200018490600390602084019062000188565b5050565b828054620001969062000271565b90600052602060002090601f016020900481019282620001ba576000855562000205565b82601f10620001d557805160ff191683800117855562000205565b8280016001018555821562000205579182015b8281111562000205578251825591602001919060010190620001e8565b50620002139291506200025a565b5090565b82805482825590600052602060002090810192821562000205579160200282015b8281111562000205578251829060ff1690559160200191906001019062000238565b5b808211156200021357600081556001016200025b565b600181811c908216806200028657607f821691505b60208210811415620002a857634e487b7160e01b600052602260045260246000fd5b50919050565b61267680620002be6000396000f3fe6080604052600436106101e25760003560e01c80636de9f32b11610102578063bd85b03911610095578063eb8d244411610064578063eb8d244414610554578063f242432a14610569578063f2fde38b14610589578063f6139e6e146105a957600080fd5b8063bd85b039146104ad578063be040fb0146104da578063df8b1937146104ef578063e985e9c51461050b57600080fd5b80638eb5fab6116100d15780638eb5fab61461044a578063a0712d6814610465578063a22cb46514610478578063b66a0e5d1461049857600080fd5b80636de9f32b146103d8578063715018a6146103ed5780637779c86d146104025780638da5cb5b1461042257600080fd5b80633ccfd60b1161017a57806357b277711161014957806357b277711461037e5780635c474f9e1461039457806366a1586e146103ae5780636c580801146103c357600080fd5b80633ccfd60b146102f85780634d130e411461030d5780634e1273f4146103225780634f558e791461034f57600080fd5b806329d42dbd116101b657806329d42dbd1461028c5780632eb2c2d6146102ab57806333039d3d146102cd5780633ab77690146102e357600080fd5b8062fdd58e146101e757806301ffc9a71461021a5780630e89341c1461024a578063113a438814610277575b600080fd5b3480156101f357600080fd5b50610207610202366004611c9b565b6105c9565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004611cdb565b610662565b6040519015158152602001610211565b34801561025657600080fd5b5061026a610265366004611cff565b610673565b6040516102119190611d74565b34801561028357600080fd5b5061026a6106aa565b34801561029857600080fd5b5060095461023a90610100900460ff1681565b3480156102b757600080fd5b506102cb6102c6366004611ed3565b610738565b005b3480156102d957600080fd5b5061020761271081565b3480156102ef57600080fd5b5061026a610773565b34801561030457600080fd5b506102cb610780565b34801561031957600080fd5b50610207601481565b34801561032e57600080fd5b5061034261033d366004611f7d565b6107f3565b6040516102119190612083565b34801561035b57600080fd5b5061023a61036a366004611cff565b600090815260046020526040902054151590565b34801561038a57600080fd5b5061020760085481565b3480156103a057600080fd5b5060095461023a9060ff1681565b3480156103ba57600080fd5b50610207602881565b3480156103cf57600080fd5b506102cb61091d565b3480156103e457600080fd5b50610207610945565b3480156103f957600080fd5b506102cb610992565b34801561040e57600080fd5b5061023a61041d366004612096565b6109f8565b34801561042e57600080fd5b506000546040516001600160a01b039091168152602001610211565b34801561045657600080fd5b5061020766b1a2bc2ec5000081565b6102cb610473366004611cff565b610b06565b34801561048457600080fd5b506102cb6104933660046120b1565b610ce9565b3480156104a457600080fd5b506102cb610d1a565b3480156104b957600080fd5b506102076104c8366004611cff565b60009081526004602052604090205490565b3480156104e657600080fd5b506102cb610d40565b3480156104fb57600080fd5b50610207678ac7230489e8000081565b34801561051757600080fd5b5061023a6105263660046120ed565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b34801561056057600080fd5b5061023a610e14565b34801561057557600080fd5b506102cb610584366004612120565b610e36565b34801561059557600080fd5b506102cb6105a4366004612096565b610e6a565b3480156105b557600080fd5b506102076105c4366004611cff565b610f35565b60006001600160a01b03831661063a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526001602090815260408083206001600160a01b03949094168352929052205490565b600061066d82610f56565b92915050565b6060600561068083610fa6565b60066040516020016106949392919061225a565b6040516020818303038152906040529050919050565b600680546106b790612185565b80601f01602080910402602001604051908101604052809291908181526020018280546106e390612185565b80156107305780601f1061070557610100808354040283529160200191610730565b820191906000526020600020905b81548152906001019060200180831161071357829003601f168201915b505050505081565b600954610100900460ff1661075f5760405162461bcd60e51b81526004016106319061228d565b61076c85858585856110ac565b5050505050565b600580546106b790612185565b6000546001600160a01b0316331461079757600080fd5b6000546001600160a01b03166001600160a01b0316476040515b60006040518083038185875af1925050503d80600081146107ee576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b505050565b606081518351146108585760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610631565b6000835167ffffffffffffffff81111561087457610874611d87565b60405190808252806020026020018201604052801561089d578160200160208202803683370190505b50905060005b8451811015610915576108e88582815181106108c1576108c16122c4565b60200260200101518583815181106108db576108db6122c4565b60200260200101516105c9565b8282815181106108fa576108fa6122c4565b602090810291909101015261090e816122f0565b90506108a3565b509392505050565b6000546001600160a01b0316331461093457600080fd5b6009805461ff001916610100179055565b600060015b600b811161097f5760008181526004602052604090205461096b908361230b565b915080610977816122f0565b91505061094a565b50600a5461098d908261230b565b905090565b6000546001600160a01b031633146109ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610631565b6109f6600061113c565b565b6000678ac7230489e80000471015801561066d57506001610a1a8360016105c9565b10158015610a3357506001610a308360026105c9565b10155b8015610a4a57506001610a478360036105c9565b10155b8015610a6157506001610a5e8360046105c9565b10155b8015610a7857506001610a758360056105c9565b10155b8015610a8f57506001610a8c8360066105c9565b10155b8015610aa657506001610aa38360076105c9565b10155b8015610abd57506001610aba8360086105c9565b10155b8015610ad457506001610ad18360096105c9565b10155b8015610aeb57506001610ae883600a6105c9565b10155b8061066d57506001610afe83600b6105c9565b101592915050565b610b0e610e14565b610b4f5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610631565b612710610b5a610945565b610b64908361230b565b1115610b8157610b72610945565b610b7e90612710612323565b90505b6000610b9466b1a2bc2ec500008361233a565b90506014821115610bf65760405162461bcd60e51b815260206004820152602660248201527f416d6f756e7420697320686967686572207468616e206d6178696d756d2070656044820152651c8818d85b1b60d21b6064820152608401610631565b34811115610c555760405162461bcd60e51b815260206004820152602660248201527f50726f7669646564206e6f7420656e6f75746820457468657220666f7220707560448201526572636861736560d01b6064820152608401610631565b60005b82811015610c9557610c8333610c6c61118c565b600160405180602001604052806000815250611286565b80610c8d816122f0565b915050610c58565b5080341115610ce55733610ca98234612323565b604051600081818185875af1925050503d806000811461076c576040519150601f19603f3d011682016040523d82523d6000602084013e61076c565b5050565b600954610100900460ff16610d105760405162461bcd60e51b81526004016106319061228d565b610ce582826112bb565b6000546001600160a01b03163314610d3157600080fd5b6009805460ff19166001179055565b610d49336109f8565b610d8e5760405162461bcd60e51b815260206004820152601660248201527543616e6e6f742072656465656d20747265617375726560501b6044820152606401610631565b60088054906000610d9e836122f0565b91905055506001610db6610daf3390565b600b6105c9565b1015610dec5760015b600b811015610de657610dd4338260016112c6565b80610dde816122f0565b915050610dbf565b50610df9565b610df933600b60016112c6565b336001600160a01b0316678ac7230489e800006040516107b1565b60095460009060ff16801561098d5750612710610e2f610945565b1115905090565b600954610100900460ff16610e5d5760405162461bcd60e51b81526004016106319061228d565b61076c8585858585611325565b6000546001600160a01b03163314610ec45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610631565b6001600160a01b038116610f295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610631565b610f328161113c565b50565b60078181548110610f4557600080fd5b600091825260209091200154905081565b60006001600160e01b03198216636cdb3d1360e11b1480610f8757506001600160e01b031982166303a24d0760e21b145b8061066d57506301ffc9a760e01b6001600160e01b031983161461066d565b606081610fca5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610ff45780610fde816122f0565b9150610fed9050600a8361236f565b9150610fce565b60008167ffffffffffffffff81111561100f5761100f611d87565b6040519080825280601f01601f191660200182016040528015611039576020820181803683370190505b5090505b84156110a45761104e600183612323565b915061105b600a86612383565b61106690603061230b565b60f81b81838151811061107b5761107b6122c4565b60200101906001600160f81b031916908160001a90535061109d600a8661236f565b945061103d565b949350505050565b6001600160a01b0385163314806110c857506110c88533610526565b61112f5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610631565b61076c858585858561136a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6007546000908161119e600143612323565b404233326111aa610945565b6040805160208101969096528501939093526bffffffffffffffffffffffff19606092831b811683860152911b16607483015260888201524660a882015260c80160408051601f198184030181529190528051602090910120905060006112136103e883612383565b90506000805b8481101561127a5760078181548110611234576112346122c4565b90600052602060002001548261124a919061230b565b9150818310156112685761125e8186612323565b9550505050505090565b80611272816122f0565b915050611219565b50600094505050505090565b6112928484848461154a565b600083815260046020526040812080548492906112b090849061230b565b909155505050505050565b610ce5338383611656565b6001600160a01b0383163314806112e257506112e28333610526565b6112fe5760405162461bcd60e51b815260040161063190612397565b611309838383611737565b80600a600082825461131b919061230b565b9091555050505050565b6001600160a01b03851633148061134157506113418533610526565b61135d5760405162461bcd60e51b815260040161063190612397565b61076c8585858585611760565b81518351146113cc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610631565b6001600160a01b0384166113f25760405162461bcd60e51b8152600401610631906123e0565b3360005b84518110156114dc576000858281518110611413576114136122c4565b602002602001015190506000858381518110611431576114316122c4565b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156114825760405162461bcd60e51b815260040161063190612425565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906114c190849061230b565b92505081905550505050806114d5906122f0565b90506113f6565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161152c92919061246f565b60405180910390a4611542818787878787611881565b505050505050565b6001600160a01b0384166115aa5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610631565b336115c4816000876115bb886119ec565b61076c886119ec565b60008481526001602090815260408083206001600160a01b0389168452909152812080548592906115f690849061230b565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461076c81600087878787611a37565b816001600160a01b0316836001600160a01b031614156116ca5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610631565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611742838383611b01565b6000828152600460205260408120805483929061131b908490612323565b6001600160a01b0384166117865760405162461bcd60e51b8152600401610631906123e0565b336117968187876115bb886119ec565b60008481526001602090815260408083206001600160a01b038a168452909152902054838110156117d95760405162461bcd60e51b815260040161063190612425565b60008581526001602090815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061181890849061230b565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611878828888888888611a37565b50505050505050565b6001600160a01b0384163b156115425760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906118c5908990899088908890889060040161249d565b602060405180830381600087803b1580156118df57600080fd5b505af192505050801561190f575060408051601f3d908101601f1916820190925261190c918101906124fb565b60015b6119bc5761191b612518565b806308c379a014156119555750611930612534565b8061193b5750611957565b8060405162461bcd60e51b81526004016106319190611d74565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610631565b6001600160e01b0319811663bc197c8160e01b146118785760405162461bcd60e51b8152600401610631906125be565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611a2657611a266122c4565b602090810291909101015292915050565b6001600160a01b0384163b156115425760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611a7b9089908990889088908890600401612606565b602060405180830381600087803b158015611a9557600080fd5b505af1925050508015611ac5575060408051601f3d908101601f19168201909252611ac2918101906124fb565b60015b611ad15761191b612518565b6001600160e01b0319811663f23a6e6160e01b146118785760405162461bcd60e51b8152600401610631906125be565b6001600160a01b038316611b635760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610631565b33611b9381856000611b74876119ec565b611b7d876119ec565b5050604080516020810190915260009052505050565b60008381526001602090815260408083206001600160a01b038816845290915290205482811015611c125760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610631565b60008481526001602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b80356001600160a01b0381168114611c9657600080fd5b919050565b60008060408385031215611cae57600080fd5b611cb783611c7f565b946020939093013593505050565b6001600160e01b031981168114610f3257600080fd5b600060208284031215611ced57600080fd5b8135611cf881611cc5565b9392505050565b600060208284031215611d1157600080fd5b5035919050565b60005b83811015611d33578181015183820152602001611d1b565b83811115611d42576000848401525b50505050565b60008151808452611d60816020860160208601611d18565b601f01601f19169290920160200192915050565b602081526000611cf86020830184611d48565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611dc357611dc3611d87565b6040525050565b600067ffffffffffffffff821115611de457611de4611d87565b5060051b60200190565b600082601f830112611dff57600080fd5b81356020611e0c82611dca565b604051611e198282611d9d565b83815260059390931b8501820192828101915086841115611e3957600080fd5b8286015b84811015611e545780358352918301918301611e3d565b509695505050505050565b600082601f830112611e7057600080fd5b813567ffffffffffffffff811115611e8a57611e8a611d87565b604051611ea1601f8301601f191660200182611d9d565b818152846020838601011115611eb657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611eeb57600080fd5b611ef486611c7f565b9450611f0260208701611c7f565b9350604086013567ffffffffffffffff80821115611f1f57600080fd5b611f2b89838a01611dee565b94506060880135915080821115611f4157600080fd5b611f4d89838a01611dee565b93506080880135915080821115611f6357600080fd5b50611f7088828901611e5f565b9150509295509295909350565b60008060408385031215611f9057600080fd5b823567ffffffffffffffff80821115611fa857600080fd5b818501915085601f830112611fbc57600080fd5b81356020611fc982611dca565b604051611fd68282611d9d565b83815260059390931b8501820192828101915089841115611ff657600080fd5b948201945b8386101561201b5761200c86611c7f565b82529482019490820190611ffb565b9650508601359250508082111561203157600080fd5b5061203e85828601611dee565b9150509250929050565b600081518084526020808501945080840160005b838110156120785781518752958201959082019060010161205c565b509495945050505050565b602081526000611cf86020830184612048565b6000602082840312156120a857600080fd5b611cf882611c7f565b600080604083850312156120c457600080fd5b6120cd83611c7f565b9150602083013580151581146120e257600080fd5b809150509250929050565b6000806040838503121561210057600080fd5b61210983611c7f565b915061211760208401611c7f565b90509250929050565b600080600080600060a0868803121561213857600080fd5b61214186611c7f565b945061214f60208701611c7f565b93506040860135925060608601359150608086013567ffffffffffffffff81111561217957600080fd5b611f7088828901611e5f565b600181811c9082168061219957607f821691505b602082108114156121ba57634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c90808316806121da57607f831692505b60208084108214156121fc57634e487b7160e01b600052602260045260246000fd5b81801561221057600181146122215761224e565b60ff1986168952848901965061224e565b60008881526020902060005b868110156122465781548b82015290850190830161222d565b505084890196505b50505050505092915050565b600061226682866121c0565b8451612276818360208901611d18565b612282818301866121c0565b979650505050505050565b60208082526019908201527f547261646520686173206e6f7420796574207374617274656400000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612304576123046122da565b5060010190565b6000821982111561231e5761231e6122da565b500190565b600082821015612335576123356122da565b500390565b6000816000190483118215151615612354576123546122da565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261237e5761237e612359565b500490565b60008261239257612392612359565b500690565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006124826040830185612048565b82810360208401526124948185612048565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906124c990830186612048565b82810360608401526124db8186612048565b905082810360808401526124ef8185611d48565b98975050505050505050565b60006020828403121561250d57600080fd5b8151611cf881611cc5565b600060033d11156125315760046000803e5060005160e01c5b90565b600060443d10156125425790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561257257505050505090565b828501915081518181111561258a5750505050505090565b843d87010160208285010111156125a45750505050505090565b6125b360208286010187611d9d565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061228290830184611d4856fea26469706673582212201b04f6ddfdd5629a3d45aa48cac9e7106165b36f43ca71fffdff53543223bf6664736f6c6343000809003368747470733a2f2f747265617375726568756e742e6172742f6d657461646174612f
Deployed Bytecode
0x6080604052600436106101e25760003560e01c80636de9f32b11610102578063bd85b03911610095578063eb8d244411610064578063eb8d244414610554578063f242432a14610569578063f2fde38b14610589578063f6139e6e146105a957600080fd5b8063bd85b039146104ad578063be040fb0146104da578063df8b1937146104ef578063e985e9c51461050b57600080fd5b80638eb5fab6116100d15780638eb5fab61461044a578063a0712d6814610465578063a22cb46514610478578063b66a0e5d1461049857600080fd5b80636de9f32b146103d8578063715018a6146103ed5780637779c86d146104025780638da5cb5b1461042257600080fd5b80633ccfd60b1161017a57806357b277711161014957806357b277711461037e5780635c474f9e1461039457806366a1586e146103ae5780636c580801146103c357600080fd5b80633ccfd60b146102f85780634d130e411461030d5780634e1273f4146103225780634f558e791461034f57600080fd5b806329d42dbd116101b657806329d42dbd1461028c5780632eb2c2d6146102ab57806333039d3d146102cd5780633ab77690146102e357600080fd5b8062fdd58e146101e757806301ffc9a71461021a5780630e89341c1461024a578063113a438814610277575b600080fd5b3480156101f357600080fd5b50610207610202366004611c9b565b6105c9565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004611cdb565b610662565b6040519015158152602001610211565b34801561025657600080fd5b5061026a610265366004611cff565b610673565b6040516102119190611d74565b34801561028357600080fd5b5061026a6106aa565b34801561029857600080fd5b5060095461023a90610100900460ff1681565b3480156102b757600080fd5b506102cb6102c6366004611ed3565b610738565b005b3480156102d957600080fd5b5061020761271081565b3480156102ef57600080fd5b5061026a610773565b34801561030457600080fd5b506102cb610780565b34801561031957600080fd5b50610207601481565b34801561032e57600080fd5b5061034261033d366004611f7d565b6107f3565b6040516102119190612083565b34801561035b57600080fd5b5061023a61036a366004611cff565b600090815260046020526040902054151590565b34801561038a57600080fd5b5061020760085481565b3480156103a057600080fd5b5060095461023a9060ff1681565b3480156103ba57600080fd5b50610207602881565b3480156103cf57600080fd5b506102cb61091d565b3480156103e457600080fd5b50610207610945565b3480156103f957600080fd5b506102cb610992565b34801561040e57600080fd5b5061023a61041d366004612096565b6109f8565b34801561042e57600080fd5b506000546040516001600160a01b039091168152602001610211565b34801561045657600080fd5b5061020766b1a2bc2ec5000081565b6102cb610473366004611cff565b610b06565b34801561048457600080fd5b506102cb6104933660046120b1565b610ce9565b3480156104a457600080fd5b506102cb610d1a565b3480156104b957600080fd5b506102076104c8366004611cff565b60009081526004602052604090205490565b3480156104e657600080fd5b506102cb610d40565b3480156104fb57600080fd5b50610207678ac7230489e8000081565b34801561051757600080fd5b5061023a6105263660046120ed565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205460ff1690565b34801561056057600080fd5b5061023a610e14565b34801561057557600080fd5b506102cb610584366004612120565b610e36565b34801561059557600080fd5b506102cb6105a4366004612096565b610e6a565b3480156105b557600080fd5b506102076105c4366004611cff565b610f35565b60006001600160a01b03831661063a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526001602090815260408083206001600160a01b03949094168352929052205490565b600061066d82610f56565b92915050565b6060600561068083610fa6565b60066040516020016106949392919061225a565b6040516020818303038152906040529050919050565b600680546106b790612185565b80601f01602080910402602001604051908101604052809291908181526020018280546106e390612185565b80156107305780601f1061070557610100808354040283529160200191610730565b820191906000526020600020905b81548152906001019060200180831161071357829003601f168201915b505050505081565b600954610100900460ff1661075f5760405162461bcd60e51b81526004016106319061228d565b61076c85858585856110ac565b5050505050565b600580546106b790612185565b6000546001600160a01b0316331461079757600080fd5b6000546001600160a01b03166001600160a01b0316476040515b60006040518083038185875af1925050503d80600081146107ee576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b505050565b606081518351146108585760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610631565b6000835167ffffffffffffffff81111561087457610874611d87565b60405190808252806020026020018201604052801561089d578160200160208202803683370190505b50905060005b8451811015610915576108e88582815181106108c1576108c16122c4565b60200260200101518583815181106108db576108db6122c4565b60200260200101516105c9565b8282815181106108fa576108fa6122c4565b602090810291909101015261090e816122f0565b90506108a3565b509392505050565b6000546001600160a01b0316331461093457600080fd5b6009805461ff001916610100179055565b600060015b600b811161097f5760008181526004602052604090205461096b908361230b565b915080610977816122f0565b91505061094a565b50600a5461098d908261230b565b905090565b6000546001600160a01b031633146109ec5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610631565b6109f6600061113c565b565b6000678ac7230489e80000471015801561066d57506001610a1a8360016105c9565b10158015610a3357506001610a308360026105c9565b10155b8015610a4a57506001610a478360036105c9565b10155b8015610a6157506001610a5e8360046105c9565b10155b8015610a7857506001610a758360056105c9565b10155b8015610a8f57506001610a8c8360066105c9565b10155b8015610aa657506001610aa38360076105c9565b10155b8015610abd57506001610aba8360086105c9565b10155b8015610ad457506001610ad18360096105c9565b10155b8015610aeb57506001610ae883600a6105c9565b10155b8061066d57506001610afe83600b6105c9565b101592915050565b610b0e610e14565b610b4f5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610631565b612710610b5a610945565b610b64908361230b565b1115610b8157610b72610945565b610b7e90612710612323565b90505b6000610b9466b1a2bc2ec500008361233a565b90506014821115610bf65760405162461bcd60e51b815260206004820152602660248201527f416d6f756e7420697320686967686572207468616e206d6178696d756d2070656044820152651c8818d85b1b60d21b6064820152608401610631565b34811115610c555760405162461bcd60e51b815260206004820152602660248201527f50726f7669646564206e6f7420656e6f75746820457468657220666f7220707560448201526572636861736560d01b6064820152608401610631565b60005b82811015610c9557610c8333610c6c61118c565b600160405180602001604052806000815250611286565b80610c8d816122f0565b915050610c58565b5080341115610ce55733610ca98234612323565b604051600081818185875af1925050503d806000811461076c576040519150601f19603f3d011682016040523d82523d6000602084013e61076c565b5050565b600954610100900460ff16610d105760405162461bcd60e51b81526004016106319061228d565b610ce582826112bb565b6000546001600160a01b03163314610d3157600080fd5b6009805460ff19166001179055565b610d49336109f8565b610d8e5760405162461bcd60e51b815260206004820152601660248201527543616e6e6f742072656465656d20747265617375726560501b6044820152606401610631565b60088054906000610d9e836122f0565b91905055506001610db6610daf3390565b600b6105c9565b1015610dec5760015b600b811015610de657610dd4338260016112c6565b80610dde816122f0565b915050610dbf565b50610df9565b610df933600b60016112c6565b336001600160a01b0316678ac7230489e800006040516107b1565b60095460009060ff16801561098d5750612710610e2f610945565b1115905090565b600954610100900460ff16610e5d5760405162461bcd60e51b81526004016106319061228d565b61076c8585858585611325565b6000546001600160a01b03163314610ec45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610631565b6001600160a01b038116610f295760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610631565b610f328161113c565b50565b60078181548110610f4557600080fd5b600091825260209091200154905081565b60006001600160e01b03198216636cdb3d1360e11b1480610f8757506001600160e01b031982166303a24d0760e21b145b8061066d57506301ffc9a760e01b6001600160e01b031983161461066d565b606081610fca5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610ff45780610fde816122f0565b9150610fed9050600a8361236f565b9150610fce565b60008167ffffffffffffffff81111561100f5761100f611d87565b6040519080825280601f01601f191660200182016040528015611039576020820181803683370190505b5090505b84156110a45761104e600183612323565b915061105b600a86612383565b61106690603061230b565b60f81b81838151811061107b5761107b6122c4565b60200101906001600160f81b031916908160001a90535061109d600a8661236f565b945061103d565b949350505050565b6001600160a01b0385163314806110c857506110c88533610526565b61112f5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610631565b61076c858585858561136a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6007546000908161119e600143612323565b404233326111aa610945565b6040805160208101969096528501939093526bffffffffffffffffffffffff19606092831b811683860152911b16607483015260888201524660a882015260c80160408051601f198184030181529190528051602090910120905060006112136103e883612383565b90506000805b8481101561127a5760078181548110611234576112346122c4565b90600052602060002001548261124a919061230b565b9150818310156112685761125e8186612323565b9550505050505090565b80611272816122f0565b915050611219565b50600094505050505090565b6112928484848461154a565b600083815260046020526040812080548492906112b090849061230b565b909155505050505050565b610ce5338383611656565b6001600160a01b0383163314806112e257506112e28333610526565b6112fe5760405162461bcd60e51b815260040161063190612397565b611309838383611737565b80600a600082825461131b919061230b565b9091555050505050565b6001600160a01b03851633148061134157506113418533610526565b61135d5760405162461bcd60e51b815260040161063190612397565b61076c8585858585611760565b81518351146113cc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610631565b6001600160a01b0384166113f25760405162461bcd60e51b8152600401610631906123e0565b3360005b84518110156114dc576000858281518110611413576114136122c4565b602002602001015190506000858381518110611431576114316122c4565b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156114825760405162461bcd60e51b815260040161063190612425565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906114c190849061230b565b92505081905550505050806114d5906122f0565b90506113f6565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161152c92919061246f565b60405180910390a4611542818787878787611881565b505050505050565b6001600160a01b0384166115aa5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610631565b336115c4816000876115bb886119ec565b61076c886119ec565b60008481526001602090815260408083206001600160a01b0389168452909152812080548592906115f690849061230b565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461076c81600087878787611a37565b816001600160a01b0316836001600160a01b031614156116ca5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610631565b6001600160a01b03838116600081815260026020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611742838383611b01565b6000828152600460205260408120805483929061131b908490612323565b6001600160a01b0384166117865760405162461bcd60e51b8152600401610631906123e0565b336117968187876115bb886119ec565b60008481526001602090815260408083206001600160a01b038a168452909152902054838110156117d95760405162461bcd60e51b815260040161063190612425565b60008581526001602090815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061181890849061230b565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611878828888888888611a37565b50505050505050565b6001600160a01b0384163b156115425760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906118c5908990899088908890889060040161249d565b602060405180830381600087803b1580156118df57600080fd5b505af192505050801561190f575060408051601f3d908101601f1916820190925261190c918101906124fb565b60015b6119bc5761191b612518565b806308c379a014156119555750611930612534565b8061193b5750611957565b8060405162461bcd60e51b81526004016106319190611d74565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610631565b6001600160e01b0319811663bc197c8160e01b146118785760405162461bcd60e51b8152600401610631906125be565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611a2657611a266122c4565b602090810291909101015292915050565b6001600160a01b0384163b156115425760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611a7b9089908990889088908890600401612606565b602060405180830381600087803b158015611a9557600080fd5b505af1925050508015611ac5575060408051601f3d908101601f19168201909252611ac2918101906124fb565b60015b611ad15761191b612518565b6001600160e01b0319811663f23a6e6160e01b146118785760405162461bcd60e51b8152600401610631906125be565b6001600160a01b038316611b635760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610631565b33611b9381856000611b74876119ec565b611b7d876119ec565b5050604080516020810190915260009052505050565b60008381526001602090815260408083206001600160a01b038816845290915290205482811015611c125760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610631565b60008481526001602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b80356001600160a01b0381168114611c9657600080fd5b919050565b60008060408385031215611cae57600080fd5b611cb783611c7f565b946020939093013593505050565b6001600160e01b031981168114610f3257600080fd5b600060208284031215611ced57600080fd5b8135611cf881611cc5565b9392505050565b600060208284031215611d1157600080fd5b5035919050565b60005b83811015611d33578181015183820152602001611d1b565b83811115611d42576000848401525b50505050565b60008151808452611d60816020860160208601611d18565b601f01601f19169290920160200192915050565b602081526000611cf86020830184611d48565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611dc357611dc3611d87565b6040525050565b600067ffffffffffffffff821115611de457611de4611d87565b5060051b60200190565b600082601f830112611dff57600080fd5b81356020611e0c82611dca565b604051611e198282611d9d565b83815260059390931b8501820192828101915086841115611e3957600080fd5b8286015b84811015611e545780358352918301918301611e3d565b509695505050505050565b600082601f830112611e7057600080fd5b813567ffffffffffffffff811115611e8a57611e8a611d87565b604051611ea1601f8301601f191660200182611d9d565b818152846020838601011115611eb657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611eeb57600080fd5b611ef486611c7f565b9450611f0260208701611c7f565b9350604086013567ffffffffffffffff80821115611f1f57600080fd5b611f2b89838a01611dee565b94506060880135915080821115611f4157600080fd5b611f4d89838a01611dee565b93506080880135915080821115611f6357600080fd5b50611f7088828901611e5f565b9150509295509295909350565b60008060408385031215611f9057600080fd5b823567ffffffffffffffff80821115611fa857600080fd5b818501915085601f830112611fbc57600080fd5b81356020611fc982611dca565b604051611fd68282611d9d565b83815260059390931b8501820192828101915089841115611ff657600080fd5b948201945b8386101561201b5761200c86611c7f565b82529482019490820190611ffb565b9650508601359250508082111561203157600080fd5b5061203e85828601611dee565b9150509250929050565b600081518084526020808501945080840160005b838110156120785781518752958201959082019060010161205c565b509495945050505050565b602081526000611cf86020830184612048565b6000602082840312156120a857600080fd5b611cf882611c7f565b600080604083850312156120c457600080fd5b6120cd83611c7f565b9150602083013580151581146120e257600080fd5b809150509250929050565b6000806040838503121561210057600080fd5b61210983611c7f565b915061211760208401611c7f565b90509250929050565b600080600080600060a0868803121561213857600080fd5b61214186611c7f565b945061214f60208701611c7f565b93506040860135925060608601359150608086013567ffffffffffffffff81111561217957600080fd5b611f7088828901611e5f565b600181811c9082168061219957607f821691505b602082108114156121ba57634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c90808316806121da57607f831692505b60208084108214156121fc57634e487b7160e01b600052602260045260246000fd5b81801561221057600181146122215761224e565b60ff1986168952848901965061224e565b60008881526020902060005b868110156122465781548b82015290850190830161222d565b505084890196505b50505050505092915050565b600061226682866121c0565b8451612276818360208901611d18565b612282818301866121c0565b979650505050505050565b60208082526019908201527f547261646520686173206e6f7420796574207374617274656400000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612304576123046122da565b5060010190565b6000821982111561231e5761231e6122da565b500190565b600082821015612335576123356122da565b500390565b6000816000190483118215151615612354576123546122da565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261237e5761237e612359565b500490565b60008261239257612392612359565b500690565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006124826040830185612048565b82810360208401526124948185612048565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906124c990830186612048565b82810360608401526124db8186612048565b905082810360808401526124ef8185611d48565b98975050505050505050565b60006020828403121561250d57600080fd5b8151611cf881611cc5565b600060033d11156125315760046000803e5060005160e01c5b90565b600060443d10156125425790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561257257505050505090565b828501915081518181111561258a5750505050505090565b843d87010160208285010111156125a45750505050505090565b6125b360208286010187611d9d565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061228290830184611d4856fea26469706673582212201b04f6ddfdd5629a3d45aa48cac9e7106165b36f43ca71fffdff53543223bf6664736f6c63430008090033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.