More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 102 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 15008300 | 903 days ago | IN | 0 ETH | 0.00714912 | ||||
Multi Claim | 13453220 | 1148 days ago | IN | 0 ETH | 0.00814502 | ||||
Multi Claim | 13404374 | 1156 days ago | IN | 0 ETH | 0.01877824 | ||||
Claim | 13401990 | 1156 days ago | IN | 0 ETH | 0.01202422 | ||||
Multi Claim | 13399089 | 1157 days ago | IN | 0 ETH | 0.0174525 | ||||
Multi Claim | 13399009 | 1157 days ago | IN | 0 ETH | 0.01601236 | ||||
Multi Claim | 13246414 | 1180 days ago | IN | 0 ETH | 0.05235052 | ||||
Multi Claim | 13239835 | 1181 days ago | IN | 0 ETH | 0.00985072 | ||||
Claim | 13237763 | 1182 days ago | IN | 0 ETH | 0.00695313 | ||||
Multi Claim | 13234127 | 1182 days ago | IN | 0 ETH | 0.01084694 | ||||
Multi Claim | 13234054 | 1182 days ago | IN | 0 ETH | 0.01875285 | ||||
Multi Claim | 13232265 | 1183 days ago | IN | 0 ETH | 0.02361894 | ||||
Multi Claim | 13225184 | 1184 days ago | IN | 0 ETH | 0.025828 | ||||
Multi Claim | 13224054 | 1184 days ago | IN | 0 ETH | 0.01560854 | ||||
Multi Claim | 13221993 | 1184 days ago | IN | 0 ETH | 0.00941666 | ||||
Multi Claim | 13221759 | 1184 days ago | IN | 0 ETH | 0.0114662 | ||||
Multi Claim | 13215620 | 1185 days ago | IN | 0 ETH | 0.01942469 | ||||
Multi Claim | 13210939 | 1186 days ago | IN | 0 ETH | 0.00805571 | ||||
Multi Claim | 13210939 | 1186 days ago | IN | 0 ETH | 0.00517332 | ||||
Multi Claim | 13210208 | 1186 days ago | IN | 0 ETH | 0.00681963 | ||||
Multi Claim | 13208729 | 1186 days ago | IN | 0 ETH | 0.01124376 | ||||
Claim | 13207085 | 1186 days ago | IN | 0 ETH | 0.00895016 | ||||
Multi Claim | 13205730 | 1187 days ago | IN | 0 ETH | 0.02994542 | ||||
Multi Claim | 13203719 | 1187 days ago | IN | 0 ETH | 0.01794634 | ||||
Multi Claim | 13203291 | 1187 days ago | IN | 0 ETH | 0.01692484 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
LOOTGemCrafterV2
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-09-07 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.3; // Part: Base64 /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint len = data.length; if (len == 0) return ''; // multiply by 4/3 rounded up uint encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } } // Part: OpenZeppelin/[email protected]/Address /** * @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); } } } } // Part: OpenZeppelin/[email protected]/Context /** * @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; } } // Part: OpenZeppelin/[email protected]/IERC165 /** * @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); } // Part: OpenZeppelin/[email protected]/Initializable /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } } // Part: OpenZeppelin/[email protected]/ReentrancyGuard /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // Part: Strings library Strings { bytes16 private constant _HEX_SYMBOLS = '0123456789abcdef'; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint 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'; } uint temp = value; uint digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint value) internal pure returns (string memory) { if (value == 0) { return '0x00'; } uint temp = value; uint 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(uint value, uint length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = '0'; buffer[1] = 'x'; for (uint 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); } } // Part: OpenZeppelin/[email protected]/ERC165 /** * @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; } } // Part: OpenZeppelin/[email protected]/IERC1155 /** * @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; } // Part: OpenZeppelin/[email protected]/IERC1155Receiver /** * @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); } // Part: OpenZeppelin/[email protected]/IERC721 /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } // Part: OpenZeppelin/[email protected]/Ownable /** * @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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // Part: OpenZeppelin/[email protected]/Pausable /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } // Part: OpenZeppelin/[email protected]/ERC1155Receiver /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } } // Part: OpenZeppelin/[email protected]/IERC1155MetadataURI /** * @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); } // Part: OpenZeppelin/[email protected]/ERC1155 /** * @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 { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, 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 `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } emit TransferSingle(operator, account, 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 account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @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; } } // Part: OpenZeppelin/[email protected]/ERC1155Supply /** * @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 weither 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]; } } } // Part: ProvablyRareGem /// @title Provably Rare Gems /// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear) contract ProvablyRareGem is ERC1155Supply, ReentrancyGuard { event Create(uint indexed kind); event Mine(address indexed miner, uint indexed kind); string public constant name = 'Provably Rare Gem'; struct Gem { string name; // Gem name string color; // Gem color bytes32 entropy; // Additional mining entropy. bytes32(0) means can't mine. uint difficulty; // Current difficulity level. Must be non decreasing uint gemsPerMine; // Amount of gems to distribute per mine uint multiplier; // Difficulty multiplier times 1e4. Must be between 1e4 and 1e10 address crafter; // Address that can craft gems address manager; // Current gem manager address pendingManager; // Pending gem manager to be transferred to } mapping(uint => Gem) public gems; mapping(address => uint) public nonce; uint public gemCount; constructor() ERC1155('GEM') {} /// @dev Creates a new gem type. The manager can craft a portion of gems + can premine function create( string calldata name, string calldata color, uint difficulty, uint gemsPerMine, uint multiplier, address crafter, address manager ) external returns (uint) { require(difficulty > 0 && difficulty <= 2**128, 'bad difficulty'); require(gemsPerMine > 0 && gemsPerMine <= 1e6, 'bad gems per mine'); require(multiplier >= 1e4 && multiplier <= 1e10, 'bad multiplier'); require(manager != address(0), 'bad manager'); return _create(name, color, difficulty, gemsPerMine, multiplier, crafter, manager); } /// @dev Mines new gemstones. Puts kind you want to mine + your salt and tests your luck! function mine(uint kind, uint salt) external nonReentrant { uint val = luck(kind, salt); nonce[msg.sender]++; require(kind < gemCount, 'gem kind not exist'); uint diff = gems[kind].difficulty; require(val <= type(uint).max / diff, 'salt not good enough'); gems[kind].difficulty = (diff * gems[kind].multiplier) / 10000 + 1; _mint(msg.sender, kind, gems[kind].gemsPerMine, ''); } /// @dev Updates gem mining entropy. Can be called by gem manager or crafter. function updateEntropy(uint kind, bytes32 entropy) external { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender || gems[kind].crafter == msg.sender, 'unauthorized'); gems[kind].entropy = entropy; } /// @dev Updates gem metadata info. Must only be called by the gem manager. function updateGemInfo( uint kind, string calldata name, string calldata color ) external { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].name = name; gems[kind].color = color; } /// @dev Updates gem mining information. Must only be called by the gem manager. function updateMiningData( uint kind, uint difficulty, uint multiplier, uint gemsPerMine ) external { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); require(difficulty > 0 && difficulty <= 2**128, 'bad difficulty'); require(multiplier >= 1e4 && multiplier <= 1e10, 'bad multiplier'); require(gemsPerMine > 0 && gemsPerMine <= 1e6, 'bad gems per mine'); gems[kind].difficulty = difficulty; gems[kind].multiplier = multiplier; gems[kind].gemsPerMine = gemsPerMine; } /// @dev Renounce management ownership for the given gem kinds. function renounceManager(uint[] calldata kinds) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].manager = address(0); gems[kind].pendingManager = address(0); } } /// @dev Updates gem crafter. Must only be called by the gem manager. function updateCrafter(uint[] calldata kinds, address crafter) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].crafter = crafter; } } /// @dev Transfers management ownership for the given gem kinds to another address. function transferManager(uint[] calldata kinds, address to) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].pendingManager = to; } } /// @dev Accepts management position for the given gem kinds. function acceptManager(uint[] calldata kinds) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].pendingManager == msg.sender, 'not pending manager'); gems[kind].pendingManager = address(0); gems[kind].manager = msg.sender; } } /// @dev Mints gems by crafter. Hopefully, crafter is a good guy. Craft gemsPerMine if amount = 0. function craft( uint kind, uint amount, address to ) external nonReentrant { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].crafter == msg.sender, 'not gem crafter'); uint realAmount = amount == 0 ? gems[kind].gemsPerMine : amount; _mint(to, kind, realAmount, ''); } /// @dev Returns your luck given salt and gem kind. The smaller the value, the more success chance. function luck(uint kind, uint salt) public view returns (uint) { require(kind < gemCount, 'gem kind not exist'); bytes32 entropy = gems[kind].entropy; require(entropy != bytes32(0), 'no entropy'); bytes memory data = abi.encodePacked( block.chainid, entropy, address(this), msg.sender, kind, nonce[msg.sender], salt ); return uint(keccak256(data)); } /// @dev Internal function for creating a new gem kind function _create( string memory name, string memory color, uint difficulty, uint gemsPerMine, uint multiplier, address crafter, address manager ) internal returns (uint) { uint kind = gemCount++; gems[kind] = Gem({ name: name, color: color, entropy: bytes32(0), difficulty: difficulty, gemsPerMine: gemsPerMine, multiplier: multiplier, crafter: crafter, manager: manager, pendingManager: address(0) }); emit Create(kind); return kind; } // prettier-ignore function uri(uint kind) public view override returns (string memory) { require(kind < gemCount, 'gem kind not exist'); string memory output = string(abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: ', gems[kind].color, '; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="white" /><text x="10" y="20" class="base">', gems[kind].name, '</text><text x="10" y="40" class="base">', '</text></svg>' )); string memory json = Base64.encode(bytes(string(abi.encodePacked( '{ "name": "', gems[kind].name, '", ', '"description" : ', '"Provably Rare Gems", ', '"image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}' )))); return string(abi.encodePacked('data:application/json;base64,', json)); } } // Part: ProvablyRareGemV2 /// @title Provably Rare Gems /// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear) contract ProvablyRareGemV2 is Initializable, ERC1155Supply { event Create(uint indexed kind); event Mine(address indexed miner, uint indexed kind); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); string public name; struct Gem { string name; // Gem name string color; // Gem color bytes32 entropy; // Additional mining entropy. bytes32(0) means can't mine. uint difficulty; // Current difficulity level. Must be non decreasing uint gemsPerMine; // Amount of gems to distribute per mine uint multiplier; // Difficulty multiplier times 1e4. Must be between 1e4 and 1e10 address crafter; // Address that can craft gems address manager; // Current gem manager address pendingManager; // Pending gem manager to be transferred to } uint private lock; address public owner; mapping(uint => Gem) public gems; mapping(address => uint) public nonce; uint public gemCount; constructor() ERC1155('GEM') {} modifier nonReentrant() { require(lock == 1, '!lock'); lock = 2; _; lock = 1; } modifier onlyOwner() { require(owner == msg.sender, '!owner'); _; } /// @dev Initializes the contract. function initialize() external initializer { name = 'Provably Rare Gem'; lock = 1; owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @dev Transfers owner. /// @param _owner The new owner. function transferOwnership(address _owner) external onlyOwner { owner = _owner; emit OwnershipTransferred(msg.sender, _owner); } /// @dev Creates a new gem type. The manager can craft a portion of gems + can premine function create( string calldata name, string calldata color, uint difficulty, uint gemsPerMine, uint multiplier, address crafter, address manager ) external returns (uint) { require(difficulty > 0 && difficulty <= 2**128, 'bad difficulty'); require(gemsPerMine > 0 && gemsPerMine <= 1e6, 'bad gems per mine'); require(multiplier >= 1e4 && multiplier <= 1e10, 'bad multiplier'); require(manager != address(0), 'bad manager'); return _create(name, color, difficulty, gemsPerMine, multiplier, crafter, manager); } /// @dev Mines new gemstones. Puts kind you want to mine + your salt and tests your luck! function mine(uint kind, uint salt) external nonReentrant { uint val = luck(kind, salt); nonce[msg.sender]++; require(kind < gemCount, 'gem kind not exist'); uint diff = gems[kind].difficulty; require(val <= type(uint).max / diff, 'salt not good enough'); gems[kind].difficulty = (diff * gems[kind].multiplier) / 10000 + 1; _mint(msg.sender, kind, gems[kind].gemsPerMine, ''); } /// @dev Updates gem mining entropy. Can be called by gem manager or crafter. function updateEntropy(uint kind, bytes32 entropy) external { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender || gems[kind].crafter == msg.sender, 'unauthorized'); gems[kind].entropy = entropy; } /// @dev Updates gem metadata info. Must only be called by the gem manager. function updateGemInfo( uint kind, string calldata name, string calldata color ) external { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].name = name; gems[kind].color = color; } /// @dev Updates gem mining information. Must only be called by the gem manager. function updateMiningData( uint kind, uint difficulty, uint multiplier, uint gemsPerMine ) external { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); require(difficulty > 0 && difficulty <= 2**128, 'bad difficulty'); require(multiplier >= 1e4 && multiplier <= 1e10, 'bad multiplier'); require(gemsPerMine > 0 && gemsPerMine <= 1e6, 'bad gems per mine'); gems[kind].difficulty = difficulty; gems[kind].multiplier = multiplier; gems[kind].gemsPerMine = gemsPerMine; } /// @dev Renounce management ownership for the given gem kinds. function renounceManager(uint[] calldata kinds) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].manager = address(0); gems[kind].pendingManager = address(0); } } /// @dev Updates gem crafter. Must only be called by the gem manager. function updateCrafter(uint[] calldata kinds, address crafter) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].crafter = crafter; } } /// @dev Transfers management ownership for the given gem kinds to another address. function transferManager(uint[] calldata kinds, address to) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].manager == msg.sender, 'not gem manager'); gems[kind].pendingManager = to; } } /// @dev Accepts management position for the given gem kinds. function acceptManager(uint[] calldata kinds) external { for (uint idx = 0; idx < kinds.length; idx++) { uint kind = kinds[idx]; require(kind < gemCount, 'gem kind not exist'); require(gems[kind].pendingManager == msg.sender, 'not pending manager'); gems[kind].pendingManager = address(0); gems[kind].manager = msg.sender; } } /// @dev Mints gems by crafter. Hopefully, crafter is a good guy. Craft gemsPerMine if amount = 0. function craft( uint kind, uint amount, address to ) external nonReentrant { require(kind < gemCount, 'gem kind not exist'); require(gems[kind].crafter == msg.sender, 'not gem crafter'); uint realAmount = amount == 0 ? gems[kind].gemsPerMine : amount; _mint(to, kind, realAmount, ''); } /// @dev Returns your luck given salt and gem kind. The smaller the value, the more success chance. function luck(uint kind, uint salt) public view returns (uint) { require(kind < gemCount, 'gem kind not exist'); bytes32 entropy = gems[kind].entropy; require(entropy != bytes32(0), 'no entropy'); bytes memory data = abi.encodePacked( block.chainid, entropy, address(this), msg.sender, kind, nonce[msg.sender], salt ); return uint(keccak256(data)); } /// @dev Internal function for creating a new gem kind function _create( string memory gemName, string memory color, uint difficulty, uint gemsPerMine, uint multiplier, address crafter, address manager ) internal returns (uint) { uint kind = gemCount++; gems[kind] = Gem({ name: gemName, color: color, entropy: bytes32(0), difficulty: difficulty, gemsPerMine: gemsPerMine, multiplier: multiplier, crafter: crafter, manager: manager, pendingManager: address(0) }); emit Create(kind); return kind; } // prettier-ignore function uri(uint kind) public view override returns (string memory) { require(kind < gemCount, 'gem kind not exist'); string memory gemName = string(abi.encodePacked(gems[kind].name, ' #', Strings.toString(kind))); string memory color = gems[kind].color; string memory output = string(abi.encodePacked( '<svg id="Layer_1" x="0px" y="0px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1080 1080" width="350" height="400"><rect x="0" y="0" width="1080" height="1080" fill="#1a1a1a"/><svg id="Layer_1" x="350" y="350" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1080 1080" width="350" height="400"><g transform="translate(0 -25)"><g><polygon class="st0" fill="', color, '" points="679.25,58.27 400.75,58.27 203.82,255.2 203.82,824.8 400.75,1021.73 679.25,1021.73 876.18,824.8 876.18,255.2"></polygon><g class="st1" opacity="0.3"><path d="M679.25,58.27h-278.5L203.82,255.2v569.6l196.93,196.93h278.5L876.18,824.8V255.2L679.25,58.27z M739.56,709.06 l-116.9,116.9H457.34l-116.9-116.9V370.94l116.9-116.9h165.32l116.9,116.9V709.06z"></path></g><g><g><polygon class="st2" fill="none" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" points="679.25,58.27 400.75,58.27 203.82,255.2 203.82,824.8 400.75,1021.73 679.25,1021.73 876.18,824.8 876.18,255.2"></polygon><polygon fill="', color, '" class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" points="622.66,254.04 457.34,254.04 340.44,370.94 340.44,709.06 457.34,825.96 622.66,825.96 739.56,709.06 739.56,370.94"></polygon><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="400.75" y1="58.27" x2="457.34" y2="254.04"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="679.25" y1="58.27" x2="622.66" y2="254.04"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="203.82" y1="255.2" x2="340.44" y2="370.94"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="739.56" y1="370.94" x2="876.18" y2="255.2"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="739.56" y1="709.06" x2="876.18" y2="824.8"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="622.66" y1="825.96" x2="679.25" y2="1021.73"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="457.34" y1="825.96" x2="400.75" y2="1021.73"></line><line class="st2" stroke-width="10" stroke-miterlimit="10" stroke="#ffffff" x1="340.44" y1="709.06" x2="203.82" y2="824.8"></line></g></g></g></g></svg><text x="50%" y="95%" dominant-baseline="middle" text-anchor="middle" font-size="2.5em" fill="#FFFFFF">', gemName, '</text></svg>' )); string memory json = Base64.encode(bytes(string(abi.encodePacked( '{ "name": "', gemName, '", ', '"description" : ', '"Provably Rare Gem is a permissionless on-chain asset for hardcore collectors to mine and collect. Gems must be mined with off-chain Proof-of-Work. The higher the gem rarity, the more difficult it is to be found. Stats and other functionalities are intentionally omitted for others to interpret.", ', '"image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}' )))); return string(abi.encodePacked('data:application/json;base64,', json)); } } // Part: LOOTGemCrafter /// @title LOOT GEM Crafter /// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear) contract LOOTGemCrafter is Ownable, ReentrancyGuard { IERC721 public immutable NFT; ProvablyRareGem public immutable GEM; uint public immutable FIRST_KIND; event Start(bytes32 hashseed); event Craft(uint indexed kind, uint amount); event Claim(uint indexed id, address indexed claimer); bytes32 public hashseed; mapping(uint => uint) public crafted; mapping(uint => bool) public claimed; constructor(IERC721 _nft, ProvablyRareGem _gem) { NFT = _nft; GEM = _gem; FIRST_KIND = _gem.gemCount(); _gem.create('Amethyst', '#9966CC', 8**2, 64, 10000, address(this), msg.sender); _gem.create('Topaz', '#FFC87C', 8**3, 32, 10001, address(this), msg.sender); _gem.create('Opal', '#A8C3BC', 8**4, 16, 10005, address(this), msg.sender); _gem.create('Sapphire', '#0F52BA', 8**5, 8, 10010, address(this), msg.sender); _gem.create('Ruby', '#E0115F', 8**6, 4, 10030, address(this), msg.sender); _gem.create('Emerald', '#50C878', 8**7, 2, 10100, address(this), msg.sender); _gem.create('Pink Diamond', '#FC74E4', 8**8, 1, 10300, address(this), msg.sender); _gem.create('The Dragon Jade', '#00A36C', 8**9, 1, 11000, address(this), msg.sender); _gem.create('Azure Skystone', '#348CFC', 8**10, 1, 20000, address(this), msg.sender); _gem.create('Scarlet Bloodstone', '#BC1C2C', 8**11, 1, 50000, address(this), msg.sender); } /// @dev Called once to start the claim and generate hash seed. function start() external onlyOwner { require(hashseed == bytes32(0), 'already started'); hashseed = blockhash(block.number - 1); for (uint offset = 0; offset < 10; offset++) { GEM.updateEntropy(FIRST_KIND + offset, hashseed); } } /// @dev Called by gem manager to craft gems. Can't craft more than 10% of supply. function craft(uint kind, uint amount) external nonReentrant onlyOwner { require(amount != 0, 'zero amount craft'); crafted[kind] += amount; GEM.craft(kind, amount, msg.sender); emit Craft(kind, amount); require(crafted[kind] <= GEM.totalSupply(kind) / 10, 'too many crafts'); } /// @dev Returns the list of initial GEM distribution for the given NFT ID. function airdrop(uint id) public view returns (uint[4] memory kinds) { require(hashseed != bytes32(0), 'not yet started'); uint[10] memory chances = [uint(1), 1, 3, 6, 10, 20, 30, 100, 300, 1000]; uint count = 0; for (uint idx = 0; idx < 4; idx++) { kinds[idx] = FIRST_KIND; } for (uint offset = 9; offset > 0; offset--) { uint seed = uint(keccak256(abi.encodePacked(hashseed, offset, id))); if (seed % chances[offset] == 0) { kinds[count++] = FIRST_KIND + offset; } if (count == 4) break; } } /// @dev Called by NFT owners to get a welcome pack of gems. Each NFT ID can claim once. function claim(uint id) external nonReentrant { _claim(id); } /// @dev Called by NFT owners to get a welcome pack of gems for multiple NFTs. function multiClaim(uint[] calldata ids) external nonReentrant { for (uint idx = 0; idx < ids.length; idx++) { _claim(ids[idx]); } } function _claim(uint id) internal { require(msg.sender == NFT.ownerOf(id), 'not nft owner'); require(!claimed[id], 'already claimed'); claimed[id] = true; uint[4] memory kinds = airdrop(id); for (uint idx = 0; idx < 4; idx++) { GEM.craft(kinds[idx], 0, msg.sender); } emit Claim(id, msg.sender); } } // File: LOOTGemCrafterV2.sol /// @title LOOT GEM Crafter /// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear) contract LOOTGemCrafterV2 is Ownable, ERC1155Receiver, ReentrancyGuard, Pausable { IERC721 public immutable NFT; ProvablyRareGemV2 public immutable GEM; uint public immutable FIRST_KIND; bytes32 public immutable hashseed; LOOTGemCrafter public immutable old; event Craft(uint indexed kind, uint amount); event Claim(uint indexed id, address indexed claimer); mapping(uint => uint) public crafted; mapping(uint => bool) public newClaimed; constructor( IERC721 _nft, ProvablyRareGemV2 _gem, LOOTGemCrafter _old ) { NFT = _nft; GEM = _gem; old = _old; hashseed = _old.hashseed(); FIRST_KIND = _gem.gemCount(); ProvablyRareGem oldGem = _old.GEM(); uint diff; (, , , diff, , , , , ) = oldGem.gems(0); _gem.create('Amethyst', '#9966CC', diff, 64, 10000, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(1); _gem.create('Topaz', '#FFC87C', diff, 32, 10001, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(2); _gem.create('Opal', '#A8C3BC', diff, 16, 10005, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(3); _gem.create('Sapphire', '#0F52BA', diff, 8, 10010, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(4); _gem.create('Ruby', '#E0115F', diff, 4, 10030, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(5); _gem.create('Emerald', '#50C878', diff, 2, 10100, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(6); _gem.create('Pink Diamond', '#FC74E4', diff, 1, 10300, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(7); _gem.create('The Dragon Jade', '#00A36C', diff, 1, 11000, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(8); _gem.create('Azure Skystone', '#348CFC', diff, 1, 20000, address(this), msg.sender); (, , , diff, , , , , ) = oldGem.gems(9); _gem.create('Scarlet Bloodstone', '#BC1C2C', diff, 1, 50000, address(this), msg.sender); } /// @dev Pause crafter. Can only be called by owner. function pause() external onlyOwner { _pause(); } /// @dev Unpause crafter. Can only be called by owner. function unpause() external onlyOwner { _unpause(); } /// @dev Called once to start the claim and generate hash seed. function start() external onlyOwner whenNotPaused { for (uint offset = 0; offset < 10; offset++) { GEM.updateEntropy(FIRST_KIND + offset, hashseed); } } /// @dev Called by gem manager to craft gems. Can't craft more than 10% of supply. function craft(uint kind, uint amount) external nonReentrant onlyOwner whenNotPaused { require(amount != 0, 'zero amount craft'); crafted[kind] += amount; GEM.craft(kind, amount, msg.sender); emit Craft(kind, amount); require(crafted[kind] <= GEM.totalSupply(kind) / 10, 'too many crafts'); } /// @dev Returns the list of initial GEM distribution for the given NFT ID. function airdrop(uint id) public view returns (uint[4] memory kinds) { require(hashseed != bytes32(0), 'not yet started'); uint[10] memory chances = [uint(1), 1, 3, 6, 10, 20, 30, 100, 300, 1000]; uint count = 0; for (uint idx = 0; idx < 4; idx++) { kinds[idx] = FIRST_KIND; } for (uint offset = 9; offset > 0; offset--) { uint seed = uint(keccak256(abi.encodePacked(hashseed, offset, id))); if (seed % chances[offset] == 0) { kinds[count++] = FIRST_KIND + offset; } if (count == 4) break; } } /// @dev Called by NFT owners to get a welcome pack of gems. Each NFT ID can claim once. function claim(uint id) external nonReentrant whenNotPaused { _claim(id); } /// @dev Called by NFT owners to get a welcome pack of gems for multiple NFTs. function multiClaim(uint[] calldata ids) external nonReentrant whenNotPaused { for (uint idx = 0; idx < ids.length; idx++) { _claim(ids[idx]); } } /// @dev Returns whether the given NFT ID has already claimed GEMs. function claimed(uint id) public view returns (bool) { return old.claimed(id) || newClaimed[id]; } function _claim(uint id) internal { require(msg.sender == NFT.ownerOf(id), 'not nft owner'); require(!claimed(id), 'already claimed'); newClaimed[id] = true; uint[4] memory kinds = airdrop(id); for (uint idx = 0; idx < 4; idx++) { GEM.craft(kinds[idx], 0, msg.sender); } emit Claim(id, msg.sender); } function onERC1155Received( address operator, address from, uint id, uint value, bytes calldata data ) external override returns (bytes4) { revert('unsupported'); } function onERC1155BatchReceived( address operator, address from, uint[] calldata ids, uint[] calldata values, bytes calldata data ) external override nonReentrant whenNotPaused returns (bytes4) { require(msg.sender == address(old.GEM()), 'bad token'); for (uint idx = 0; idx < ids.length; idx++) { uint kind = ids[idx]; require(kind >= FIRST_KIND && kind < FIRST_KIND + 10, 'bad kind'); require(values[idx] > 0, 'no value'); GEM.craft(kind, values[idx], from); } return this.onERC1155BatchReceived.selector; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC721","name":"_nft","type":"address"},{"internalType":"contract ProvablyRareGemV2","name":"_gem","type":"address"},{"internalType":"contract LOOTGemCrafter","name":"_old","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"kind","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Craft","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"FIRST_KIND","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GEM","outputs":[{"internalType":"contract ProvablyRareGemV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"airdrop","outputs":[{"internalType":"uint256[4]","name":"kinds","type":"uint256[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"kind","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"craft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"crafted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hashseed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"multiClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"newClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"old","outputs":[{"internalType":"contract LOOTGemCrafter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101206040523480156200001257600080fd5b5060405162002c0238038062002c02833981016040819052620000359162001149565b62000040336200101b565b600180556002805460ff191690556001600160601b0319606084811b821660805283811b821660a05282901b16610100526040805163c290003f60e01b815290516001600160a01b0383169163c290003f916004808301926020929190829003018186803b158015620000b257600080fd5b505afa158015620000c7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ed919062001130565b60e08181525050816001600160a01b0316635b8bbc246040518163ffffffff1660e01b815260040160206040518083038186803b1580156200012e57600080fd5b505afa15801562000143573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000169919062001130565b60c081815250506000816001600160a01b0316634dc654116040518163ffffffff1660e01b815260040160206040518083038186803b158015620001ac57600080fd5b505afa158015620001c1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e791906200119c565b60405163a1f0406d60e01b81526000600482018190529192506001600160a01b0383169063a1f0406d9060240160006040518083038186803b1580156200022d57600080fd5b505afa15801562000242573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200026c9190810190620011c2565b50506040805163626bc15b60e01b815260e06004820152600860e482015267105b595d1a1e5cdd60c21b61010482015261012060248201526007610124820152662339393636434360c81b61014482015260448101869052606481019190915261271060848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b1580156200031a57600080fd5b505af11580156200032f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000355919062001130565b5060405163a1f0406d60e01b8152600160048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b1580156200039757600080fd5b505afa158015620003ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620003d69190810190620011c2565b505060405163626bc15b60e01b815260e06004820152600560e4820152642a37b830bd60d91b61010482015261012060248201526007610124820152662346464338374360c81b610144820152604481018590526020606482015261271160848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b1580156200047f57600080fd5b505af115801562000494573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004ba919062001130565b5060405163a1f0406d60e01b8152600260048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b158015620004fc57600080fd5b505afa15801562000511573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200053b9190810190620011c2565b505060405163626bc15b60e01b815260e060048083019190915260e48201526313dc185b60e21b61010482015261012060248201526007610124820152662341384333424360c81b610144820152604481018590526010606482015261271560848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b158015620005e557600080fd5b505af1158015620005fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000620919062001130565b5060405163a1f0406d60e01b8152600360048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b1580156200066257600080fd5b505afa15801562000677573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620006a19190810190620011c2565b505060405163626bc15b60e01b815260e06004820152600860e4820181905267536170706869726560c01b61010483015261012060248301526007610124830152662330463532424160c81b61014483015260448201869052606482015261271a60848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b1580156200074d57600080fd5b505af115801562000762573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000788919062001130565b5060405163a1f0406d60e01b81526004808201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b158015620007c957600080fd5b505afa158015620007de573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620008089190810190620011c2565b505060405163626bc15b60e01b815260e060048083019190915260e48201819052635275627960e01b610104830152610120602483015260076101248301526611a29818989aa360c91b61014483015260448201869052606482015261272e60848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b158015620008b257600080fd5b505af1158015620008c7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008ed919062001130565b5060405163a1f0406d60e01b8152600560048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b1580156200092f57600080fd5b505afa15801562000944573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200096e9190810190620011c2565b505060405163626bc15b60e01b815260e06004820152600760e4820181905266115b595c985b1960ca1b6101048301526101206024830152610124820152660466a6086706e760cb1b610144820152604481018590526002606482015261277460848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b15801562000a1957600080fd5b505af115801562000a2e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a54919062001130565b5060405163a1f0406d60e01b8152600660048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b15801562000a9657600080fd5b505afa15801562000aab573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000ad59190810190620011c2565b505060405163626bc15b60e01b815260e06004820152600c60e48201526b141a5b9ac8111a585b5bdb9960a21b610104820152610120602482015260076101248201526608d190cdcd114d60ca1b610144820152604481018590526001606482015261283c60848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b15801562000b8557600080fd5b505af115801562000b9a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bc0919062001130565b5060405163a1f0406d60e01b8152600760048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b15801562000c0257600080fd5b505afa15801562000c17573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000c419190810190620011c2565b505060405163626bc15b60e01b815260e06004820152600f60e48201526e54686520447261676f6e204a61646560881b61010482015261012060248201526007610124820152662330304133364360c81b6101448201526044810185905260016064820152612af860848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b15801562000cf457600080fd5b505af115801562000d09573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000d2f919062001130565b5060405163a1f0406d60e01b8152600860048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b15801562000d7157600080fd5b505afa15801562000d86573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000db09190810190620011c2565b505060405163626bc15b60e01b815260e06004820152600e60e48201526d417a75726520536b7973746f6e6560901b61010482015261012060248201526007610124820152662333343843464360c81b6101448201526044810185905260016064820152614e2060848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b15801562000e6257600080fd5b505af115801562000e77573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e9d919062001130565b5060405163a1f0406d60e01b8152600960048201526001600160a01b0383169063a1f0406d9060240160006040518083038186803b15801562000edf57600080fd5b505afa15801562000ef4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000f1e9190810190620011c2565b505060405163626bc15b60e01b815260e06004820152601260e482015271536361726c657420426c6f6f6473746f6e6560701b61010482015261012060248201526007610124820152662342433143324360c81b610144820152604481018590526001606482015261c35060848201523060a48201523360c482015293975050506001600160a01b038916945063626bc15b935050610164019050602060405180830381600087803b15801562000fd457600080fd5b505af115801562000fe9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200100f919062001130565b505050505050620012bc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516200107881620012a3565b919050565b600082601f8301126200108e578081fd5b81516001600160401b0380821115620010ab57620010ab6200128d565b604051601f8301601f19908116603f01168101908282118183101715620010d657620010d66200128d565b81604052838152602092508683858801011115620010f2578485fd5b8491505b83821015620011155785820183015181830184015290820190620010f6565b838211156200112657848385830101525b9695505050505050565b60006020828403121562001142578081fd5b5051919050565b6000806000606084860312156200115e578182fd5b83516200116b81620012a3565b60208501519093506200117e81620012a3565b60408501519092506200119181620012a3565b809150509250925092565b600060208284031215620011ae578081fd5b8151620011bb81620012a3565b9392505050565b60008060008060008060008060006101208a8c031215620011e1578485fd5b89516001600160401b0380821115620011f8578687fd5b620012068d838e016200107d565b9a5060208c01519150808211156200121c578687fd5b506200122b8c828d016200107d565b98505060408a0151965060608a0151955060808a0151945060a08a0151935060c08a01516200125a81620012a3565b60e08b01519093506200126d81620012a3565b91506200127e6101008b016200106b565b90509295985092959850929598565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620012b957600080fd5b50565b60805160601c60a05160601c60c05160e0516101005160601c6118886200137a6000396000818161026901528181610a9c0152610ee20152600081816102c4015281816108180152818161093d0152610e5a015260008181610319015281816108d7015281816109c801528181610baf01528181610bdd0152610e180152600081816101a4015281816104d30152818161058a01528181610ca001528181610ded01526111b3015260008181610209015261106701526118886000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806397dc4a13116100b8578063cac4cc291161007c578063cac4cc29146102f4578063d15634f414610314578063dbe7e3bd1461033b578063e4755f091461034e578063f23a6e6114610371578063f2fde38b1461038457610142565b806397dc4a1314610244578063b83f866314610264578063bc197c811461028b578063be9a6555146102b7578063c290003f146102bf57610142565b80634ed73d281161010a5780634ed73d28146101de5780635c975abb146101f1578063715018a6146101fc5780637c0b8de2146102045780638456cb591461022b5780638da5cb5b1461023357610142565b806301ffc9a714610147578063289137a11461016f578063379607f5146101845780633f4ba83a146101975780634dc654111461019f575b600080fd5b61015a61015536600461165f565b610397565b60405190151581526020015b60405180910390f35b61018261017d3660046116b7565b6103ce565b005b610182610192366004611687565b61066d565b6101826106ce565b6101c67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610166565b6101826101ec3660046115ff565b610702565b60025460ff1661015a565b6101826107a8565b6101c67f000000000000000000000000000000000000000000000000000000000000000081565b6101826107dc565b6000546001600160a01b03166101c6565b610257610252366004611687565b61080e565b60405161016691906116d8565b6101c67f000000000000000000000000000000000000000000000000000000000000000081565b61029e6102993660046114ca565b610a47565b6040516001600160e01b03199091168152602001610166565b610182610d8a565b6102e67f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610166565b6102e6610302366004611687565b60036020526000908152604090205481565b6102e67f000000000000000000000000000000000000000000000000000000000000000081565b61015a610349366004611687565b610ec9565b61015a61035c366004611687565b60046020526000908152604090205460ff1681565b61029e61037f366004611585565b610f80565b61018261039236600461148b565b610fb9565b60006001600160e01b03198216630271189760e51b14806103c857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600260015414156103fa5760405162461bcd60e51b81526004016103f190611768565b60405180910390fd5b60026001556000546001600160a01b031633146104295760405162461bcd60e51b81526004016103f190611733565b60025460ff161561044c5760405162461bcd60e51b81526004016103f190611709565b8061048d5760405162461bcd60e51b81526020600482015260116024820152701e995c9bc8185b5bdd5b9d0818dc98599d607a1b60448201526064016103f1565b600082815260036020526040812080548392906104ab90849061179f565b90915550506040516343cbd8cb60e11b815260048101839052602481018290523360448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638797b19690606401600060405180830381600087803b15801561051f57600080fd5b505af1158015610533573d6000803e3d6000fd5b50505050817f213ee7b67affc220b6d48c5a07b1ab759e376568e553cd29a07f2759a4df5d3f8260405161056991815260200190565b60405180910390a260405163bd85b03960e01b815260048101839052600a907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063bd85b0399060240160206040518083038186803b1580156105d457600080fd5b505afa1580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c919061169f565b61061691906117b7565b60008381526003602052604090205411156106655760405162461bcd60e51b815260206004820152600f60248201526e746f6f206d616e792063726166747360881b60448201526064016103f1565b505060018055565b600260015414156106905760405162461bcd60e51b81526004016103f190611768565b60026001556106a160025460ff1690565b156106be5760405162461bcd60e51b81526004016103f190611709565b6106c781611051565b5060018055565b6000546001600160a01b031633146106f85760405162461bcd60e51b81526004016103f190611733565b6107006112a8565b565b600260015414156107255760405162461bcd60e51b81526004016103f190611768565b600260015561073660025460ff1690565b156107535760405162461bcd60e51b81526004016103f190611709565b60005b8181101561079f5761078d83838381811061078157634e487b7160e01b600052603260045260246000fd5b90506020020135611051565b80610797816117e2565b915050610756565b50506001805550565b6000546001600160a01b031633146107d25760405162461bcd60e51b81526004016103f190611733565b610700600061133b565b6000546001600160a01b031633146108065760405162461bcd60e51b81526004016103f190611733565b61070061138b565b6108166113e3565b7f00000000000000000000000000000000000000000000000000000000000000006108755760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081e595d081cdd185c9d1959608a1b60448201526064016103f1565b60408051610140810182526001808252602082015260039181019190915260066060820152600a6080820152601460a0820152601e60c0820152606460e082015261012c6101008201526103e86101208201526000805b600481101561092d577f000000000000000000000000000000000000000000000000000000000000000084826004811061091657634e487b7160e01b600052603260045260246000fd5b602002015280610925816117e2565b9150506108cc565b5060095b8015610a3f57604080517f00000000000000000000000000000000000000000000000000000000000000006020820152908101829052606081018690526000906080016040516020818303038152906040528051906020012060001c90508382600a81106109af57634e487b7160e01b600052603260045260246000fd5b60200201516109be90826117fd565b610a1d576109ec827f000000000000000000000000000000000000000000000000000000000000000061179f565b85846109f7816117e2565b955060048110610a1757634e487b7160e01b600052603260045260246000fd5b60200201525b8260041415610a2c5750610a3f565b5080610a37816117cb565b915050610931565b505050919050565b600060026001541415610a6c5760405162461bcd60e51b81526004016103f190611768565b6002600155610a7d60025460ff1690565b15610a9a5760405162461bcd60e51b81526004016103f190611709565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634dc654116040518163ffffffff1660e01b815260040160206040518083038186803b158015610af357600080fd5b505afa158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b91906114ae565b6001600160a01b0316336001600160a01b031614610b775760405162461bcd60e51b81526020600482015260096024820152683130b2103a37b5b2b760b91b60448201526064016103f1565b60005b86811015610d70576000888883818110610ba457634e487b7160e01b600052603260045260246000fd5b9050602002013590507f00000000000000000000000000000000000000000000000000000000000000008110158015610c065750610c037f0000000000000000000000000000000000000000000000000000000000000000600a61179f565b81105b610c3d5760405162461bcd60e51b8152602060048201526008602482015267189859081ada5b9960c21b60448201526064016103f1565b6000878784818110610c5f57634e487b7160e01b600052603260045260246000fd5b9050602002013511610c9e5760405162461bcd60e51b81526020600482015260086024820152676e6f2076616c756560c01b60448201526064016103f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638797b19682898986818110610cee57634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e087901b168152600481019490945260200291909101356024830152506001600160a01b038d166044820152606401600060405180830381600087803b158015610d4457600080fd5b505af1158015610d58573d6000803e3d6000fd5b50505050508080610d68906117e2565b915050610b7a565b5050600180555063bc197c8160e01b979650505050505050565b6000546001600160a01b03163314610db45760405162461bcd60e51b81526004016103f190611733565b60025460ff1615610dd75760405162461bcd60e51b81526004016103f190611709565b60005b600a811015610ec6576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663b314782c610e3c837f000000000000000000000000000000000000000000000000000000000000000061179f565b6040516001600160e01b031960e084901b16815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006024820152604401600060405180830381600087803b158015610e9b57600080fd5b505af1158015610eaf573d6000803e3d6000fd5b505050508080610ebe906117e2565b915050610dda565b50565b60405163dbe7e3bd60e01b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063dbe7e3bd9060240160206040518083038186803b158015610f2c57600080fd5b505afa158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f64919061163f565b806103c857505060009081526004602052604090205460ff1690565b60405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526000906064016103f1565b6000546001600160a01b03163314610fe35760405162461bcd60e51b81526004016103f190611733565b6001600160a01b0381166110485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f1565b610ec68161133b565b6040516331a9108f60e11b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b1580156110b157600080fd5b505afa1580156110c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e991906114ae565b6001600160a01b0316336001600160a01b0316146111395760405162461bcd60e51b815260206004820152600d60248201526c3737ba1037333a1037bbb732b960991b60448201526064016103f1565b61114281610ec9565b156111815760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b60448201526064016103f1565b6000818152600460205260408120805460ff191660011790556111a38261080e565b905060005b6004811015611276577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638797b19683836004811061120057634e487b7160e01b600052603260045260246000fd5b60200201516040516001600160e01b031960e084901b168152600481019190915260006024820152336044820152606401600060405180830381600087803b15801561124b57600080fd5b505af115801561125f573d6000803e3d6000fd5b50505050808061126e906117e2565b9150506111a8565b50604051339083907f35538759d80c1fd7bb450a0d05601db5a99fa8b5d073a07c847a9fd61029b10790600090a35050565b60025460ff166112f15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103f1565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff16156113ae5760405162461bcd60e51b81526004016103f190611709565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861131e3390565b60405180608001604052806004906020820280368337509192915050565b60008083601f840112611412578182fd5b50813567ffffffffffffffff811115611429578182fd5b6020830191508360208260051b850101111561144457600080fd5b9250929050565b60008083601f84011261145c578182fd5b50813567ffffffffffffffff811115611473578182fd5b60208301915083602082850101111561144457600080fd5b60006020828403121561149c578081fd5b81356114a78161183d565b9392505050565b6000602082840312156114bf578081fd5b81516114a78161183d565b60008060008060008060008060a0898b0312156114e5578384fd5b88356114f08161183d565b975060208901356115008161183d565b9650604089013567ffffffffffffffff8082111561151c578586fd5b6115288c838d01611401565b909850965060608b0135915080821115611540578586fd5b61154c8c838d01611401565b909650945060808b0135915080821115611564578384fd5b506115718b828c0161144b565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561159d578182fd5b86356115a88161183d565b955060208701356115b88161183d565b94506040870135935060608701359250608087013567ffffffffffffffff8111156115e1578283fd5b6115ed89828a0161144b565b979a9699509497509295939492505050565b60008060208385031215611611578182fd5b823567ffffffffffffffff811115611627578283fd5b61163385828601611401565b90969095509350505050565b600060208284031215611650578081fd5b815180151581146114a7578182fd5b600060208284031215611670578081fd5b81356001600160e01b0319811681146114a7578182fd5b600060208284031215611698578081fd5b5035919050565b6000602082840312156116b0578081fd5b5051919050565b600080604083850312156116c9578182fd5b50508035926020909101359150565b60808101818360005b60048110156117005781518352602092830192909101906001016116e1565b50505092915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156117b2576117b2611811565b500190565b6000826117c6576117c6611827565b500490565b6000816117da576117da611811565b506000190190565b60006000198214156117f6576117f6611811565b5060010190565b60008261180c5761180c611827565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b0381168114610ec657600080fdfea264697066735822122033e55847240971019affe6f6929a382219f9c85b6ee0aa4707cfcc233ee9f04764736f6c63430008030033000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d7000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd4000000000000000000000000094048819a6172a189122d2f5d35ffa1d70a81a3
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101425760003560e01c806397dc4a13116100b8578063cac4cc291161007c578063cac4cc29146102f4578063d15634f414610314578063dbe7e3bd1461033b578063e4755f091461034e578063f23a6e6114610371578063f2fde38b1461038457610142565b806397dc4a1314610244578063b83f866314610264578063bc197c811461028b578063be9a6555146102b7578063c290003f146102bf57610142565b80634ed73d281161010a5780634ed73d28146101de5780635c975abb146101f1578063715018a6146101fc5780637c0b8de2146102045780638456cb591461022b5780638da5cb5b1461023357610142565b806301ffc9a714610147578063289137a11461016f578063379607f5146101845780633f4ba83a146101975780634dc654111461019f575b600080fd5b61015a61015536600461165f565b610397565b60405190151581526020015b60405180910390f35b61018261017d3660046116b7565b6103ce565b005b610182610192366004611687565b61066d565b6101826106ce565b6101c67f000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd481565b6040516001600160a01b039091168152602001610166565b6101826101ec3660046115ff565b610702565b60025460ff1661015a565b6101826107a8565b6101c67f000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d781565b6101826107dc565b6000546001600160a01b03166101c6565b610257610252366004611687565b61080e565b60405161016691906116d8565b6101c67f000000000000000000000000094048819a6172a189122d2f5d35ffa1d70a81a381565b61029e6102993660046114ca565b610a47565b6040516001600160e01b03199091168152602001610166565b610182610d8a565b6102e67f949f147e5fb733f43d887bd3f9455dad768029a75baa8c63ec2d749439935d5981565b604051908152602001610166565b6102e6610302366004611687565b60036020526000908152604090205481565b6102e67f000000000000000000000000000000000000000000000000000000000000000081565b61015a610349366004611687565b610ec9565b61015a61035c366004611687565b60046020526000908152604090205460ff1681565b61029e61037f366004611585565b610f80565b61018261039236600461148b565b610fb9565b60006001600160e01b03198216630271189760e51b14806103c857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600260015414156103fa5760405162461bcd60e51b81526004016103f190611768565b60405180910390fd5b60026001556000546001600160a01b031633146104295760405162461bcd60e51b81526004016103f190611733565b60025460ff161561044c5760405162461bcd60e51b81526004016103f190611709565b8061048d5760405162461bcd60e51b81526020600482015260116024820152701e995c9bc8185b5bdd5b9d0818dc98599d607a1b60448201526064016103f1565b600082815260036020526040812080548392906104ab90849061179f565b90915550506040516343cbd8cb60e11b815260048101839052602481018290523360448201527f000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd46001600160a01b031690638797b19690606401600060405180830381600087803b15801561051f57600080fd5b505af1158015610533573d6000803e3d6000fd5b50505050817f213ee7b67affc220b6d48c5a07b1ab759e376568e553cd29a07f2759a4df5d3f8260405161056991815260200190565b60405180910390a260405163bd85b03960e01b815260048101839052600a907f000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd46001600160a01b03169063bd85b0399060240160206040518083038186803b1580156105d457600080fd5b505afa1580156105e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060c919061169f565b61061691906117b7565b60008381526003602052604090205411156106655760405162461bcd60e51b815260206004820152600f60248201526e746f6f206d616e792063726166747360881b60448201526064016103f1565b505060018055565b600260015414156106905760405162461bcd60e51b81526004016103f190611768565b60026001556106a160025460ff1690565b156106be5760405162461bcd60e51b81526004016103f190611709565b6106c781611051565b5060018055565b6000546001600160a01b031633146106f85760405162461bcd60e51b81526004016103f190611733565b6107006112a8565b565b600260015414156107255760405162461bcd60e51b81526004016103f190611768565b600260015561073660025460ff1690565b156107535760405162461bcd60e51b81526004016103f190611709565b60005b8181101561079f5761078d83838381811061078157634e487b7160e01b600052603260045260246000fd5b90506020020135611051565b80610797816117e2565b915050610756565b50506001805550565b6000546001600160a01b031633146107d25760405162461bcd60e51b81526004016103f190611733565b610700600061133b565b6000546001600160a01b031633146108065760405162461bcd60e51b81526004016103f190611733565b61070061138b565b6108166113e3565b7f949f147e5fb733f43d887bd3f9455dad768029a75baa8c63ec2d749439935d596108755760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081e595d081cdd185c9d1959608a1b60448201526064016103f1565b60408051610140810182526001808252602082015260039181019190915260066060820152600a6080820152601460a0820152601e60c0820152606460e082015261012c6101008201526103e86101208201526000805b600481101561092d577f000000000000000000000000000000000000000000000000000000000000000084826004811061091657634e487b7160e01b600052603260045260246000fd5b602002015280610925816117e2565b9150506108cc565b5060095b8015610a3f57604080517f949f147e5fb733f43d887bd3f9455dad768029a75baa8c63ec2d749439935d596020820152908101829052606081018690526000906080016040516020818303038152906040528051906020012060001c90508382600a81106109af57634e487b7160e01b600052603260045260246000fd5b60200201516109be90826117fd565b610a1d576109ec827f000000000000000000000000000000000000000000000000000000000000000061179f565b85846109f7816117e2565b955060048110610a1757634e487b7160e01b600052603260045260246000fd5b60200201525b8260041415610a2c5750610a3f565b5080610a37816117cb565b915050610931565b505050919050565b600060026001541415610a6c5760405162461bcd60e51b81526004016103f190611768565b6002600155610a7d60025460ff1690565b15610a9a5760405162461bcd60e51b81526004016103f190611709565b7f000000000000000000000000094048819a6172a189122d2f5d35ffa1d70a81a36001600160a01b0316634dc654116040518163ffffffff1660e01b815260040160206040518083038186803b158015610af357600080fd5b505afa158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b91906114ae565b6001600160a01b0316336001600160a01b031614610b775760405162461bcd60e51b81526020600482015260096024820152683130b2103a37b5b2b760b91b60448201526064016103f1565b60005b86811015610d70576000888883818110610ba457634e487b7160e01b600052603260045260246000fd5b9050602002013590507f00000000000000000000000000000000000000000000000000000000000000008110158015610c065750610c037f0000000000000000000000000000000000000000000000000000000000000000600a61179f565b81105b610c3d5760405162461bcd60e51b8152602060048201526008602482015267189859081ada5b9960c21b60448201526064016103f1565b6000878784818110610c5f57634e487b7160e01b600052603260045260246000fd5b9050602002013511610c9e5760405162461bcd60e51b81526020600482015260086024820152676e6f2076616c756560c01b60448201526064016103f1565b7f000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd46001600160a01b0316638797b19682898986818110610cee57634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e087901b168152600481019490945260200291909101356024830152506001600160a01b038d166044820152606401600060405180830381600087803b158015610d4457600080fd5b505af1158015610d58573d6000803e3d6000fd5b50505050508080610d68906117e2565b915050610b7a565b5050600180555063bc197c8160e01b979650505050505050565b6000546001600160a01b03163314610db45760405162461bcd60e51b81526004016103f190611733565b60025460ff1615610dd75760405162461bcd60e51b81526004016103f190611709565b60005b600a811015610ec6576001600160a01b037f000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd41663b314782c610e3c837f000000000000000000000000000000000000000000000000000000000000000061179f565b6040516001600160e01b031960e084901b16815260048101919091527f949f147e5fb733f43d887bd3f9455dad768029a75baa8c63ec2d749439935d596024820152604401600060405180830381600087803b158015610e9b57600080fd5b505af1158015610eaf573d6000803e3d6000fd5b505050508080610ebe906117e2565b915050610dda565b50565b60405163dbe7e3bd60e01b8152600481018290526000907f000000000000000000000000094048819a6172a189122d2f5d35ffa1d70a81a36001600160a01b03169063dbe7e3bd9060240160206040518083038186803b158015610f2c57600080fd5b505afa158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f64919061163f565b806103c857505060009081526004602052604090205460ff1690565b60405162461bcd60e51b815260206004820152600b60248201526a1d5b9cdd5c1c1bdc9d195960aa1b60448201526000906064016103f1565b6000546001600160a01b03163314610fe35760405162461bcd60e51b81526004016103f190611733565b6001600160a01b0381166110485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f1565b610ec68161133b565b6040516331a9108f60e11b8152600481018290527f000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d76001600160a01b031690636352211e9060240160206040518083038186803b1580156110b157600080fd5b505afa1580156110c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e991906114ae565b6001600160a01b0316336001600160a01b0316146111395760405162461bcd60e51b815260206004820152600d60248201526c3737ba1037333a1037bbb732b960991b60448201526064016103f1565b61114281610ec9565b156111815760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b60448201526064016103f1565b6000818152600460205260408120805460ff191660011790556111a38261080e565b905060005b6004811015611276577f000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd46001600160a01b0316638797b19683836004811061120057634e487b7160e01b600052603260045260246000fd5b60200201516040516001600160e01b031960e084901b168152600481019190915260006024820152336044820152606401600060405180830381600087803b15801561124b57600080fd5b505af115801561125f573d6000803e3d6000fd5b50505050808061126e906117e2565b9150506111a8565b50604051339083907f35538759d80c1fd7bb450a0d05601db5a99fa8b5d073a07c847a9fd61029b10790600090a35050565b60025460ff166112f15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103f1565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff16156113ae5760405162461bcd60e51b81526004016103f190611709565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861131e3390565b60405180608001604052806004906020820280368337509192915050565b60008083601f840112611412578182fd5b50813567ffffffffffffffff811115611429578182fd5b6020830191508360208260051b850101111561144457600080fd5b9250929050565b60008083601f84011261145c578182fd5b50813567ffffffffffffffff811115611473578182fd5b60208301915083602082850101111561144457600080fd5b60006020828403121561149c578081fd5b81356114a78161183d565b9392505050565b6000602082840312156114bf578081fd5b81516114a78161183d565b60008060008060008060008060a0898b0312156114e5578384fd5b88356114f08161183d565b975060208901356115008161183d565b9650604089013567ffffffffffffffff8082111561151c578586fd5b6115288c838d01611401565b909850965060608b0135915080821115611540578586fd5b61154c8c838d01611401565b909650945060808b0135915080821115611564578384fd5b506115718b828c0161144b565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561159d578182fd5b86356115a88161183d565b955060208701356115b88161183d565b94506040870135935060608701359250608087013567ffffffffffffffff8111156115e1578283fd5b6115ed89828a0161144b565b979a9699509497509295939492505050565b60008060208385031215611611578182fd5b823567ffffffffffffffff811115611627578283fd5b61163385828601611401565b90969095509350505050565b600060208284031215611650578081fd5b815180151581146114a7578182fd5b600060208284031215611670578081fd5b81356001600160e01b0319811681146114a7578182fd5b600060208284031215611698578081fd5b5035919050565b6000602082840312156116b0578081fd5b5051919050565b600080604083850312156116c9578182fd5b50508035926020909101359150565b60808101818360005b60048110156117005781518352602092830192909101906001016116e1565b50505092915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156117b2576117b2611811565b500190565b6000826117c6576117c6611827565b500490565b6000816117da576117da611811565b506000190190565b60006000198214156117f6576117f6611811565b5060010190565b60008261180c5761180c611827565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b0381168114610ec657600080fdfea264697066735822122033e55847240971019affe6f6929a382219f9c85b6ee0aa4707cfcc233ee9f04764736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d7000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd4000000000000000000000000094048819a6172a189122d2f5d35ffa1d70a81a3
-----Decoded View---------------
Arg [0] : _nft (address): 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7
Arg [1] : _gem (address): 0xC67DED0eC78b849e17771b2E8a7e303B4dAd6dD4
Arg [2] : _old (address): 0x094048819a6172a189122d2f5d35ffA1D70A81a3
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff9c1b15b16263c61d017ee9f65c50e4ae0113d7
Arg [1] : 000000000000000000000000c67ded0ec78b849e17771b2e8a7e303b4dad6dd4
Arg [2] : 000000000000000000000000094048819a6172a189122d2f5d35ffa1d70a81a3
Deployed Bytecode Sourcemap
75873:5399:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34562:223;;;;;;:::i;:::-;;:::i;:::-;;;6765:14:1;;6758:22;6740:41;;6728:2;6713:18;34562:223:0;;;;;;;;78520:320;;;;;;:::i;:::-;;:::i;:::-;;79598:83;;;;;;:::i;:::-;;:::i;78122:61::-;;;:::i;75992:38::-;;;;;;;;-1:-1:-1;;;;;6056:32:1;;;6038:51;;6026:2;6011:18;75992:38:0;5993:102:1;79769:166:0;;;;;;:::i;:::-;;:::i;33130:86::-;33201:7;;;;33130:86;;31455:94;;;:::i;75959:28::-;;;;;78001:57;;;:::i;30804:87::-;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;30804:87;;78925:575;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;76110:35::-;;;;;80681:588;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;;7136:33:1;;;7118:52;;7106:2;7091:18;80681:588:0;7073:103:1;78256:172:0;;;:::i;76072:33::-;;;;;;;;6938:25:1;;;6926:2;6911:18;76072:33:0;6893:76:1;76260:36:0;;;;;;:::i;:::-;;;;;;;;;;;;;;76035:32;;;;;80012:106;;;;;;:::i;:::-;;:::i;76301:39::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;80475:200;;;;;;:::i;:::-;;:::i;31704:192::-;;;;;;:::i;:::-;;:::i;34562:223::-;34664:4;-1:-1:-1;;;;;;34688:49:0;;-1:-1:-1;;;34688:49:0;;:89;;-1:-1:-1;;;;;;;;;;18530:40:0;;;34741:36;34681:96;34562:223;-1:-1:-1;;34562:223:0:o;78520:320::-;14982:1;15578:7;;:19;;15570:63;;;;-1:-1:-1;;;15570:63:0;;;;;;;:::i;:::-;;;;;;;;;14982:1;15711:7;:18;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;10519:10;31024:23:::1;31016:68;;;;-1:-1:-1::0;;;31016:68:0::1;;;;;;;:::i;:::-;33201:7:::0;;;;33455:9:::2;33447:38;;;;-1:-1:-1::0;;;33447:38:0::2;;;;;;;:::i;:::-;78620:11:::0;78612:41:::3;;;::::0;-1:-1:-1;;;78612:41:0;;10195:2:1;78612:41:0::3;::::0;::::3;10177:21:1::0;10234:2;10214:18;;;10207:30;-1:-1:-1;;;10253:18:1;;;10246:47;10310:18;;78612:41:0::3;10167:167:1::0;78612:41:0::3;78660:13;::::0;;;:7:::3;:13;::::0;;;;:23;;78677:6;;78660:13;:23:::3;::::0;78677:6;;78660:23:::3;:::i;:::-;::::0;;;-1:-1:-1;;78690:35:0::3;::::0;-1:-1:-1;;;78690:35:0;;::::3;::::0;::::3;13405:25:1::0;;;13446:18;;;13439:34;;;78714:10:0::3;13489:18:1::0;;;13482:60;78690:3:0::3;-1:-1:-1::0;;;;;78690:9:0::3;::::0;::::3;::::0;13378:18:1;;78690:35:0::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;78743:4;78737:19;78749:6;78737:19;;;;6938:25:1::0;;6926:2;6911:18;;6893:76;78737:19:0::3;;;;;;;;78788:21;::::0;-1:-1:-1;;;78788:21:0;;::::3;::::0;::::3;6938:25:1::0;;;78812:2:0::3;::::0;78788:3:::3;-1:-1:-1::0;;;;;78788:15:0::3;::::0;::::3;::::0;6911:18:1;;78788:21:0::3;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:26;;;;:::i;:::-;78771:13;::::0;;;:7:::3;:13;::::0;;;;;:43:::3;;78763:71;;;::::0;-1:-1:-1;;;78763:71:0;;10541:2:1;78763:71:0::3;::::0;::::3;10523:21:1::0;10580:2;10560:18;;;10553:30;-1:-1:-1;;;10599:18:1;;;10592:45;10654:18;;78763:71:0::3;10513:165:1::0;78763:71:0::3;-1:-1:-1::0;;14938:1:0;15890:22;;78520:320::o;79598:83::-;14982:1;15578:7;;:19;;15570:63;;;;-1:-1:-1;;;15570:63:0;;;;;;;:::i;:::-;14982:1;15711:7;:18;33456:8:::1;33201:7:::0;;;;33130:86;;33456:8:::1;33455:9;33447:38;;;;-1:-1:-1::0;;;33447:38:0::1;;;;;;;:::i;:::-;79665:10:::2;79672:2;79665:6;:10::i;:::-;-1:-1:-1::0;14938:1:0;15890:22;;79598:83::o;78122:61::-;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;10519:10;31024:23;31016:68;;;;-1:-1:-1;;;31016:68:0;;;;;;;:::i;:::-;78167:10:::1;:8;:10::i;:::-;78122:61::o:0;79769:166::-;14982:1;15578:7;;:19;;15570:63;;;;-1:-1:-1;;;15570:63:0;;;;;;;:::i;:::-;14982:1;15711:7;:18;33456:8:::1;33201:7:::0;;;;33130:86;;33456:8:::1;33455:9;33447:38;;;;-1:-1:-1::0;;;33447:38:0::1;;;;;;;:::i;:::-;79858:8:::2;79853:77;79872:16:::0;;::::2;79853:77;;;79906:16;79913:3;;79917;79913:8;;;;;-1:-1:-1::0;;;79913:8:0::2;;;;;;;;;;;;;;;79906:6;:16::i;:::-;79890:5:::0;::::2;::::0;::::2;:::i;:::-;;;;79853:77;;;-1:-1:-1::0;;14938:1:0;15890:22;;-1:-1:-1;79769:166:0:o;31455:94::-;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;10519:10;31024:23;31016:68;;;;-1:-1:-1;;;31016:68:0;;;;;;;:::i;:::-;31520:21:::1;31538:1;31520:9;:21::i;78001:57::-:0;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;10519:10;31024:23;31016:68;;;;-1:-1:-1;;;31016:68:0;;;;;;;:::i;:::-;78044:8:::1;:6;:8::i;78925:575::-:0;78972:20;;:::i;:::-;79009:8;79001:50;;;;-1:-1:-1;;;79001:50:0;;12618:2:1;79001:50:0;;;12600:21:1;12657:2;12637:18;;;12630:30;-1:-1:-1;;;12676:18:1;;;12669:45;12731:18;;79001:50:0;12590:165:1;79001:50:0;79058:72;;;;;;;;79090:1;79058:72;;;;;;;79097:1;79058:72;;;;;;;79100:1;79058:72;;;;79103:2;79058:72;;;;79107:2;79058:72;;;;79111:2;79058:72;;;;79115:3;79058:72;;;;79120:3;79058:72;;;;79125:4;79058:72;;;;:23;;79158:75;79183:1;79177:3;:7;79158:75;;;79215:10;79202:5;79208:3;79202:10;;;;;-1:-1:-1;;;79202:10:0;;;;;;;;;;;;:23;79186:5;;;;:::i;:::-;;;;79158:75;;;-1:-1:-1;79258:1:0;79239:256;79261:10;;79239:256;;79319:38;;;79336:8;79319:38;;;5760:19:1;5795:12;;;5788:28;;;5832:12;;;5825:28;;;79292:9:0;;5869:12:1;;79319:38:0;;;;;;;;;;;;79309:49;;;;;;79304:55;;79292:67;;79379:7;79387:6;79379:15;;;;;-1:-1:-1;;;79379:15:0;;;;;;;;;;;;;79372:22;;:4;:22;:::i;:::-;79368:90;;79429:19;79442:6;79429:10;:19;:::i;:::-;79412:5;79418:7;;;;:::i;:::-;;;79412:14;;;;;-1:-1:-1;;;79412:14:0;;;;;;;;;;;;:36;79368:90;79470:5;79479:1;79470:10;79466:21;;;79482:5;;;79466:21;-1:-1:-1;79273:8:0;;;;:::i;:::-;;;;79239:256;;;;78925:575;;;;;:::o;80681:588::-;80895:6;14982:1;15578:7;;:19;;15570:63;;;;-1:-1:-1;;;15570:63:0;;;;;;;:::i;:::-;14982:1;15711:7;:18;33456:8:::1;33201:7:::0;;;;33130:86;;33456:8:::1;33455:9;33447:38;;;;-1:-1:-1::0;;;33447:38:0::1;;;;;;;:::i;:::-;80940:3:::2;-1:-1:-1::0;;;;;80940:7:0::2;;:9;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;80918:32:0::2;:10;-1:-1:-1::0;;;;;80918:32:0::2;;80910:54;;;::::0;-1:-1:-1;;;80910:54:0;;9513:2:1;80910:54:0::2;::::0;::::2;9495:21:1::0;9552:1;9532:18;;;9525:29;-1:-1:-1;;;9570:18:1;;;9563:39;9619:18;;80910:54:0::2;9485:158:1::0;80910:54:0::2;80976:8;80971:243;80990:16:::0;;::::2;80971:243;;;81024:9;81036:3;;81040;81036:8;;;;;-1:-1:-1::0;;;81036:8:0::2;;;;;;;;;;;;;;;81024:20;;81069:10;81061:4;:18;;:44;;;;-1:-1:-1::0;81090:15:0::2;:10;81103:2;81090:15;:::i;:::-;81083:4;:22;81061:44;81053:65;;;::::0;-1:-1:-1;;;81053:65:0;;11246:2:1;81053:65:0::2;::::0;::::2;11228:21:1::0;11285:1;11265:18;;;11258:29;-1:-1:-1;;;11303:18:1;;;11296:38;11351:18;;81053:65:0::2;11218:157:1::0;81053:65:0::2;81149:1;81135:6;;81142:3;81135:11;;;;;-1:-1:-1::0;;;81135:11:0::2;;;;;;;;;;;;;;;:15;81127:36;;;::::0;-1:-1:-1;;;81127:36:0;;11582:2:1;81127:36:0::2;::::0;::::2;11564:21:1::0;11621:1;11601:18;;;11594:29;-1:-1:-1;;;11639:18:1;;;11632:38;11687:18;;81127:36:0::2;11554:157:1::0;81127:36:0::2;81172:3;-1:-1:-1::0;;;;;81172:9:0::2;;81182:4;81188:6;;81195:3;81188:11;;;;;-1:-1:-1::0;;;81188:11:0::2;;;;;;;;;81172:34;::::0;-1:-1:-1;;;;;;81172:34:0::2;::::0;;;;;;::::2;::::0;::::2;13405:25:1::0;;;;81188:11:0::2;;::::0;;;::::2;;13446:18:1::0;;;13439:34;-1:-1:-1;;;;;;13509:32:1;;13489:18;;;13482:60;13378:18;;81172:34:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;80971:243;81008:5;;;;;:::i;:::-;;;;80971:243;;;-1:-1:-1::0;;14938:1:0;15890:22;;-1:-1:-1;;;;81227:36:0;80681:588;-1:-1:-1;;;;;;;80681:588:0:o;78256:172::-;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;10519:10;31024:23;31016:68;;;;-1:-1:-1;;;31016:68:0;;;;;;;:::i;:::-;33201:7;;;;33455:9:::1;33447:38;;;;-1:-1:-1::0;;;33447:38:0::1;;;;;;;:::i;:::-;78318:11:::2;78313:110;78344:2;78335:6;:11;78313:110;;;-1:-1:-1::0;;;;;78367:3:0::2;:17;;78385:19;78398:6:::0;78385:10:::2;:19;:::i;:::-;78367:48;::::0;-1:-1:-1;;;;;;78367:48:0::2;::::0;;;;;;::::2;::::0;::::2;13116:25:1::0;;;;78406:8:0::2;13157:18:1::0;;;13150:34;13089:18;;78367:48:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;78348:8;;;;;:::i;:::-;;;;78313:110;;;;78256:172::o:0;80012:106::-;80079:15;;-1:-1:-1;;;80079:15:0;;;;;6938:25:1;;;80059:4:0;;80079:3;-1:-1:-1;;;;;80079:11:0;;;;6911:18:1;;80079:15:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:33;;;-1:-1:-1;;80098:14:0;;;;:10;:14;;;;;;;;;80012:106::o;80475:200::-;80648:21;;-1:-1:-1;;;80648:21:0;;12278:2:1;80648:21:0;;;12260::1;12317:2;12297:18;;;12290:30;-1:-1:-1;;;12336:18:1;;;12329:41;80633:6:0;;12387:18:1;;80648:21:0;12250:161:1;31704:192:0;30850:7;30877:6;-1:-1:-1;;;;;30877:6:0;10519:10;31024:23;31016:68;;;;-1:-1:-1;;;31016:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;31793:22:0;::::1;31785:73;;;::::0;-1:-1:-1;;;31785:73:0;;8762:2:1;31785:73:0::1;::::0;::::1;8744:21:1::0;8801:2;8781:18;;;8774:30;8840:34;8820:18;;;8813:62;-1:-1:-1;;;8891:18:1;;;8884:36;8937:19;;31785:73:0::1;8734:228:1::0;31785:73:0::1;31869:19;31879:8;31869:9;:19::i;80124:345::-:0;80187:15;;-1:-1:-1;;;80187:15:0;;;;;6938:25:1;;;80187:3:0;-1:-1:-1;;;;;80187:11:0;;;;6911:18:1;;80187:15:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;80173:29:0;:10;-1:-1:-1;;;;;80173:29:0;;80165:55;;;;-1:-1:-1;;;80165:55:0;;8420:2:1;80165:55:0;;;8402:21:1;8459:2;8439:18;;;8432:30;-1:-1:-1;;;8478:18:1;;;8471:43;8531:18;;80165:55:0;8392:163:1;80165:55:0;80236:11;80244:2;80236:7;:11::i;:::-;80235:12;80227:40;;;;-1:-1:-1;;;80227:40:0;;9169:2:1;80227:40:0;;;9151:21:1;9208:2;9188:18;;;9181:30;-1:-1:-1;;;9227:18:1;;;9220:45;9282:18;;80227:40:0;9141:165:1;80227:40:0;80274:14;;;;:10;:14;;;;;:21;;-1:-1:-1;;80274:21:0;80291:4;80274:21;;;80325:11;80285:2;80325:7;:11::i;:::-;80302:34;;80348:8;80343:88;80368:1;80362:3;:7;80343:88;;;80387:3;-1:-1:-1;;;;;80387:9:0;;80397:5;80403:3;80397:10;;;;;-1:-1:-1;;;80397:10:0;;;;;;;;;;;;;80387:36;;-1:-1:-1;;;;;;80387:36:0;;;;;;;;;;13405:25:1;;;;80409:1:0;13446:18:1;;;13439:34;80412:10:0;13489:18:1;;;13482:60;13378:18;;80387:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80371:5;;;;;:::i;:::-;;;;80343:88;;;-1:-1:-1;80442:21:0;;80452:10;;80448:2;;80442:21;;;;;80124:345;;:::o;34189:120::-;33201:7;;;;33725:41;;;;-1:-1:-1;;;33725:41:0;;8071:2:1;33725:41:0;;;8053:21:1;8110:2;8090:18;;;8083:30;-1:-1:-1;;;8129:18:1;;;8122:50;8189:18;;33725:41:0;8043:170:1;33725:41:0;34248:7:::1;:15:::0;;-1:-1:-1;;34248:15:0::1;::::0;;34279:22:::1;10519:10:::0;34288:12:::1;34279:22;::::0;-1:-1:-1;;;;;6056:32:1;;;6038:51;;6026:2;6011:18;34279:22:0::1;;;;;;;34189:120::o:0;31904:173::-;31960:16;31979:6;;-1:-1:-1;;;;;31996:17:0;;;-1:-1:-1;;;;;;31996:17:0;;;;;;32029:40;;31979:6;;;;;;;32029:40;;31960:16;32029:40;31904:173;;:::o;33930:118::-;33201:7;;;;33455:9;33447:38;;;;-1:-1:-1;;;33447:38:0;;;;;;;:::i;:::-;33990:7:::1;:14:::0;;-1:-1:-1;;33990:14:0::1;34000:4;33990:14;::::0;;34020:20:::1;34027:12;10519:10:::0;10439:98;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:395:1:-;;;141:3;134:4;126:6;122:17;118:27;108:2;;166:8;156;149:26;108:2;-1:-1:-1;196:20:1;;239:18;228:30;;225:2;;;278:8;268;261:26;225:2;322:4;314:6;310:17;298:29;;382:3;375:4;365:6;362:1;358:14;350:6;346:27;342:38;339:47;336:2;;;399:1;396;389:12;336:2;98:311;;;;;:::o;414:375::-;;;529:3;522:4;514:6;510:17;506:27;496:2;;554:8;544;537:26;496:2;-1:-1:-1;584:20:1;;627:18;616:30;;613:2;;;666:8;656;649:26;613:2;710:4;702:6;698:17;686:29;;762:3;755:4;746:6;738;734:19;730:30;727:39;724:2;;;779:1;776;769:12;794:257;;906:2;894:9;885:7;881:23;877:32;874:2;;;927:6;919;912:22;874:2;971:9;958:23;990:31;1015:5;990:31;:::i;:::-;1040:5;864:187;-1:-1:-1;;;864:187:1:o;1056:261::-;;1179:2;1167:9;1158:7;1154:23;1150:32;1147:2;;;1200:6;1192;1185:22;1147:2;1237:9;1231:16;1256:31;1281:5;1256:31;:::i;1322:1378::-;;;;;;;;;1591:3;1579:9;1570:7;1566:23;1562:33;1559:2;;;1613:6;1605;1598:22;1559:2;1657:9;1644:23;1676:31;1701:5;1676:31;:::i;:::-;1726:5;-1:-1:-1;1783:2:1;1768:18;;1755:32;1796:33;1755:32;1796:33;:::i;:::-;1848:7;-1:-1:-1;1906:2:1;1891:18;;1878:32;1929:18;1959:14;;;1956:2;;;1991:6;1983;1976:22;1956:2;2035:70;2097:7;2088:6;2077:9;2073:22;2035:70;:::i;:::-;2124:8;;-1:-1:-1;2009:96:1;-1:-1:-1;2212:2:1;2197:18;;2184:32;;-1:-1:-1;2228:16:1;;;2225:2;;;2262:6;2254;2247:22;2225:2;2306:72;2370:7;2359:8;2348:9;2344:24;2306:72;:::i;:::-;2397:8;;-1:-1:-1;2280:98:1;-1:-1:-1;2485:3:1;2470:19;;2457:33;;-1:-1:-1;2502:16:1;;;2499:2;;;2536:6;2528;2521:22;2499:2;;2580:60;2632:7;2621:8;2610:9;2606:24;2580:60;:::i;:::-;1549:1151;;;;-1:-1:-1;1549:1151:1;;-1:-1:-1;1549:1151:1;;;;;;2659:8;-1:-1:-1;;;1549:1151:1:o;2705:843::-;;;;;;;2904:3;2892:9;2883:7;2879:23;2875:33;2872:2;;;2926:6;2918;2911:22;2872:2;2970:9;2957:23;2989:31;3014:5;2989:31;:::i;:::-;3039:5;-1:-1:-1;3096:2:1;3081:18;;3068:32;3109:33;3068:32;3109:33;:::i;:::-;3161:7;-1:-1:-1;3215:2:1;3200:18;;3187:32;;-1:-1:-1;3266:2:1;3251:18;;3238:32;;-1:-1:-1;3321:3:1;3306:19;;3293:33;3349:18;3338:30;;3335:2;;;3386:6;3378;3371:22;3335:2;3430:58;3480:7;3471:6;3460:9;3456:22;3430:58;:::i;:::-;2862:686;;;;-1:-1:-1;2862:686:1;;-1:-1:-1;2862:686:1;;3507:8;;2862:686;-1:-1:-1;;;2862:686:1:o;3553:457::-;;;3700:2;3688:9;3679:7;3675:23;3671:32;3668:2;;;3721:6;3713;3706:22;3668:2;3766:9;3753:23;3799:18;3791:6;3788:30;3785:2;;;3836:6;3828;3821:22;3785:2;3880:70;3942:7;3933:6;3922:9;3918:22;3880:70;:::i;:::-;3969:8;;3854:96;;-1:-1:-1;3658:352:1;-1:-1:-1;;;;3658:352:1:o;4015:297::-;;4135:2;4123:9;4114:7;4110:23;4106:32;4103:2;;;4156:6;4148;4141:22;4103:2;4193:9;4187:16;4246:5;4239:13;4232:21;4225:5;4222:32;4212:2;;4273:6;4265;4258:22;4317:306;;4428:2;4416:9;4407:7;4403:23;4399:32;4396:2;;;4449:6;4441;4434:22;4396:2;4480:23;;-1:-1:-1;;;;;;4532:32:1;;4522:43;;4512:2;;4584:6;4576;4569:22;4918:190;;5030:2;5018:9;5009:7;5005:23;5001:32;4998:2;;;5051:6;5043;5036:22;4998:2;-1:-1:-1;5079:23:1;;4988:120;-1:-1:-1;4988:120:1:o;5113:194::-;;5236:2;5224:9;5215:7;5211:23;5207:32;5204:2;;;5257:6;5249;5242:22;5204:2;-1:-1:-1;5285:16:1;;5194:113;-1:-1:-1;5194:113:1:o;5312:258::-;;;5441:2;5429:9;5420:7;5416:23;5412:32;5409:2;;;5462:6;5454;5447:22;5409:2;-1:-1:-1;;5490:23:1;;;5560:2;5545:18;;;5532:32;;-1:-1:-1;5399:171:1:o;6100:495::-;6280:3;6265:19;;6269:9;6361:6;6100:495;6395:194;6409:4;6406:1;6403:11;6395:194;;;6468:13;;6456:26;;6505:4;6529:12;;;;6564:15;;;;6429:1;6422:9;6395:194;;;6399:3;;;6247:348;;;;:::o;9648:340::-;9850:2;9832:21;;;9889:2;9869:18;;;9862:30;-1:-1:-1;;;9923:2:1;9908:18;;9901:46;9979:2;9964:18;;9822:166::o;10683:356::-;10885:2;10867:21;;;10904:18;;;10897:30;10963:34;10958:2;10943:18;;10936:62;11030:2;11015:18;;10857:182::o;11716:355::-;11918:2;11900:21;;;11957:2;11937:18;;;11930:30;11996:33;11991:2;11976:18;;11969:61;12062:2;12047:18;;11890:181::o;13903:128::-;;13974:1;13970:6;13967:1;13964:13;13961:2;;;13980:18;;:::i;:::-;-1:-1:-1;14016:9:1;;13951:80::o;14036:120::-;;14102:1;14092:2;;14107:18;;:::i;:::-;-1:-1:-1;14141:9:1;;14082:74::o;14161:136::-;;14228:5;14218:2;;14237:18;;:::i;:::-;-1:-1:-1;;;14273:18:1;;14208:89::o;14302:135::-;;-1:-1:-1;;14362:17:1;;14359:2;;;14382:18;;:::i;:::-;-1:-1:-1;14429:1:1;14418:13;;14349:88::o;14442:112::-;;14500:1;14490:2;;14505:18;;:::i;:::-;-1:-1:-1;14539:9:1;;14480:74::o;14559:127::-;14620:10;14615:3;14611:20;14608:1;14601:31;14651:4;14648:1;14641:15;14675:4;14672:1;14665:15;14691:127;14752:10;14747:3;14743:20;14740:1;14733:31;14783:4;14780:1;14773:15;14807:4;14804:1;14797:15;14823:131;-1:-1:-1;;;;;14898:31:1;;14888:42;;14878:2;;14944:1;14941;14934:12
Swarm Source
ipfs://33e55847240971019affe6f6929a382219f9c85b6ee0aa4707cfcc233ee9f047
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.