Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 900 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Multi Claim | 13450852 | 1231 days ago | IN | 0 ETH | 0.00676874 | ||||
Multi Claim | 13450834 | 1231 days ago | IN | 0 ETH | 0.00732852 | ||||
Multi Claim | 13182597 | 1272 days ago | IN | 0 ETH | 0.00550091 | ||||
Multi Claim | 13177452 | 1273 days ago | IN | 0 ETH | 0.01780296 | ||||
Multi Claim | 13177429 | 1273 days ago | IN | 0 ETH | 0.04406748 | ||||
Claim | 13177389 | 1273 days ago | IN | 0 ETH | 0.02813589 | ||||
Multi Claim | 13177381 | 1273 days ago | IN | 0 ETH | 0.03511752 | ||||
Multi Claim | 13177372 | 1273 days ago | IN | 0 ETH | 0.01370949 | ||||
Multi Claim | 13177310 | 1273 days ago | IN | 0 ETH | 0.02093521 | ||||
Multi Claim | 13177304 | 1273 days ago | IN | 0 ETH | 0.01478422 | ||||
Multi Claim | 13177277 | 1273 days ago | IN | 0 ETH | 0.01726726 | ||||
Multi Claim | 13177268 | 1273 days ago | IN | 0 ETH | 0.01437957 | ||||
Multi Claim | 13177263 | 1273 days ago | IN | 0 ETH | 0.02197376 | ||||
Multi Claim | 13177239 | 1273 days ago | IN | 0 ETH | 0.08234567 | ||||
Multi Claim | 13177213 | 1273 days ago | IN | 0 ETH | 0.03740152 | ||||
Multi Claim | 13177205 | 1273 days ago | IN | 0 ETH | 0.00297083 | ||||
Multi Claim | 13177188 | 1273 days ago | IN | 0 ETH | 0.01719885 | ||||
Multi Claim | 13177118 | 1273 days ago | IN | 0 ETH | 0.0131771 | ||||
Multi Claim | 13177114 | 1273 days ago | IN | 0 ETH | 0.01500197 | ||||
Multi Claim | 13177113 | 1273 days ago | IN | 0 ETH | 0.01736238 | ||||
Multi Claim | 13177052 | 1273 days ago | IN | 0 ETH | 0.02067115 | ||||
Claim | 13177043 | 1273 days ago | IN | 0 ETH | 0.0215841 | ||||
Multi Claim | 13176955 | 1273 days ago | IN | 0 ETH | 0.01816636 | ||||
Claim | 13176941 | 1273 days ago | IN | 0 ETH | 0.01611908 | ||||
Multi Claim | 13176907 | 1273 days ago | IN | 0 ETH | 0.01934005 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
BLOOTGemCrafter
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-09-06 */ // 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]/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: 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]/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); 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)); } } // File: BLOOTGemCrafter.sol /// @title BLOOT GEM Crafter /// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear) contract BLOOTGemCrafter 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; // prettier-ignore constructor(IERC721 _nft, ProvablyRareGem _gem) { NFT = _nft; GEM = _gem; FIRST_KIND = _gem.gemCount(); _gem.create('Violet Useless Rock of ALPHA', '#9966CC', 8**2, 64, 10000, address(this), msg.sender); _gem.create('Goldy Pebble of LOOKS RARE', '#FFC87C', 8**3, 32, 10001, address(this), msg.sender); _gem.create('Translucent River Rock of HODL', '#A8C3BC', 8**4, 16, 10005, address(this), msg.sender); _gem.create('Blue Ice Scrap of UP ONLY', '#0F52BA', 8**5, 8, 10010, address(this), msg.sender); _gem.create('Blushing Rock of PROBABLY NOTHING', '#E0115F', 8**6, 4, 10030, address(this), msg.sender); _gem.create('Mossy Riverside Pebble of LFG', '#50C878', 8**7, 2, 10100, address(this), msg.sender); _gem.create('The Lovely Rock of GOAT', '#FC74E4', 8**8, 1, 10300, address(this), msg.sender); _gem.create('#00FF00 of OG', '#00FF00', 8**9, 1, 11000, address(this), msg.sender); _gem.create('#0000FF of WAGMI', '#0000FF', 8**10, 1, 20000, address(this), msg.sender); _gem.create('#FF0000 of THE MOON', '#FF0000', 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); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC721","name":"_nft","type":"address"},{"internalType":"contract ProvablyRareGem","name":"_gem","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":"bytes32","name":"hashseed","type":"bytes32"}],"name":"Start","type":"event"},{"inputs":[],"name":"FIRST_KIND","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GEM","outputs":[{"internalType":"contract ProvablyRareGem","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":"","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162001aad38038062001aad833981016040819052620000349162000aa4565b6200003f3362000a54565b600180556001600160601b0319606083811b821660805282901b1660a052604080516316e2ef0960e21b815290516001600160a01b03831691635b8bbc24916004808301926020929190829003018186803b1580156200009e57600080fd5b505afa158015620000b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d9919062000ae2565b60c0526040805163626bc15b60e01b815260e06004820152601c60e48201527f56696f6c6574205573656c65737320526f636b206f6620414c5048410000000061010482015261012060248201526007610124820152662339393636434360c81b61014482015260448101829052606481019190915261271060848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200019357600080fd5b505af1158015620001a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ce919062000ae2565b5060405163626bc15b60e01b815260e06004820152601a60e48201527f476f6c647920506562626c65206f66204c4f4f4b53205241524500000000000061010482015261012060248201526007610124820152662346464338374360c81b61014482015261020060448201526020606482015261271160848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200028557600080fd5b505af11580156200029a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002c0919062000ae2565b5060405163626bc15b60e01b815260e06004820152601e60e48201527f5472616e736c7563656e7420526976657220526f636b206f6620484f444c000061010482015261012060248201526007610124820152662341384333424360c81b61014482015261100060448201526010606482015261271560848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200037757600080fd5b505af11580156200038c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003b2919062000ae2565b5060405163626bc15b60e01b815260e06004820152601960e48201527f426c756520496365205363726170206f66205550204f4e4c590000000000000061010482015261012060248201526007610124820152662330463532424160c81b61014482015261800060448201526008606482015261271a60848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200046957600080fd5b505af11580156200047e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004a4919062000ae2565b5060405163626bc15b60e01b815260e0600480830191909152602160e48301527f426c757368696e6720526f636b206f662050524f4241424c59204e4f5448494e610104830152604760f81b610124830152610140602483015260076101448301526611a29818989aa360c91b610164830152620400006044830152606482015261272e60848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061018401602060405180830381600087803b1580156200056957600080fd5b505af11580156200057e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005a4919062000ae2565b5060405163626bc15b60e01b815260e06004820152601d60e48201527f4d6f7373792052697665727369646520506562626c65206f66204c464700000061010482015261012060248201526007610124820152660466a6086706e760cb1b6101448201526220000060448201526002606482015261277460848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200065c57600080fd5b505af115801562000671573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000697919062000ae2565b5060405163626bc15b60e01b815260e06004820152601760e48201527f546865204c6f76656c7920526f636b206f6620474f4154000000000000000000610104820152610120602482015260076101248201526608d190cdcd114d60ca1b610144820152630100000060448201526001606482015261283c60848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200075057600080fd5b505af115801562000765573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200078b919062000ae2565b5060405163626bc15b60e01b815260e06004820152600d60e48201526c23303046463030206f66204f4760981b61010482015261012060248201526007610124820152660233030464630360cc1b6101448201526308000000604482015260016064820152612af860848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200083457600080fd5b505af115801562000849573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200086f919062000ae2565b5060405163626bc15b60e01b815260e06004820152601060e48201526f23303030304646206f66205741474d4960801b61010482015261012060248201526007610124820152661198181818232360c91b6101448201526340000000604482015260016064820152614e2060848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b1580156200091b57600080fd5b505af115801562000930573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000956919062000ae2565b5060405163626bc15b60e01b815260e06004820152601360e48201527f23464630303030206f6620544845204d4f4f4e0000000000000000000000000061010482015261012060248201526007610124820152660234646303030360cc1b61014482015264020000000060448201526001606482015261c35060848201523060a48201523360c48201526001600160a01b0382169063626bc15b9061016401602060405180830381600087803b15801562000a1057600080fd5b505af115801562000a25573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a4b919062000ae2565b50505062000b14565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121562000ab7578182fd5b825162000ac48162000afb565b602084015190925062000ad78162000afb565b809150509250929050565b60006020828403121562000af4578081fd5b5051919050565b6001600160a01b038116811462000b1157600080fd5b50565b60805160601c60a05160601c60c051610f2b62000b82600039600081816102120152818161068c0152818161075a015261089501526000818161011c0152818161035c015281816104130152818161086a0152610b2b01526000818161017b01526109d60152610f2b6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806397dc4a131161008c578063cac4cc2911610066578063cac4cc29146101ed578063d15634f41461020d578063dbe7e3bd14610234578063f2fde38b14610267576100ea565b806397dc4a13146101ae578063be9a6555146101ce578063c290003f146101d6576100ea565b80634ed73d28116100c85780634ed73d281461015b578063715018a61461016e5780637c0b8de2146101765780638da5cb5b1461019d576100ea565b8063289137a1146100ef578063379607f5146101045780634dc6541114610117575b600080fd5b6101026100fd366004610d6d565b61027a565b005b610102610112366004610d3d565b6104f6565b61013e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610102610169366004610ccd565b61052e565b6101026105ab565b61013e7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661013e565b6101c16101bc366004610d3d565b6105e1565b6040516101529190610d8e565b6101026107d9565b6101df60025481565b604051908152602001610152565b6101df6101fb366004610d3d565b60036020526000908152604090205481565b6101df7f000000000000000000000000000000000000000000000000000000000000000081565b610257610242366004610d3d565b60046020526000908152604090205460ff1681565b6040519015158152602001610152565b610102610275366004610c8e565b610928565b600260015414156102a65760405162461bcd60e51b815260040161029d90610df4565b60405180910390fd5b60026001556000546001600160a01b031633146102d55760405162461bcd60e51b815260040161029d90610dbf565b806103165760405162461bcd60e51b81526020600482015260116024820152701e995c9bc8185b5bdd5b9d0818dc98599d607a1b604482015260640161029d565b60008281526003602052604081208054839290610334908490610e2b565b90915550506040516343cbd8cb60e11b815260048101839052602481018290523360448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638797b19690606401600060405180830381600087803b1580156103a857600080fd5b505af11580156103bc573d6000803e3d6000fd5b50505050817f213ee7b67affc220b6d48c5a07b1ab759e376568e553cd29a07f2759a4df5d3f826040516103f291815260200190565b60405180910390a260405163bd85b03960e01b815260048101839052600a907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063bd85b0399060240160206040518083038186803b15801561045d57600080fd5b505afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190610d55565b61049f9190610e43565b60008381526003602052604090205411156104ee5760405162461bcd60e51b815260206004820152600f60248201526e746f6f206d616e792063726166747360881b604482015260640161029d565b505060018055565b600260015414156105195760405162461bcd60e51b815260040161029d90610df4565b6002600155610527816109c0565b5060018055565b600260015414156105515760405162461bcd60e51b815260040161029d90610df4565b600260015560005b818110156105a25761059083838381811061058457634e487b7160e01b600052603260045260246000fd5b905060200201356109c0565b8061059a81610e85565b915050610559565b50506001805550565b6000546001600160a01b031633146105d55760405162461bcd60e51b815260040161029d90610dbf565b6105df6000610c20565b565b6105e9610c70565b60025461062a5760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081e595d081cdd185c9d1959608a1b604482015260640161029d565b60408051610140810182526001808252602082015260039181019190915260066060820152600a6080820152601460a0820152601e60c0820152606460e082015261012c6101008201526103e86101208201526000805b60048110156106e2577f00000000000000000000000000000000000000000000000000000000000000008482600481106106cb57634e487b7160e01b600052603260045260246000fd5b6020020152806106da81610e85565b915050610681565b5060095b80156107d15760025460408051602080820193909352808201849052606080820189905282518083039091018152608090910190915280519101208382600a811061074157634e487b7160e01b600052603260045260246000fd5b60200201516107509082610ea0565b6107af5761077e827f0000000000000000000000000000000000000000000000000000000000000000610e2b565b858461078981610e85565b9550600481106107a957634e487b7160e01b600052603260045260246000fd5b60200201525b82600414156107be57506107d1565b50806107c981610e6e565b9150506106e6565b505050919050565b6000546001600160a01b031633146108035760405162461bcd60e51b815260040161029d90610dbf565b600254156108455760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b604482015260640161029d565b610850600143610e57565b4060025560005b600a811015610925576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663b314782c6108b9837f0000000000000000000000000000000000000000000000000000000000000000610e2b565b6002546040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b50505050808061091d90610e85565b915050610857565b50565b6000546001600160a01b031633146109525760405162461bcd60e51b815260040161029d90610dbf565b6001600160a01b0381166109b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161029d565b61092581610c20565b6040516331a9108f60e11b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b158015610a2057600080fd5b505afa158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190610cb1565b6001600160a01b0316336001600160a01b031614610aa85760405162461bcd60e51b815260206004820152600d60248201526c3737ba1037333a1037bbb732b960991b604482015260640161029d565b60008181526004602052604090205460ff1615610af95760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b604482015260640161029d565b6000818152600460205260408120805460ff19166001179055610b1b826105e1565b905060005b6004811015610bee577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638797b196838360048110610b7857634e487b7160e01b600052603260045260246000fd5b60200201516040516001600160e01b031960e084901b168152600481019190915260006024820152336044820152606401600060405180830381600087803b158015610bc357600080fd5b505af1158015610bd7573d6000803e3d6000fd5b505050508080610be690610e85565b915050610b20565b50604051339083907f35538759d80c1fd7bb450a0d05601db5a99fa8b5d073a07c847a9fd61029b10790600090a35050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405180608001604052806004906020820280368337509192915050565b600060208284031215610c9f578081fd5b8135610caa81610ee0565b9392505050565b600060208284031215610cc2578081fd5b8151610caa81610ee0565b60008060208385031215610cdf578081fd5b823567ffffffffffffffff80821115610cf6578283fd5b818501915085601f830112610d09578283fd5b813581811115610d17578384fd5b8660208260051b8501011115610d2b578384fd5b60209290920196919550909350505050565b600060208284031215610d4e578081fd5b5035919050565b600060208284031215610d66578081fd5b5051919050565b60008060408385031215610d7f578182fd5b50508035926020909101359150565b60808101818360005b6004811015610db6578151835260209283019290910190600101610d97565b50505092915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115610e3e57610e3e610eb4565b500190565b600082610e5257610e52610eca565b500490565b600082821015610e6957610e69610eb4565b500390565b600081610e7d57610e7d610eb4565b506000190190565b6000600019821415610e9957610e99610eb4565b5060010190565b600082610eaf57610eaf610eca565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461092557600080fdfea264697066735822122086bfc655487884b09915def6f1d98311048a6d714fad6b6236cad71a8695140e64736f6c634300080300330000000000000000000000004f8730e0b32b04beaa5757e5aea3aef970e5b613000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806397dc4a131161008c578063cac4cc2911610066578063cac4cc29146101ed578063d15634f41461020d578063dbe7e3bd14610234578063f2fde38b14610267576100ea565b806397dc4a13146101ae578063be9a6555146101ce578063c290003f146101d6576100ea565b80634ed73d28116100c85780634ed73d281461015b578063715018a61461016e5780637c0b8de2146101765780638da5cb5b1461019d576100ea565b8063289137a1146100ef578063379607f5146101045780634dc6541114610117575b600080fd5b6101026100fd366004610d6d565b61027a565b005b610102610112366004610d3d565b6104f6565b61013e7f000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e81565b6040516001600160a01b0390911681526020015b60405180910390f35b610102610169366004610ccd565b61052e565b6101026105ab565b61013e7f0000000000000000000000004f8730e0b32b04beaa5757e5aea3aef970e5b61381565b6000546001600160a01b031661013e565b6101c16101bc366004610d3d565b6105e1565b6040516101529190610d8e565b6101026107d9565b6101df60025481565b604051908152602001610152565b6101df6101fb366004610d3d565b60036020526000908152604090205481565b6101df7f000000000000000000000000000000000000000000000000000000000000000a81565b610257610242366004610d3d565b60046020526000908152604090205460ff1681565b6040519015158152602001610152565b610102610275366004610c8e565b610928565b600260015414156102a65760405162461bcd60e51b815260040161029d90610df4565b60405180910390fd5b60026001556000546001600160a01b031633146102d55760405162461bcd60e51b815260040161029d90610dbf565b806103165760405162461bcd60e51b81526020600482015260116024820152701e995c9bc8185b5bdd5b9d0818dc98599d607a1b604482015260640161029d565b60008281526003602052604081208054839290610334908490610e2b565b90915550506040516343cbd8cb60e11b815260048101839052602481018290523360448201527f000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e6001600160a01b031690638797b19690606401600060405180830381600087803b1580156103a857600080fd5b505af11580156103bc573d6000803e3d6000fd5b50505050817f213ee7b67affc220b6d48c5a07b1ab759e376568e553cd29a07f2759a4df5d3f826040516103f291815260200190565b60405180910390a260405163bd85b03960e01b815260048101839052600a907f000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e6001600160a01b03169063bd85b0399060240160206040518083038186803b15801561045d57600080fd5b505afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190610d55565b61049f9190610e43565b60008381526003602052604090205411156104ee5760405162461bcd60e51b815260206004820152600f60248201526e746f6f206d616e792063726166747360881b604482015260640161029d565b505060018055565b600260015414156105195760405162461bcd60e51b815260040161029d90610df4565b6002600155610527816109c0565b5060018055565b600260015414156105515760405162461bcd60e51b815260040161029d90610df4565b600260015560005b818110156105a25761059083838381811061058457634e487b7160e01b600052603260045260246000fd5b905060200201356109c0565b8061059a81610e85565b915050610559565b50506001805550565b6000546001600160a01b031633146105d55760405162461bcd60e51b815260040161029d90610dbf565b6105df6000610c20565b565b6105e9610c70565b60025461062a5760405162461bcd60e51b815260206004820152600f60248201526e1b9bdd081e595d081cdd185c9d1959608a1b604482015260640161029d565b60408051610140810182526001808252602082015260039181019190915260066060820152600a6080820152601460a0820152601e60c0820152606460e082015261012c6101008201526103e86101208201526000805b60048110156106e2577f000000000000000000000000000000000000000000000000000000000000000a8482600481106106cb57634e487b7160e01b600052603260045260246000fd5b6020020152806106da81610e85565b915050610681565b5060095b80156107d15760025460408051602080820193909352808201849052606080820189905282518083039091018152608090910190915280519101208382600a811061074157634e487b7160e01b600052603260045260246000fd5b60200201516107509082610ea0565b6107af5761077e827f000000000000000000000000000000000000000000000000000000000000000a610e2b565b858461078981610e85565b9550600481106107a957634e487b7160e01b600052603260045260246000fd5b60200201525b82600414156107be57506107d1565b50806107c981610e6e565b9150506106e6565b505050919050565b6000546001600160a01b031633146108035760405162461bcd60e51b815260040161029d90610dbf565b600254156108455760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b604482015260640161029d565b610850600143610e57565b4060025560005b600a811015610925576001600160a01b037f000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e1663b314782c6108b9837f000000000000000000000000000000000000000000000000000000000000000a610e2b565b6002546040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156108fa57600080fd5b505af115801561090e573d6000803e3d6000fd5b50505050808061091d90610e85565b915050610857565b50565b6000546001600160a01b031633146109525760405162461bcd60e51b815260040161029d90610dbf565b6001600160a01b0381166109b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161029d565b61092581610c20565b6040516331a9108f60e11b8152600481018290527f0000000000000000000000004f8730e0b32b04beaa5757e5aea3aef970e5b6136001600160a01b031690636352211e9060240160206040518083038186803b158015610a2057600080fd5b505afa158015610a34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a589190610cb1565b6001600160a01b0316336001600160a01b031614610aa85760405162461bcd60e51b815260206004820152600d60248201526c3737ba1037333a1037bbb732b960991b604482015260640161029d565b60008181526004602052604090205460ff1615610af95760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b604482015260640161029d565b6000818152600460205260408120805460ff19166001179055610b1b826105e1565b905060005b6004811015610bee577f000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e6001600160a01b0316638797b196838360048110610b7857634e487b7160e01b600052603260045260246000fd5b60200201516040516001600160e01b031960e084901b168152600481019190915260006024820152336044820152606401600060405180830381600087803b158015610bc357600080fd5b505af1158015610bd7573d6000803e3d6000fd5b505050508080610be690610e85565b915050610b20565b50604051339083907f35538759d80c1fd7bb450a0d05601db5a99fa8b5d073a07c847a9fd61029b10790600090a35050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405180608001604052806004906020820280368337509192915050565b600060208284031215610c9f578081fd5b8135610caa81610ee0565b9392505050565b600060208284031215610cc2578081fd5b8151610caa81610ee0565b60008060208385031215610cdf578081fd5b823567ffffffffffffffff80821115610cf6578283fd5b818501915085601f830112610d09578283fd5b813581811115610d17578384fd5b8660208260051b8501011115610d2b578384fd5b60209290920196919550909350505050565b600060208284031215610d4e578081fd5b5035919050565b600060208284031215610d66578081fd5b5051919050565b60008060408385031215610d7f578182fd5b50508035926020909101359150565b60808101818360005b6004811015610db6578151835260209283019290910190600101610d97565b50505092915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115610e3e57610e3e610eb4565b500190565b600082610e5257610e52610eca565b500490565b600082821015610e6957610e69610eb4565b500390565b600081610e7d57610e7d610eb4565b506000190190565b6000600019821415610e9957610e99610eb4565b5060010190565b600082610eaf57610eaf610eca565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461092557600080fdfea264697066735822122086bfc655487884b09915def6f1d98311048a6d714fad6b6236cad71a8695140e64736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004f8730e0b32b04beaa5757e5aea3aef970e5b613000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e
-----Decoded View---------------
Arg [0] : _nft (address): 0x4F8730E0b32B04beaa5757e5aea3aeF970E5B613
Arg [1] : _gem (address): 0x046427fA6b924739Cd98Ee507CB0db34c7A66C2e
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004f8730e0b32b04beaa5757e5aea3aef970e5b613
Arg [1] : 000000000000000000000000046427fa6b924739cd98ee507cb0db34c7a66c2e
Deployed Bytecode Sourcemap
54735:3726:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56737:306;;;;;;:::i;:::-;;:::i;:::-;;57801:69;;;;;;:::i;:::-;;:::i;54826:36::-;;;;;;;;-1:-1:-1;;;;;2350:32:1;;;2332:51;;2320:2;2305:18;54826:36:0;;;;;;;;57958:152;;;;;;:::i;:::-;;:::i;27924:94::-;;;:::i;54793:28::-;;;;;27273:87;27319:7;27346:6;-1:-1:-1;;;;;27346:6:0;27273:87;;57128:575;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;56385:260::-;;;:::i;55048:23::-;;;;;;;;;3232:25:1;;;3220:2;3205:18;55048:23:0;3187:76:1;55076:36:0;;;;;;:::i;:::-;;;;;;;;;;;;;;54867:32;;;;;55117:36;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3059:14:1;;3052:22;3034:41;;3022:2;3007:18;55117:36:0;2989:92:1;28173:192:0;;;;;;:::i;:::-;;:::i;56737:306::-;13186:1;13782:7;;:19;;13774:63;;;;-1:-1:-1;;;13774:63:0;;;;;;;:::i;:::-;;;;;;;;;13186:1;13915:7;:18;27319:7;27346:6;-1:-1:-1;;;;;27346:6:0;10519:10;27493:23:::1;27485:68;;;;-1:-1:-1::0;;;27485:68:0::1;;;;;;;:::i;:::-;56823:11:::0;56815:41:::2;;;::::0;-1:-1:-1;;;56815:41:0;;5362:2:1;56815:41:0::2;::::0;::::2;5344:21:1::0;5401:2;5381:18;;;5374:30;-1:-1:-1;;;5420:18:1;;;5413:47;5477:18;;56815:41:0::2;5334:167:1::0;56815:41:0::2;56863:13;::::0;;;:7:::2;:13;::::0;;;;:23;;56880:6;;56863:13;:23:::2;::::0;56880:6;;56863:23:::2;:::i;:::-;::::0;;;-1:-1:-1;;56893:35:0::2;::::0;-1:-1:-1;;;56893:35:0;;::::2;::::0;::::2;7560:25:1::0;;;7601:18;;;7594:34;;;56917:10:0::2;7644:18:1::0;;;7637:60;56893:3:0::2;-1:-1:-1::0;;;;;56893:9:0::2;::::0;::::2;::::0;7533:18:1;;56893:35:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;56946:4;56940:19;56952:6;56940:19;;;;3232:25:1::0;;3220:2;3205:18;;3187:76;56940:19:0::2;;;;;;;;56991:21;::::0;-1:-1:-1;;;56991:21:0;;::::2;::::0;::::2;3232:25:1::0;;;57015:2:0::2;::::0;56991:3:::2;-1:-1:-1::0;;;;;56991:15:0::2;::::0;::::2;::::0;3205:18:1;;56991:21:0::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:26;;;;:::i;:::-;56974:13;::::0;;;:7:::2;:13;::::0;;;;;:43:::2;;56966:71;;;::::0;-1:-1:-1;;;56966:71:0;;5708:2:1;56966:71:0::2;::::0;::::2;5690:21:1::0;5747:2;5727:18;;;5720:30;-1:-1:-1;;;5766:18:1;;;5759:45;5821:18;;56966:71:0::2;5680:165:1::0;56966:71:0::2;-1:-1:-1::0;;13142:1:0;14094:22;;56737:306::o;57801:69::-;13186:1;13782:7;;:19;;13774:63;;;;-1:-1:-1;;;13774:63:0;;;;;;;:::i;:::-;13186:1;13915:7;:18;57854:10:::1;57861:2:::0;57854:6:::1;:10::i;:::-;-1:-1:-1::0;13142:1:0;14094:22;;57801:69::o;57958:152::-;13186:1;13782:7;;:19;;13774:63;;;;-1:-1:-1;;;13774:63:0;;;;;;;:::i;:::-;13186:1;13915:7;:18;58033:8:::1;58028:77;58047:16:::0;;::::1;58028:77;;;58081:16;58088:3;;58092;58088:8;;;;;-1:-1:-1::0;;;58088:8:0::1;;;;;;;;;;;;;;;58081:6;:16::i;:::-;58065:5:::0;::::1;::::0;::::1;:::i;:::-;;;;58028:77;;;-1:-1:-1::0;;13142:1:0;14094:22;;-1:-1:-1;57958:152:0:o;27924:94::-;27319:7;27346:6;-1:-1:-1;;;;;27346:6:0;10519:10;27493:23;27485:68;;;;-1:-1:-1;;;27485:68:0;;;;;;;:::i;:::-;27989:21:::1;28007:1;27989:9;:21::i;:::-;27924:94::o:0;57128:575::-;57175:20;;:::i;:::-;57212:8;;57204:50;;;;-1:-1:-1;;;57204:50:0;;6773:2:1;57204:50:0;;;6755:21:1;6812:2;6792:18;;;6785:30;-1:-1:-1;;;6831:18:1;;;6824:45;6886:18;;57204:50:0;6745:165:1;57204:50:0;57261:72;;;;;;;;57293:1;57261:72;;;;;;;57300:1;57261:72;;;;;;;57303:1;57261:72;;;;57306:2;57261:72;;;;57310:2;57261:72;;;;57314:2;57261:72;;;;57318:3;57261:72;;;;57323:3;57261:72;;;;57328:4;57261:72;;;;:23;;57361:75;57386:1;57380:3;:7;57361:75;;;57418:10;57405:5;57411:3;57405:10;;;;;-1:-1:-1;;;57405:10:0;;;;;;;;;;;;:23;57389:5;;;;:::i;:::-;;;;57361:75;;;-1:-1:-1;57461:1:0;57442:256;57464:10;;57442:256;;57539:8;;57522:38;;;;;;;2054:19:1;;;;2089:12;;;2082:28;;;2126:12;;;;2119:28;;;57522:38:0;;;;;;;;;;2163:12:1;;;;57522:38:0;;;57512:49;;;;;57582:7;2082:28:1;57582:15:0;;;;;-1:-1:-1;;;57582:15:0;;;;;;;;;;;;;57575:22;;:4;:22;:::i;:::-;57571:90;;57632:19;57645:6;57632:10;:19;:::i;:::-;57615:5;57621:7;;;;:::i;:::-;;;57615:14;;;;;-1:-1:-1;;;57615:14:0;;;;;;;;;;;;:36;57571:90;57673:5;57682:1;57673:10;57669:21;;;57685:5;;;57669:21;-1:-1:-1;57476:8:0;;;;:::i;:::-;;;;57442:256;;;;57128:575;;;;;:::o;56385:260::-;27319:7;27346:6;-1:-1:-1;;;;;27346:6:0;10519:10;27493:23;27485:68;;;;-1:-1:-1;;;27485:68:0;;;;;;;:::i;:::-;56436:8:::1;::::0;:22;56428:50:::1;;;::::0;-1:-1:-1;;;56428:50:0;;5018:2:1;56428:50:0::1;::::0;::::1;5000:21:1::0;5057:2;5037:18;;;5030:30;-1:-1:-1;;;5076:18:1;;;5069:45;5131:18;;56428:50:0::1;4990:165:1::0;56428:50:0::1;56506:16;56521:1;56506:12;:16;:::i;:::-;56496:27;56485:8;:38:::0;56535:11:::1;56530:110;56561:2;56552:6;:11;56530:110;;;-1:-1:-1::0;;;;;56584:3:0::1;:17;;56602:19;56615:6:::0;56602:10:::1;:19;:::i;:::-;56623:8;::::0;56584:48:::1;::::0;-1:-1:-1;;;;;;56584:48:0::1;::::0;;;;;;::::1;::::0;::::1;7271:25:1::0;;;;7312:18;;;7305:34;7244:18;;56584:48:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;56565:8;;;;;:::i;:::-;;;;56530:110;;;;56385:260::o:0;28173:192::-;27319:7;27346:6;-1:-1:-1;;;;;27346:6:0;10519:10;27493:23;27485:68;;;;-1:-1:-1;;;27485:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;28262:22:0;::::1;28254:73;;;::::0;-1:-1:-1;;;28254:73:0;;4267:2:1;28254:73:0::1;::::0;::::1;4249:21:1::0;4306:2;4286:18;;;4279:30;4345:34;4325:18;;;4318:62;-1:-1:-1;;;4396:18:1;;;4389:36;4442:19;;28254:73:0::1;4239:228:1::0;28254:73:0::1;28338:19;28348:8;28338:9;:19::i;58116:342::-:0;58179:15;;-1:-1:-1;;;58179:15:0;;;;;3232:25:1;;;58179:3:0;-1:-1:-1;;;;;58179:11:0;;;;3205:18:1;;58179:15:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;58165:29:0;:10;-1:-1:-1;;;;;58165:29:0;;58157:55;;;;-1:-1:-1;;;58157:55:0;;3925:2:1;58157:55:0;;;3907:21:1;3964:2;3944:18;;;3937:30;-1:-1:-1;;;3983:18:1;;;3976:43;4036:18;;58157:55:0;3897:163:1;58157:55:0;58228:11;;;;:7;:11;;;;;;;;58227:12;58219:40;;;;-1:-1:-1;;;58219:40:0;;4674:2:1;58219:40:0;;;4656:21:1;4713:2;4693:18;;;4686:30;-1:-1:-1;;;4732:18:1;;;4725:45;4787:18;;58219:40:0;4646:165:1;58219:40:0;58266:11;;;;:7;:11;;;;;:18;;-1:-1:-1;;58266:18:0;58280:4;58266:18;;;58314:11;58274:2;58314:7;:11::i;:::-;58291:34;;58337:8;58332:88;58357:1;58351:3;:7;58332:88;;;58376:3;-1:-1:-1;;;;;58376:9:0;;58386:5;58392:3;58386:10;;;;;-1:-1:-1;;;58386:10:0;;;;;;;;;;;;;58376:36;;-1:-1:-1;;;;;;58376:36:0;;;;;;;;;;7560:25:1;;;;58398:1:0;7601:18:1;;;7594:34;58401:10:0;7644:18:1;;;7637:60;7533:18;;58376:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58360:5;;;;;:::i;:::-;;;;58332:88;;;-1:-1:-1;58431:21:0;;58441:10;;58437:2;;58431:21;;;;;58116:342;;:::o;28373:173::-;28429:16;28448:6;;-1:-1:-1;;;;;28465:17:0;;;-1:-1:-1;;;;;;28465:17:0;;;;;;28498:40;;28448:6;;;;;;;28498:40;;28429:16;28498:40;28373:173;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:257:1:-;;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;191:9;178:23;210:31;235:5;210:31;:::i;:::-;260:5;84:187;-1:-1:-1;;;84:187:1:o;276:261::-;;399:2;387:9;378:7;374:23;370:32;367:2;;;420:6;412;405:22;367:2;457:9;451:16;476:31;501:5;476:31;:::i;542:665::-;;;689:2;677:9;668:7;664:23;660:32;657:2;;;710:6;702;695:22;657:2;755:9;742:23;784:18;825:2;817:6;814:14;811:2;;;846:6;838;831:22;811:2;889:6;878:9;874:22;864:32;;934:7;927:4;923:2;919:13;915:27;905:2;;961:6;953;946:22;905:2;1006;993:16;1032:2;1024:6;1021:14;1018:2;;;1053:6;1045;1038:22;1018:2;1111:7;1106:2;1096:6;1093:1;1089:14;1085:2;1081:23;1077:32;1074:45;1071:2;;;1137:6;1129;1122:22;1071:2;1173;1165:11;;;;;1195:6;;-1:-1:-1;647:560:1;;-1:-1:-1;;;;647:560:1:o;1212:190::-;;1324:2;1312:9;1303:7;1299:23;1295:32;1292:2;;;1345:6;1337;1330:22;1292:2;-1:-1:-1;1373:23:1;;1282:120;-1:-1:-1;1282:120:1:o;1407:194::-;;1530:2;1518:9;1509:7;1505:23;1501:32;1498:2;;;1551:6;1543;1536:22;1498:2;-1:-1:-1;1579:16:1;;1488:113;-1:-1:-1;1488:113:1:o;1606:258::-;;;1735:2;1723:9;1714:7;1710:23;1706:32;1703:2;;;1756:6;1748;1741:22;1703:2;-1:-1:-1;;1784:23:1;;;1854:2;1839:18;;;1826:32;;-1:-1:-1;1693:171:1:o;2394:495::-;2574:3;2559:19;;2563:9;2655:6;2394:495;2689:194;2703:4;2700:1;2697:11;2689:194;;;2762:13;;2750:26;;2799:4;2823:12;;;;2858:15;;;;2723:1;2716:9;2689:194;;;2693:3;;;2541:348;;;;:::o;5850:356::-;6052:2;6034:21;;;6071:18;;;6064:30;6130:34;6125:2;6110:18;;6103:62;6197:2;6182:18;;6024:182::o;6211:355::-;6413:2;6395:21;;;6452:2;6432:18;;;6425:30;6491:33;6486:2;6471:18;;6464:61;6557:2;6542:18;;6385:181::o;8058:128::-;;8129:1;8125:6;8122:1;8119:13;8116:2;;;8135:18;;:::i;:::-;-1:-1:-1;8171:9:1;;8106:80::o;8191:120::-;;8257:1;8247:2;;8262:18;;:::i;:::-;-1:-1:-1;8296:9:1;;8237:74::o;8316:125::-;;8384:1;8381;8378:8;8375:2;;;8389:18;;:::i;:::-;-1:-1:-1;8426:9:1;;8365:76::o;8446:136::-;;8513:5;8503:2;;8522:18;;:::i;:::-;-1:-1:-1;;;8558:18:1;;8493:89::o;8587:135::-;;-1:-1:-1;;8647:17:1;;8644:2;;;8667:18;;:::i;:::-;-1:-1:-1;8714:1:1;8703:13;;8634:88::o;8727:112::-;;8785:1;8775:2;;8790:18;;:::i;:::-;-1:-1:-1;8824:9:1;;8765:74::o;8844:127::-;8905:10;8900:3;8896:20;8893:1;8886:31;8936:4;8933:1;8926:15;8960:4;8957:1;8950:15;8976:127;9037:10;9032:3;9028:20;9025:1;9018:31;9068:4;9065:1;9058:15;9092:4;9089:1;9082:15;9108:131;-1:-1:-1;;;;;9183:31:1;;9173:42;;9163:2;;9229:1;9226;9219:12
Swarm Source
ipfs://86bfc655487884b09915def6f1d98311048a6d714fad6b6236cad71a8695140e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.