ERC-1155
Overview
Max Total Supply
613 NFTM20241DE
Holders
481
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
NFTMagazin20241DE
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.25; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; // If you have a problem with this contract please contact us at [email protected] contract NFTMagazin20241DE is ERC1155, Ownable, ERC1155Burnable { uint256 private _nextTokenId = 1; uint256 public mintPrice = 10000000000000000; string public name = "NFT Magazin DE 01/2024"; string public symbol = "NFTM20241DE"; constructor(address initialOwner) ERC1155("https://metadata.mikehager.de/magazinissue6de/magazinissue6de.json") Ownable(initialOwner) {} function mintNFT(address _to, uint256 _quantity) payable external { require(_quantity > 0, "Mint at least 1 NFT."); require(msg.value == mintPrice*_quantity, "Invalid value."); for (uint256 i = 0; i < _quantity; i++) doMint(_to); } function doMint(address to) private { uint256 tokenId = _nextTokenId++; _mint(to, tokenId, 1, ""); } function setMintPrice(uint256 _mintPrice) public onlyOwner { mintPrice = _mintPrice; } function setUri(string memory newuri) public onlyOwner { _setURI(newuri); } function airDrop(address[] memory to) public onlyOwner { for (uint256 i = 0; i < to.length; i++) doMint(to[i]); } function getTotalMinted() public view returns (uint256) { return _nextTokenId - 1; } function withdraw() public onlyOwner { payable(msg.sender).transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.20; import {ERC1155} from "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. */ abstract contract ERC1155Burnable is ERC1155 { function burn(address account, uint256 id, uint256 value) public virtual { if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { revert ERC1155MissingApprovalForAll(_msgSender(), account); } _burn(account, id, value); } function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) { revert ERC1155MissingApprovalForAll(_msgSender(), account); } _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; import {IERC1155} from "./IERC1155.sol"; import {IERC1155Receiver} from "./IERC1155Receiver.sol"; import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol"; import {Context} from "../../utils/Context.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {Arrays} from "../../utils/Arrays.sol"; import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @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 */ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors { using Arrays for uint256[]; using Arrays for address[]; mapping(uint256 id => mapping(address account => uint256)) private _balances; mapping(address account => mapping(address operator => 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 /* id */) public view virtual returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. */ function balanceOf(address account, uint256 id) public view virtual returns (uint256) { 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 returns (uint256[] memory) { if (accounts.length != ids.length) { revert ERC1155InvalidArrayLength(ids.length, accounts.length); } uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeTransferFrom(from, to, id, value, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeBatchTransferFrom(from, to, ids, values, data); } /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` * (or `to`) is the zero address. * * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. * * Requirements: * * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. * - `ids` and `values` must have the same length. * * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. */ function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { if (ids.length != values.length) { revert ERC1155InvalidArrayLength(ids.length, values.length); } address operator = _msgSender(); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids.unsafeMemoryAccess(i); uint256 value = values.unsafeMemoryAccess(i); if (from != address(0)) { uint256 fromBalance = _balances[id][from]; if (fromBalance < value) { revert ERC1155InsufficientBalance(from, fromBalance, value, id); } unchecked { // Overflow not possible: value <= fromBalance _balances[id][from] = fromBalance - value; } } if (to != address(0)) { _balances[id][to] += value; } } if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); emit TransferSingle(operator, from, to, id, value); } else { emit TransferBatch(operator, from, to, ids, values); } } /** * @dev Version of {_update} that performs the token acceptance check by calling * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it * contains code (eg. is a smart contract at the moment of execution). * * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any * update to the contract state after this function would break the check-effect-interaction pattern. Consider * overriding {_update} instead. */ function _updateWithAcceptanceCheck( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { _update(from, to, ids, values); if (to != address(0)) { address operator = _msgSender(); if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data); } else { _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data); } } } /** * @dev Transfers a `value` 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 `value` 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 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, to, ids, values, 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. * - `ids` and `values` must have the same length. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, to, ids, values, 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 values 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 a `value` amount of tokens of type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `values` must have the same length. * - `to` cannot be the zero address. * - 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 values, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev Destroys a `value` amount of tokens of type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. */ function _burn(address from, uint256 id, uint256 value) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. * - `ids` and `values` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the zero address. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC1155InvalidOperator(address(0)); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address * if it contains code at the moment of execution. */ function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address * if it contains code at the moment of execution. */ function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Creates an array in memory with only one value for each of the elements provided. */ function _asSingletonArrays( uint256 element1, uint256 element2 ) private pure returns (uint256[] memory array1, uint256[] memory array2) { /// @solidity memory-safe-assembly assembly { // Load the free memory pointer array1 := mload(0x40) // Set array length to 1 mstore(array1, 1) // Store the single element at the next word after the length (where content starts) mstore(add(array1, 0x20), element1) // Repeat for next array locating it right after the first array array2 := add(array1, 0x40) mstore(array2, 1) mstore(add(array2, 0x20), element2) // Update the free memory pointer by pointing after the second array mstore(0x40, add(array2, 0x40)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; import {Math} from "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { uint256 low = 0; uint256 high = array.length; if (high == 0) { return 0; } while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds towards zero (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ 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. * * NOTE: 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. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of 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 value 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 a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `value` 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 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * * - `ids` and `values` 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 values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526001600455662386f26fc100006005556040518060400160405280601681526020017f4e4654204d6167617a696e2044452030312f323032340000000000000000000081525060069081610058919061048b565b506040518060400160405280600b81526020017f4e46544d323032343144450000000000000000000000000000000000000000008152506007908161009d919061048b565b503480156100a9575f80fd5b506040516135cf3803806135cf83398181016040528101906100cb91906105b8565b8060405180608001604052806042815260200161358d604291396100f48161017b60201b60201c565b505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610165575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161015c91906105f2565b60405180910390fd5b6101748161018e60201b60201c565b505061060b565b806002908161018a919061048b565b5050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806102cc57607f821691505b6020821081036102df576102de610288565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026103417fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610306565b61034b8683610306565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61038f61038a61038584610363565b61036c565b610363565b9050919050565b5f819050919050565b6103a883610375565b6103bc6103b482610396565b848454610312565b825550505050565b5f90565b6103d06103c4565b6103db81848461039f565b505050565b5b818110156103fe576103f35f826103c8565b6001810190506103e1565b5050565b601f82111561044357610414816102e5565b61041d846102f7565b8101602085101561042c578190505b610440610438856102f7565b8301826103e0565b50505b505050565b5f82821c905092915050565b5f6104635f1984600802610448565b1980831691505092915050565b5f61047b8383610454565b9150826002028217905092915050565b61049482610251565b67ffffffffffffffff8111156104ad576104ac61025b565b5b6104b782546102b5565b6104c2828285610402565b5f60209050601f8311600181146104f3575f84156104e1578287015190505b6104eb8582610470565b865550610552565b601f198416610501866102e5565b5f5b8281101561052857848901518255600182019150602085019450602081019050610503565b868310156105455784890151610541601f891682610454565b8355505b6001600288020188555050505b505050505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6105878261055e565b9050919050565b6105978161057d565b81146105a1575f80fd5b50565b5f815190506105b28161058e565b92915050565b5f602082840312156105cd576105cc61055a565b5b5f6105da848285016105a4565b91505092915050565b6105ec8161057d565b82525050565b5f6020820190506106055f8301846105e3565b92915050565b612f75806106185f395ff3fe608060405260043610610132575f3560e01c80636b20c454116100aa578063a22cb4651161006e578063a22cb465146103e0578063e985e9c514610408578063f242432a14610444578063f2fde38b1461046c578063f4a0a52814610494578063f5298aca146104bc57610132565b80636b20c45414610326578063715018a61461034e5780638da5cb5b1461036457806395d89b411461038e5780639b642de1146103b857610132565b80630e89341c116100fc5780630e89341c1461022a5780632eb2c2d6146102665780633c168eab1461028e5780633ccfd60b146102aa5780634e1273f4146102c05780636817c76c146102fc57610132565b8062b6849f14610136578062fdd58e1461015e57806301ffc9a71461019a57806306fdde03146101d65780630ca1c5c914610200575b5f80fd5b348015610141575f80fd5b5061015c60048036038101906101579190611f3a565b6104e4565b005b348015610169575f80fd5b50610184600480360381019061017f9190611fb4565b61052b565b6040516101919190612001565b60405180910390f35b3480156101a5575f80fd5b506101c060048036038101906101bb919061206f565b610580565b6040516101cd91906120b4565b60405180910390f35b3480156101e1575f80fd5b506101ea610661565b6040516101f7919061212d565b60405180910390f35b34801561020b575f80fd5b506102146106ed565b6040516102219190612001565b60405180910390f35b348015610235575f80fd5b50610250600480360381019061024b919061214d565b610702565b60405161025d919061212d565b60405180910390f35b348015610271575f80fd5b5061028c600480360381019061028791906122e8565b610794565b005b6102a860048036038101906102a39190611fb4565b61083b565b005b3480156102b5575f80fd5b506102be6108f1565b005b3480156102cb575f80fd5b506102e660048036038101906102e191906123b3565b61093f565b6040516102f391906124e0565b60405180910390f35b348015610307575f80fd5b50610310610a46565b60405161031d9190612001565b60405180910390f35b348015610331575f80fd5b5061034c60048036038101906103479190612500565b610a4c565b005b348015610359575f80fd5b50610362610af8565b005b34801561036f575f80fd5b50610378610b0b565b6040516103859190612597565b60405180910390f35b348015610399575f80fd5b506103a2610b33565b6040516103af919061212d565b60405180910390f35b3480156103c3575f80fd5b506103de60048036038101906103d9919061264e565b610bbf565b005b3480156103eb575f80fd5b50610406600480360381019061040191906126bf565b610bd3565b005b348015610413575f80fd5b5061042e600480360381019061042991906126fd565b610be9565b60405161043b91906120b4565b60405180910390f35b34801561044f575f80fd5b5061046a6004803603810190610465919061273b565b610c77565b005b348015610477575f80fd5b50610492600480360381019061048d91906127ce565b610d1e565b005b34801561049f575f80fd5b506104ba60048036038101906104b5919061214d565b610da2565b005b3480156104c7575f80fd5b506104e260048036038101906104dd91906127f9565b610db4565b005b6104ec610e60565b5f5b81518110156105275761051a82828151811061050d5761050c612849565b5b6020026020010151610ee7565b80806001019150506104ee565b5050565b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061064a57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061065a575061065982610f1f565b5b9050919050565b6006805461066e906128a3565b80601f016020809104026020016040519081016040528092919081815260200182805461069a906128a3565b80156106e55780601f106106bc576101008083540402835291602001916106e5565b820191905f5260205f20905b8154815290600101906020018083116106c857829003601f168201915b505050505081565b5f60016004546106fd9190612900565b905090565b606060028054610711906128a3565b80601f016020809104026020016040519081016040528092919081815260200182805461073d906128a3565b80156107885780601f1061075f57610100808354040283529160200191610788565b820191905f5260205f20905b81548152906001019060200180831161076b57829003601f168201915b50505050509050919050565b5f61079d610f88565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156107e257506107e08682610be9565b155b156108265780866040517fe237d92200000000000000000000000000000000000000000000000000000000815260040161081d929190612933565b60405180910390fd5b6108338686868686610f8f565b505050505050565b5f811161087d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610874906129a4565b60405180910390fd5b8060055461088b91906129c2565b34146108cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c390612a4d565b60405180910390fd5b5f5b818110156108ec576108df83610ee7565b80806001019150506108ce565b505050565b6108f9610e60565b3373ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f1935050505015801561093c573d5f803e3d5ffd5b50565b6060815183511461098b57815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610982929190612a6b565b60405180910390fd5b5f835167ffffffffffffffff8111156109a7576109a6611da4565b5b6040519080825280602002602001820160405280156109d55781602001602082028036833780820191505090505b5090505f5b8451811015610a3b57610a116109f9828761108390919063ffffffff16565b610a0c838761109690919063ffffffff16565b61052b565b828281518110610a2457610a23612849565b5b6020026020010181815250508060010190506109da565b508091505092915050565b60055481565b610a54610f88565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610a9d5750610a9b83610a96610f88565b610be9565b155b15610ae857610aaa610f88565b836040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610adf929190612933565b60405180910390fd5b610af38383836110a9565b505050565b610b00610e60565b610b095f611139565b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60078054610b40906128a3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6c906128a3565b8015610bb75780601f10610b8e57610100808354040283529160200191610bb7565b820191905f5260205f20905b815481529060010190602001808311610b9a57829003601f168201915b505050505081565b610bc7610e60565b610bd0816111fc565b50565b610be5610bde610f88565b838361120f565b5050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610c80610f88565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610cc55750610cc38682610be9565b155b15610d095780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610d00929190612933565b60405180910390fd5b610d168686868686611378565b505050505050565b610d26610e60565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d96575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610d8d9190612597565b60405180910390fd5b610d9f81611139565b50565b610daa610e60565b8060058190555050565b610dbc610f88565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610e055750610e0383610dfe610f88565b610be9565b155b15610e5057610e12610f88565b836040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610e47929190612933565b60405180910390fd5b610e5b83838361147e565b505050565b610e68610f88565b73ffffffffffffffffffffffffffffffffffffffff16610e86610b0b565b73ffffffffffffffffffffffffffffffffffffffff1614610ee557610ea9610f88565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610edc9190612597565b60405180910390fd5b565b5f60045f815480929190610efa90612a92565b919050559050610f1b8282600160405180602001604052805f815250611520565b5050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fff575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610ff69190612597565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361106f575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016110669190612597565b60405180910390fd5b61107c85858585856115b5565b5050505050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611119575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016111109190612597565b60405180910390fd5b611134835f848460405180602001604052805f8152506115b5565b505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b806002908161120b9190612c76565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361127f575f6040517fced3e1000000000000000000000000000000000000000000000000000000000081526004016112769190612597565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161136b91906120b4565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036113e8575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016113df9190612597565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611458575f6040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161144f9190612597565b60405180910390fd5b5f806114648585611661565b9150915061147587878484876115b5565b50505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036114ee575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016114e59190612597565b60405180910390fd5b5f806114fa8484611661565b91509150611519855f848460405180602001604052805f8152506115b5565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611590575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016115879190612597565b60405180910390fd5b5f8061159c8585611661565b915091506115ad5f878484876115b5565b505050505050565b6115c185858585611691565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461165a575f6115fd610f88565b90506001845103611649575f61161c5f8661109690919063ffffffff16565b90505f6116325f8661109690919063ffffffff16565b9050611642838989858589611a21565b5050611658565b611657818787878787611bd0565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b80518251146116db57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016116d2929190612a6b565b60405180910390fd5b5f6116e4610f88565b90505f5b83518110156118e0575f611705828661109690919063ffffffff16565b90505f61171b838661109690919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461183e575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156117ea57888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016117e19493929190612d45565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146118d357805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546118cb9190612d88565b925050819055505b50508060010190506116e8565b50600183510361199b575f6118fe5f8561109690919063ffffffff16565b90505f6119145f8561109690919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62858560405161198c929190612a6b565b60405180910390a45050611a1a565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611a11929190612dbb565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611bc8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611a81959493929190612e42565b6020604051808303815f875af1925050508015611abc57506040513d601f19601f82011682018060405250810190611ab99190612eae565b60015b611b3d573d805f8114611aea576040519150601f19603f3d011682016040523d82523d5f602084013e611aef565b606091505b505f815103611b3557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611b2c9190612597565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611bc657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611bbd9190612597565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611d77578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611c30959493929190612ed9565b6020604051808303815f875af1925050508015611c6b57506040513d601f19601f82011682018060405250810190611c689190612eae565b60015b611cec573d805f8114611c99576040519150601f19603f3d011682016040523d82523d5f602084013e611c9e565b606091505b505f815103611ce457846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611cdb9190612597565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611d7557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611d6c9190612597565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611dda82611d94565b810181811067ffffffffffffffff82111715611df957611df8611da4565b5b80604052505050565b5f611e0b611d7f565b9050611e178282611dd1565b919050565b5f67ffffffffffffffff821115611e3657611e35611da4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611e7482611e4b565b9050919050565b611e8481611e6a565b8114611e8e575f80fd5b50565b5f81359050611e9f81611e7b565b92915050565b5f611eb7611eb284611e1c565b611e02565b90508083825260208201905060208402830185811115611eda57611ed9611e47565b5b835b81811015611f035780611eef8882611e91565b845260208401935050602081019050611edc565b5050509392505050565b5f82601f830112611f2157611f20611d90565b5b8135611f31848260208601611ea5565b91505092915050565b5f60208284031215611f4f57611f4e611d88565b5b5f82013567ffffffffffffffff811115611f6c57611f6b611d8c565b5b611f7884828501611f0d565b91505092915050565b5f819050919050565b611f9381611f81565b8114611f9d575f80fd5b50565b5f81359050611fae81611f8a565b92915050565b5f8060408385031215611fca57611fc9611d88565b5b5f611fd785828601611e91565b9250506020611fe885828601611fa0565b9150509250929050565b611ffb81611f81565b82525050565b5f6020820190506120145f830184611ff2565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61204e8161201a565b8114612058575f80fd5b50565b5f8135905061206981612045565b92915050565b5f6020828403121561208457612083611d88565b5b5f6120918482850161205b565b91505092915050565b5f8115159050919050565b6120ae8161209a565b82525050565b5f6020820190506120c75f8301846120a5565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6120ff826120cd565b61210981856120d7565b93506121198185602086016120e7565b61212281611d94565b840191505092915050565b5f6020820190508181035f83015261214581846120f5565b905092915050565b5f6020828403121561216257612161611d88565b5b5f61216f84828501611fa0565b91505092915050565b5f67ffffffffffffffff82111561219257612191611da4565b5b602082029050602081019050919050565b5f6121b56121b084612178565b611e02565b905080838252602082019050602084028301858111156121d8576121d7611e47565b5b835b8181101561220157806121ed8882611fa0565b8452602084019350506020810190506121da565b5050509392505050565b5f82601f83011261221f5761221e611d90565b5b813561222f8482602086016121a3565b91505092915050565b5f80fd5b5f67ffffffffffffffff82111561225657612255611da4565b5b61225f82611d94565b9050602081019050919050565b828183375f83830152505050565b5f61228c6122878461223c565b611e02565b9050828152602081018484840111156122a8576122a7612238565b5b6122b384828561226c565b509392505050565b5f82601f8301126122cf576122ce611d90565b5b81356122df84826020860161227a565b91505092915050565b5f805f805f60a0868803121561230157612300611d88565b5b5f61230e88828901611e91565b955050602061231f88828901611e91565b945050604086013567ffffffffffffffff8111156123405761233f611d8c565b5b61234c8882890161220b565b935050606086013567ffffffffffffffff81111561236d5761236c611d8c565b5b6123798882890161220b565b925050608086013567ffffffffffffffff81111561239a57612399611d8c565b5b6123a6888289016122bb565b9150509295509295909350565b5f80604083850312156123c9576123c8611d88565b5b5f83013567ffffffffffffffff8111156123e6576123e5611d8c565b5b6123f285828601611f0d565b925050602083013567ffffffffffffffff81111561241357612412611d8c565b5b61241f8582860161220b565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61245b81611f81565b82525050565b5f61246c8383612452565b60208301905092915050565b5f602082019050919050565b5f61248e82612429565b6124988185612433565b93506124a383612443565b805f5b838110156124d35781516124ba8882612461565b97506124c583612478565b9250506001810190506124a6565b5085935050505092915050565b5f6020820190508181035f8301526124f88184612484565b905092915050565b5f805f6060848603121561251757612516611d88565b5b5f61252486828701611e91565b935050602084013567ffffffffffffffff81111561254557612544611d8c565b5b6125518682870161220b565b925050604084013567ffffffffffffffff81111561257257612571611d8c565b5b61257e8682870161220b565b9150509250925092565b61259181611e6a565b82525050565b5f6020820190506125aa5f830184612588565b92915050565b5f67ffffffffffffffff8211156125ca576125c9611da4565b5b6125d382611d94565b9050602081019050919050565b5f6125f26125ed846125b0565b611e02565b90508281526020810184848401111561260e5761260d612238565b5b61261984828561226c565b509392505050565b5f82601f83011261263557612634611d90565b5b81356126458482602086016125e0565b91505092915050565b5f6020828403121561266357612662611d88565b5b5f82013567ffffffffffffffff8111156126805761267f611d8c565b5b61268c84828501612621565b91505092915050565b61269e8161209a565b81146126a8575f80fd5b50565b5f813590506126b981612695565b92915050565b5f80604083850312156126d5576126d4611d88565b5b5f6126e285828601611e91565b92505060206126f3858286016126ab565b9150509250929050565b5f806040838503121561271357612712611d88565b5b5f61272085828601611e91565b925050602061273185828601611e91565b9150509250929050565b5f805f805f60a0868803121561275457612753611d88565b5b5f61276188828901611e91565b955050602061277288828901611e91565b945050604061278388828901611fa0565b935050606061279488828901611fa0565b925050608086013567ffffffffffffffff8111156127b5576127b4611d8c565b5b6127c1888289016122bb565b9150509295509295909350565b5f602082840312156127e3576127e2611d88565b5b5f6127f084828501611e91565b91505092915050565b5f805f606084860312156128105761280f611d88565b5b5f61281d86828701611e91565b935050602061282e86828701611fa0565b925050604061283f86828701611fa0565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806128ba57607f821691505b6020821081036128cd576128cc612876565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61290a82611f81565b915061291583611f81565b925082820390508181111561292d5761292c6128d3565b5b92915050565b5f6040820190506129465f830185612588565b6129536020830184612588565b9392505050565b7f4d696e74206174206c656173742031204e46542e0000000000000000000000005f82015250565b5f61298e6014836120d7565b91506129998261295a565b602082019050919050565b5f6020820190508181035f8301526129bb81612982565b9050919050565b5f6129cc82611f81565b91506129d783611f81565b92508282026129e581611f81565b915082820484148315176129fc576129fb6128d3565b5b5092915050565b7f496e76616c69642076616c75652e0000000000000000000000000000000000005f82015250565b5f612a37600e836120d7565b9150612a4282612a03565b602082019050919050565b5f6020820190508181035f830152612a6481612a2b565b9050919050565b5f604082019050612a7e5f830185611ff2565b612a8b6020830184611ff2565b9392505050565b5f612a9c82611f81565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ace57612acd6128d3565b5b600182019050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612b357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612afa565b612b3f8683612afa565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612b7a612b75612b7084611f81565b612b57565b611f81565b9050919050565b5f819050919050565b612b9383612b60565b612ba7612b9f82612b81565b848454612b06565b825550505050565b5f90565b612bbb612baf565b612bc6818484612b8a565b505050565b5b81811015612be957612bde5f82612bb3565b600181019050612bcc565b5050565b601f821115612c2e57612bff81612ad9565b612c0884612aeb565b81016020851015612c17578190505b612c2b612c2385612aeb565b830182612bcb565b50505b505050565b5f82821c905092915050565b5f612c4e5f1984600802612c33565b1980831691505092915050565b5f612c668383612c3f565b9150826002028217905092915050565b612c7f826120cd565b67ffffffffffffffff811115612c9857612c97611da4565b5b612ca282546128a3565b612cad828285612bed565b5f60209050601f831160018114612cde575f8415612ccc578287015190505b612cd68582612c5b565b865550612d3d565b601f198416612cec86612ad9565b5f5b82811015612d1357848901518255600182019150602085019450602081019050612cee565b86831015612d305784890151612d2c601f891682612c3f565b8355505b6001600288020188555050505b505050505050565b5f608082019050612d585f830187612588565b612d656020830186611ff2565b612d726040830185611ff2565b612d7f6060830184611ff2565b95945050505050565b5f612d9282611f81565b9150612d9d83611f81565b9250828201905080821115612db557612db46128d3565b5b92915050565b5f6040820190508181035f830152612dd38185612484565b90508181036020830152612de78184612484565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f612e1482612df0565b612e1e8185612dfa565b9350612e2e8185602086016120e7565b612e3781611d94565b840191505092915050565b5f60a082019050612e555f830188612588565b612e626020830187612588565b612e6f6040830186611ff2565b612e7c6060830185611ff2565b8181036080830152612e8e8184612e0a565b90509695505050505050565b5f81519050612ea881612045565b92915050565b5f60208284031215612ec357612ec2611d88565b5b5f612ed084828501612e9a565b91505092915050565b5f60a082019050612eec5f830188612588565b612ef96020830187612588565b8181036040830152612f0b8186612484565b90508181036060830152612f1f8185612484565b90508181036080830152612f338184612e0a565b9050969550505050505056fea26469706673582212207bd98e9f7b312bc8dd89a03e59afab179c460e9f46cb4f7302c5796429c2936a64736f6c6343000819003368747470733a2f2f6d657461646174612e6d696b6568616765722e64652f6d6167617a696e69737375653664652f6d6167617a696e69737375653664652e6a736f6e0000000000000000000000002b195ff2dfcccbc7962a871cde6e45c078b1d7cf
Deployed Bytecode
0x608060405260043610610132575f3560e01c80636b20c454116100aa578063a22cb4651161006e578063a22cb465146103e0578063e985e9c514610408578063f242432a14610444578063f2fde38b1461046c578063f4a0a52814610494578063f5298aca146104bc57610132565b80636b20c45414610326578063715018a61461034e5780638da5cb5b1461036457806395d89b411461038e5780639b642de1146103b857610132565b80630e89341c116100fc5780630e89341c1461022a5780632eb2c2d6146102665780633c168eab1461028e5780633ccfd60b146102aa5780634e1273f4146102c05780636817c76c146102fc57610132565b8062b6849f14610136578062fdd58e1461015e57806301ffc9a71461019a57806306fdde03146101d65780630ca1c5c914610200575b5f80fd5b348015610141575f80fd5b5061015c60048036038101906101579190611f3a565b6104e4565b005b348015610169575f80fd5b50610184600480360381019061017f9190611fb4565b61052b565b6040516101919190612001565b60405180910390f35b3480156101a5575f80fd5b506101c060048036038101906101bb919061206f565b610580565b6040516101cd91906120b4565b60405180910390f35b3480156101e1575f80fd5b506101ea610661565b6040516101f7919061212d565b60405180910390f35b34801561020b575f80fd5b506102146106ed565b6040516102219190612001565b60405180910390f35b348015610235575f80fd5b50610250600480360381019061024b919061214d565b610702565b60405161025d919061212d565b60405180910390f35b348015610271575f80fd5b5061028c600480360381019061028791906122e8565b610794565b005b6102a860048036038101906102a39190611fb4565b61083b565b005b3480156102b5575f80fd5b506102be6108f1565b005b3480156102cb575f80fd5b506102e660048036038101906102e191906123b3565b61093f565b6040516102f391906124e0565b60405180910390f35b348015610307575f80fd5b50610310610a46565b60405161031d9190612001565b60405180910390f35b348015610331575f80fd5b5061034c60048036038101906103479190612500565b610a4c565b005b348015610359575f80fd5b50610362610af8565b005b34801561036f575f80fd5b50610378610b0b565b6040516103859190612597565b60405180910390f35b348015610399575f80fd5b506103a2610b33565b6040516103af919061212d565b60405180910390f35b3480156103c3575f80fd5b506103de60048036038101906103d9919061264e565b610bbf565b005b3480156103eb575f80fd5b50610406600480360381019061040191906126bf565b610bd3565b005b348015610413575f80fd5b5061042e600480360381019061042991906126fd565b610be9565b60405161043b91906120b4565b60405180910390f35b34801561044f575f80fd5b5061046a6004803603810190610465919061273b565b610c77565b005b348015610477575f80fd5b50610492600480360381019061048d91906127ce565b610d1e565b005b34801561049f575f80fd5b506104ba60048036038101906104b5919061214d565b610da2565b005b3480156104c7575f80fd5b506104e260048036038101906104dd91906127f9565b610db4565b005b6104ec610e60565b5f5b81518110156105275761051a82828151811061050d5761050c612849565b5b6020026020010151610ee7565b80806001019150506104ee565b5050565b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061064a57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061065a575061065982610f1f565b5b9050919050565b6006805461066e906128a3565b80601f016020809104026020016040519081016040528092919081815260200182805461069a906128a3565b80156106e55780601f106106bc576101008083540402835291602001916106e5565b820191905f5260205f20905b8154815290600101906020018083116106c857829003601f168201915b505050505081565b5f60016004546106fd9190612900565b905090565b606060028054610711906128a3565b80601f016020809104026020016040519081016040528092919081815260200182805461073d906128a3565b80156107885780601f1061075f57610100808354040283529160200191610788565b820191905f5260205f20905b81548152906001019060200180831161076b57829003601f168201915b50505050509050919050565b5f61079d610f88565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156107e257506107e08682610be9565b155b156108265780866040517fe237d92200000000000000000000000000000000000000000000000000000000815260040161081d929190612933565b60405180910390fd5b6108338686868686610f8f565b505050505050565b5f811161087d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610874906129a4565b60405180910390fd5b8060055461088b91906129c2565b34146108cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c390612a4d565b60405180910390fd5b5f5b818110156108ec576108df83610ee7565b80806001019150506108ce565b505050565b6108f9610e60565b3373ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f1935050505015801561093c573d5f803e3d5ffd5b50565b6060815183511461098b57815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610982929190612a6b565b60405180910390fd5b5f835167ffffffffffffffff8111156109a7576109a6611da4565b5b6040519080825280602002602001820160405280156109d55781602001602082028036833780820191505090505b5090505f5b8451811015610a3b57610a116109f9828761108390919063ffffffff16565b610a0c838761109690919063ffffffff16565b61052b565b828281518110610a2457610a23612849565b5b6020026020010181815250508060010190506109da565b508091505092915050565b60055481565b610a54610f88565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610a9d5750610a9b83610a96610f88565b610be9565b155b15610ae857610aaa610f88565b836040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610adf929190612933565b60405180910390fd5b610af38383836110a9565b505050565b610b00610e60565b610b095f611139565b565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60078054610b40906128a3565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6c906128a3565b8015610bb75780601f10610b8e57610100808354040283529160200191610bb7565b820191905f5260205f20905b815481529060010190602001808311610b9a57829003601f168201915b505050505081565b610bc7610e60565b610bd0816111fc565b50565b610be5610bde610f88565b838361120f565b5050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610c80610f88565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610cc55750610cc38682610be9565b155b15610d095780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610d00929190612933565b60405180910390fd5b610d168686868686611378565b505050505050565b610d26610e60565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d96575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610d8d9190612597565b60405180910390fd5b610d9f81611139565b50565b610daa610e60565b8060058190555050565b610dbc610f88565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610e055750610e0383610dfe610f88565b610be9565b155b15610e5057610e12610f88565b836040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610e47929190612933565b60405180910390fd5b610e5b83838361147e565b505050565b610e68610f88565b73ffffffffffffffffffffffffffffffffffffffff16610e86610b0b565b73ffffffffffffffffffffffffffffffffffffffff1614610ee557610ea9610f88565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610edc9190612597565b60405180910390fd5b565b5f60045f815480929190610efa90612a92565b919050559050610f1b8282600160405180602001604052805f815250611520565b5050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fff575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610ff69190612597565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361106f575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016110669190612597565b60405180910390fd5b61107c85858585856115b5565b5050505050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611119575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016111109190612597565b60405180910390fd5b611134835f848460405180602001604052805f8152506115b5565b505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b806002908161120b9190612c76565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361127f575f6040517fced3e1000000000000000000000000000000000000000000000000000000000081526004016112769190612597565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161136b91906120b4565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036113e8575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016113df9190612597565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611458575f6040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161144f9190612597565b60405180910390fd5b5f806114648585611661565b9150915061147587878484876115b5565b50505050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036114ee575f6040517f01a835140000000000000000000000000000000000000000000000000000000081526004016114e59190612597565b60405180910390fd5b5f806114fa8484611661565b91509150611519855f848460405180602001604052805f8152506115b5565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611590575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016115879190612597565b60405180910390fd5b5f8061159c8585611661565b915091506115ad5f878484876115b5565b505050505050565b6115c185858585611691565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461165a575f6115fd610f88565b90506001845103611649575f61161c5f8661109690919063ffffffff16565b90505f6116325f8661109690919063ffffffff16565b9050611642838989858589611a21565b5050611658565b611657818787878787611bd0565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b80518251146116db57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016116d2929190612a6b565b60405180910390fd5b5f6116e4610f88565b90505f5b83518110156118e0575f611705828661109690919063ffffffff16565b90505f61171b838661109690919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461183e575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156117ea57888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016117e19493929190612d45565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146118d357805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546118cb9190612d88565b925050819055505b50508060010190506116e8565b50600183510361199b575f6118fe5f8561109690919063ffffffff16565b90505f6119145f8561109690919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62858560405161198c929190612a6b565b60405180910390a45050611a1a565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611a11929190612dbb565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611bc8578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611a81959493929190612e42565b6020604051808303815f875af1925050508015611abc57506040513d601f19601f82011682018060405250810190611ab99190612eae565b60015b611b3d573d805f8114611aea576040519150601f19603f3d011682016040523d82523d5f602084013e611aef565b606091505b505f815103611b3557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611b2c9190612597565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611bc657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611bbd9190612597565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611d77578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611c30959493929190612ed9565b6020604051808303815f875af1925050508015611c6b57506040513d601f19601f82011682018060405250810190611c689190612eae565b60015b611cec573d805f8114611c99576040519150601f19603f3d011682016040523d82523d5f602084013e611c9e565b606091505b505f815103611ce457846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611cdb9190612597565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611d7557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611d6c9190612597565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611dda82611d94565b810181811067ffffffffffffffff82111715611df957611df8611da4565b5b80604052505050565b5f611e0b611d7f565b9050611e178282611dd1565b919050565b5f67ffffffffffffffff821115611e3657611e35611da4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611e7482611e4b565b9050919050565b611e8481611e6a565b8114611e8e575f80fd5b50565b5f81359050611e9f81611e7b565b92915050565b5f611eb7611eb284611e1c565b611e02565b90508083825260208201905060208402830185811115611eda57611ed9611e47565b5b835b81811015611f035780611eef8882611e91565b845260208401935050602081019050611edc565b5050509392505050565b5f82601f830112611f2157611f20611d90565b5b8135611f31848260208601611ea5565b91505092915050565b5f60208284031215611f4f57611f4e611d88565b5b5f82013567ffffffffffffffff811115611f6c57611f6b611d8c565b5b611f7884828501611f0d565b91505092915050565b5f819050919050565b611f9381611f81565b8114611f9d575f80fd5b50565b5f81359050611fae81611f8a565b92915050565b5f8060408385031215611fca57611fc9611d88565b5b5f611fd785828601611e91565b9250506020611fe885828601611fa0565b9150509250929050565b611ffb81611f81565b82525050565b5f6020820190506120145f830184611ff2565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61204e8161201a565b8114612058575f80fd5b50565b5f8135905061206981612045565b92915050565b5f6020828403121561208457612083611d88565b5b5f6120918482850161205b565b91505092915050565b5f8115159050919050565b6120ae8161209a565b82525050565b5f6020820190506120c75f8301846120a5565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f6120ff826120cd565b61210981856120d7565b93506121198185602086016120e7565b61212281611d94565b840191505092915050565b5f6020820190508181035f83015261214581846120f5565b905092915050565b5f6020828403121561216257612161611d88565b5b5f61216f84828501611fa0565b91505092915050565b5f67ffffffffffffffff82111561219257612191611da4565b5b602082029050602081019050919050565b5f6121b56121b084612178565b611e02565b905080838252602082019050602084028301858111156121d8576121d7611e47565b5b835b8181101561220157806121ed8882611fa0565b8452602084019350506020810190506121da565b5050509392505050565b5f82601f83011261221f5761221e611d90565b5b813561222f8482602086016121a3565b91505092915050565b5f80fd5b5f67ffffffffffffffff82111561225657612255611da4565b5b61225f82611d94565b9050602081019050919050565b828183375f83830152505050565b5f61228c6122878461223c565b611e02565b9050828152602081018484840111156122a8576122a7612238565b5b6122b384828561226c565b509392505050565b5f82601f8301126122cf576122ce611d90565b5b81356122df84826020860161227a565b91505092915050565b5f805f805f60a0868803121561230157612300611d88565b5b5f61230e88828901611e91565b955050602061231f88828901611e91565b945050604086013567ffffffffffffffff8111156123405761233f611d8c565b5b61234c8882890161220b565b935050606086013567ffffffffffffffff81111561236d5761236c611d8c565b5b6123798882890161220b565b925050608086013567ffffffffffffffff81111561239a57612399611d8c565b5b6123a6888289016122bb565b9150509295509295909350565b5f80604083850312156123c9576123c8611d88565b5b5f83013567ffffffffffffffff8111156123e6576123e5611d8c565b5b6123f285828601611f0d565b925050602083013567ffffffffffffffff81111561241357612412611d8c565b5b61241f8582860161220b565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61245b81611f81565b82525050565b5f61246c8383612452565b60208301905092915050565b5f602082019050919050565b5f61248e82612429565b6124988185612433565b93506124a383612443565b805f5b838110156124d35781516124ba8882612461565b97506124c583612478565b9250506001810190506124a6565b5085935050505092915050565b5f6020820190508181035f8301526124f88184612484565b905092915050565b5f805f6060848603121561251757612516611d88565b5b5f61252486828701611e91565b935050602084013567ffffffffffffffff81111561254557612544611d8c565b5b6125518682870161220b565b925050604084013567ffffffffffffffff81111561257257612571611d8c565b5b61257e8682870161220b565b9150509250925092565b61259181611e6a565b82525050565b5f6020820190506125aa5f830184612588565b92915050565b5f67ffffffffffffffff8211156125ca576125c9611da4565b5b6125d382611d94565b9050602081019050919050565b5f6125f26125ed846125b0565b611e02565b90508281526020810184848401111561260e5761260d612238565b5b61261984828561226c565b509392505050565b5f82601f83011261263557612634611d90565b5b81356126458482602086016125e0565b91505092915050565b5f6020828403121561266357612662611d88565b5b5f82013567ffffffffffffffff8111156126805761267f611d8c565b5b61268c84828501612621565b91505092915050565b61269e8161209a565b81146126a8575f80fd5b50565b5f813590506126b981612695565b92915050565b5f80604083850312156126d5576126d4611d88565b5b5f6126e285828601611e91565b92505060206126f3858286016126ab565b9150509250929050565b5f806040838503121561271357612712611d88565b5b5f61272085828601611e91565b925050602061273185828601611e91565b9150509250929050565b5f805f805f60a0868803121561275457612753611d88565b5b5f61276188828901611e91565b955050602061277288828901611e91565b945050604061278388828901611fa0565b935050606061279488828901611fa0565b925050608086013567ffffffffffffffff8111156127b5576127b4611d8c565b5b6127c1888289016122bb565b9150509295509295909350565b5f602082840312156127e3576127e2611d88565b5b5f6127f084828501611e91565b91505092915050565b5f805f606084860312156128105761280f611d88565b5b5f61281d86828701611e91565b935050602061282e86828701611fa0565b925050604061283f86828701611fa0565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806128ba57607f821691505b6020821081036128cd576128cc612876565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61290a82611f81565b915061291583611f81565b925082820390508181111561292d5761292c6128d3565b5b92915050565b5f6040820190506129465f830185612588565b6129536020830184612588565b9392505050565b7f4d696e74206174206c656173742031204e46542e0000000000000000000000005f82015250565b5f61298e6014836120d7565b91506129998261295a565b602082019050919050565b5f6020820190508181035f8301526129bb81612982565b9050919050565b5f6129cc82611f81565b91506129d783611f81565b92508282026129e581611f81565b915082820484148315176129fc576129fb6128d3565b5b5092915050565b7f496e76616c69642076616c75652e0000000000000000000000000000000000005f82015250565b5f612a37600e836120d7565b9150612a4282612a03565b602082019050919050565b5f6020820190508181035f830152612a6481612a2b565b9050919050565b5f604082019050612a7e5f830185611ff2565b612a8b6020830184611ff2565b9392505050565b5f612a9c82611f81565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612ace57612acd6128d3565b5b600182019050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302612b357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612afa565b612b3f8683612afa565b95508019841693508086168417925050509392505050565b5f819050919050565b5f612b7a612b75612b7084611f81565b612b57565b611f81565b9050919050565b5f819050919050565b612b9383612b60565b612ba7612b9f82612b81565b848454612b06565b825550505050565b5f90565b612bbb612baf565b612bc6818484612b8a565b505050565b5b81811015612be957612bde5f82612bb3565b600181019050612bcc565b5050565b601f821115612c2e57612bff81612ad9565b612c0884612aeb565b81016020851015612c17578190505b612c2b612c2385612aeb565b830182612bcb565b50505b505050565b5f82821c905092915050565b5f612c4e5f1984600802612c33565b1980831691505092915050565b5f612c668383612c3f565b9150826002028217905092915050565b612c7f826120cd565b67ffffffffffffffff811115612c9857612c97611da4565b5b612ca282546128a3565b612cad828285612bed565b5f60209050601f831160018114612cde575f8415612ccc578287015190505b612cd68582612c5b565b865550612d3d565b601f198416612cec86612ad9565b5f5b82811015612d1357848901518255600182019150602085019450602081019050612cee565b86831015612d305784890151612d2c601f891682612c3f565b8355505b6001600288020188555050505b505050505050565b5f608082019050612d585f830187612588565b612d656020830186611ff2565b612d726040830185611ff2565b612d7f6060830184611ff2565b95945050505050565b5f612d9282611f81565b9150612d9d83611f81565b9250828201905080821115612db557612db46128d3565b5b92915050565b5f6040820190508181035f830152612dd38185612484565b90508181036020830152612de78184612484565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f612e1482612df0565b612e1e8185612dfa565b9350612e2e8185602086016120e7565b612e3781611d94565b840191505092915050565b5f60a082019050612e555f830188612588565b612e626020830187612588565b612e6f6040830186611ff2565b612e7c6060830185611ff2565b8181036080830152612e8e8184612e0a565b90509695505050505050565b5f81519050612ea881612045565b92915050565b5f60208284031215612ec357612ec2611d88565b5b5f612ed084828501612e9a565b91505092915050565b5f60a082019050612eec5f830188612588565b612ef96020830187612588565b8181036040830152612f0b8186612484565b90508181036060830152612f1f8185612484565b90508181036080830152612f338184612e0a565b9050969550505050505056fea26469706673582212207bd98e9f7b312bc8dd89a03e59afab179c460e9f46cb4f7302c5796429c2936a64736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002b195ff2dfcccbc7962a871cde6e45c078b1d7cf
-----Decoded View---------------
Arg [0] : initialOwner (address): 0x2b195ff2DFcCcBc7962a871Cde6e45c078b1D7Cf
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002b195ff2dfcccbc7962a871cde6e45c078b1d7cf
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.