Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
5,000 INVSBLE3D
Holders
3,088
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 INVSBLE3DLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
InvisibleFriends3D
Compiler Version
v0.8.17+commit.8df45f5f
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.17; /* .............. ascii art by community member ..::.... ....::.. rqueue#4071 ..::.. ::.. ::.. ..--.. ::.. ....::..............::::.. :: ..::::.. ..::.. .... ::::.. :::: .. ..::.. ..:: :: ..::.. .... .... ..:::: :: :: .. .. :: .... :: ....::::::::::.. :: --::...... ..::==--::::.... ..::.. .... :::: .. ..--.. ==@@++ :: .. :: ..------ ++.. .. .. :: ..::--------:: ::.. ::------.. ::::==++--.. .... ::---------------- ..**%%##****##== --######++**##== .. ::----------------.. ..####++.. --**++ ::####++:: --##== .... ..----------------.. **##** --##--::**##++.. --##:: .. ..--------------++==----------**####-- ..**++..::##++----::::::::**** .. ::==------------++##############%%######.. ++** **++++++------==**## :: ::------------++**::..............::**####.. ++**..::##.. ..++## ::....::--------++##.. ::####:: ::****++####.. ..**++ ..:: ::--==--==%%-- **##++ ..--##++::####== --##-- ::..::---- ::== --####--.. ::**##.. ==%%##:: ::**** :: :: **####++--==####:: **%%##==--==####:: :: ..::.. ....::::..--########++.. ==**######++.. :: ..::::::::::::::::::.... ..::::.... .... ::::.. ....::.... ..::::::::::::::::::::.... */ import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./IDelegationRegistry.sol"; import "closedsea/src/OperatorFilterer.sol"; contract InvisibleFriends3D is ERC721A, ERC2981, OperatorFilterer, Ownable { using Strings for uint256; error ExceedsMaxSupplyError(); error IncorrectAmountError(); error SaleStateClosedError(); // Token mint error NotDelegatedError(); error NotOwnerError(uint256); error TokenBasedMintDisabledError(); error TokenIdAlreadyMintedError(uint256); // List mint error InsufficientListAmountError(); error InvalidProofError(); error ListDisabledError(); error UnknownListError(); string public PROVENANCE_HASH; uint256 constant MAX_SUPPLY = 5000; uint256 constant price = 0.07 ether; string public baseURI; IERC721 public invisibleFriends; IDelegationRegistry public delegationRegistry; enum SaleState { Closed, Private, Public } SaleState public saleState = SaleState.Closed; mapping(uint256 => bool) private _mintedIFTokenIDs; bool private _tokenBasedDisabled; mapping(string => bytes32) private _lists; mapping(string => bool) private _listDisabled; mapping(bytes32 => uint256) private _alreadyListMinted; bool public operatorFilteringEnabled = true; constructor( string memory initialBaseURI, address invisibleFriendsAddress, address delegationRegistryAddress, address payable royaltiesReceiver ) ERC721A("Invisible Friends 3D", "INVSBLE3D") { baseURI = initialBaseURI; invisibleFriends = IERC721(invisibleFriendsAddress); delegationRegistry = IDelegationRegistry(delegationRegistryAddress); setRoyaltyInfo(royaltiesReceiver, 500); _registerForOperatorFiltering(address(0), false); } function withdraw(address payable destination) external onlyOwner { destination.transfer(address(this).balance); } // Accessors function setProvenanceHash(string calldata hash) external onlyOwner { PROVENANCE_HASH = hash; } function setBaseURI(string memory uri) external onlyOwner { baseURI = uri; } function _baseURI() internal view override returns (string memory) { return baseURI; } function setSaleState(SaleState _saleState) external onlyOwner { saleState = _saleState; } function setListRoot(string calldata list, bytes32 root) external onlyOwner { _lists[list] = root; } function setTokenBasedDisabled(bool disabled) external onlyOwner { _tokenBasedDisabled = disabled; } function setListDisabled(string calldata list, bool disabled) external onlyOwner { _listDisabled[list] = disabled; } // Modifiers modifier verifySaleState(SaleState requiredState) { if (saleState != requiredState) revert SaleStateClosedError(); _; } modifier verifyAmount(uint256 amount) { if (msg.value != price * amount) revert IncorrectAmountError(); _; } modifier verifyAvailableSupply(uint256 amount) { if (totalSupply() + amount > MAX_SUPPLY) revert ExceedsMaxSupplyError(); _; } modifier verifyTokenBasedMintEnabled() { if (_tokenBasedDisabled) revert TokenBasedMintDisabledError(); _; } modifier verifyListExists(string calldata list) { if (_lists[list] == "") revert UnknownListError(); _; } // Minting function alreadyMintedIFIDs(uint256[] calldata tokenId) external view returns (bool[] memory) { bool[] memory states = new bool[](tokenId.length); for (uint256 i = 0; i < tokenId.length; i++) { states[i] = _mintedIFTokenIDs[tokenId[i]]; } return states; } function alreadyListMinted(string calldata list, address account) external view returns (uint256) { return _alreadyListMinted[_listMintCountKey(list, account)]; } function mintForInvisibleFriends( uint256[] calldata originalIds ) external payable verifySaleState(SaleState.Private) verifyTokenBasedMintEnabled verifyAmount(originalIds.length) verifyAvailableSupply(originalIds.length) { _checkOwnershipAndMarkIDsMinted(originalIds, _msgSender()); _mint(_msgSender(), originalIds.length); } function delegatedMintForInvisibleFriends( address vault, uint256[] calldata originalIds ) external payable verifySaleState(SaleState.Private) verifyTokenBasedMintEnabled verifyAmount(originalIds.length) verifyAvailableSupply(originalIds.length) { if (!delegationRegistry.checkDelegateForContract(_msgSender(), vault, address(this))) revert NotDelegatedError(); _checkOwnershipAndMarkIDsMinted(originalIds, vault); _mint(_msgSender(), originalIds.length); } function mintListed( string calldata list, uint256 amount, bytes32[] calldata merkleProof, uint256 maxAmount ) external payable verifySaleState(SaleState.Private) verifyAmount(amount) verifyAvailableSupply(amount) verifyListExists(list) { if (_listDisabled[list]) revert ListDisabledError(); if (!_verifyMerkleProof(list, merkleProof, _msgSender(), maxAmount)) revert InvalidProofError(); bytes32 listKey = _listMintCountKey(list, _msgSender()); if (amount > maxAmount - _alreadyListMinted[listKey]) revert InsufficientListAmountError(); _alreadyListMinted[listKey] += amount; _mint(_msgSender(), amount); } function mintPublic( uint256 amount ) external payable verifySaleState(SaleState.Public) verifyAmount(amount) verifyAvailableSupply(amount) { _mint(_msgSender(), amount); } function ownerMint(address to, uint256 amount) external onlyOwner verifyAvailableSupply(amount) { _mint(to, amount); } function _checkOwnershipAndMarkIDsMinted(uint256[] calldata originalIds, address proposedOwner) private { uint256 tokenId; for (uint256 i = 0; i < originalIds.length; i++) { tokenId = originalIds[i]; if (invisibleFriends.ownerOf(tokenId) != proposedOwner) revert NotOwnerError(tokenId); if (_mintedIFTokenIDs[tokenId]) revert TokenIdAlreadyMintedError(tokenId); _mintedIFTokenIDs[tokenId] = true; } } function _verifyMerkleProof( string calldata list, bytes32[] calldata merkleProof, address sender, uint256 maxAmount ) private view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(sender, maxAmount.toString())); return MerkleProof.verify(merkleProof, _lists[list], leaf); } function _listMintCountKey(string calldata list, address account) private pure returns (bytes32) { return keccak256(abi.encodePacked(list, account)); } // ERC721A function _startTokenId() internal view virtual override returns (uint256) { return 1; } // OperatorFilterer function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function setOperatorFilteringEnabled(bool value) public onlyOwner { operatorFilteringEnabled = value; } function _operatorFilteringEnabled() internal view virtual override returns (bool) { return operatorFilteringEnabled; } // IERC2981 function setRoyaltyInfo(address payable receiver, uint96 numerator) public onlyOwner { _setDefaultRoyalty(receiver, numerator); } // ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @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 up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (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; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 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. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); 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 (rounding == Rounding.Up && 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 down. * * 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 + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * 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 + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * 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 10, 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 + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Optimized and flexible operator filterer to abide to OpenSea's /// mandatory on-chain royalty enforcement in order for new collections to /// receive royalties. /// For more information, see: /// See: https://github.com/ProjectOpenSea/operator-filter-registry abstract contract OperatorFilterer { /// @dev The default OpenSea operator blocklist subscription. address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; /// @dev The OpenSea operator filter registry. address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E; /// @dev Registers the current contract to OpenSea's operator filter, /// and subscribe to the default OpenSea operator blocklist. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering() internal virtual { _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true); } /// @dev Registers the current contract to OpenSea's operator filter. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe) internal virtual { /// @solidity memory-safe-assembly assembly { let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`. // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty. subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy)) // prettier-ignore for {} iszero(subscribe) {} { if iszero(subscriptionOrRegistrantToCopy) { functionSelector := 0x4420e486 // `register(address)`. break } functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`. break } // Store the function selector. mstore(0x00, shl(224, functionSelector)) // Store the `address(this)`. mstore(0x04, address()) // Store the `subscriptionOrRegistrantToCopy`. mstore(0x24, subscriptionOrRegistrantToCopy) // Register into the registry. pop(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x00)) // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, because of Solidity's memory size limits. mstore(0x24, 0) } } /// @dev Modifier to guard a function and revert if the caller is a blocked operator. modifier onlyAllowedOperator(address from) virtual { if (from != msg.sender) { if (!_isPriorityOperator(msg.sender)) { if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender); } } _; } /// @dev Modifier to guard a function from approving a blocked operator.. modifier onlyAllowedOperatorApproval(address operator) virtual { if (!_isPriorityOperator(operator)) { if (_operatorFilteringEnabled()) _revertIfBlocked(operator); } _; } /// @dev Helper function that reverts if the `operator` is blocked by the registry. function _revertIfBlocked(address operator) private view { /// @solidity memory-safe-assembly assembly { // Store the function selector of `isOperatorAllowed(address,address)`, // shifted left by 6 bytes, which is enough for 8tb of memory. // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL). mstore(0x00, 0xc6171134001122334455) // Store the `address(this)`. mstore(0x1a, address()) // Store the `operator`. mstore(0x3a, operator) // `isOperatorAllowed` always returns true if it does not revert. if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) { // Bubble up the revert if the staticcall reverts. returndatacopy(0x00, 0x00, returndatasize()) revert(0x00, returndatasize()) } // We'll skip checking if `from` is inside the blacklist. // Even though that can block transferring out of wrapper contracts, // we don't want tokens to be stuck. // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, if less than 8tb of memory is used. mstore(0x3a, 0) } } /// @dev For deriving contracts to override, so that operator filtering /// can be turned on / off. /// Returns true by default. function _operatorFilteringEnabled() internal view virtual returns (bool) { return true; } /// @dev For deriving contracts to override, so that preferred marketplaces can /// skip operator filtering, helping users save gas. /// Returns false for all inputs by default. function _isPriorityOperator(address) internal view virtual returns (bool) { return false; } }
// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.17; /** * @title An immutable registry contract to be deployed as a standalone primitive * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations * from here and integrate those permissions into their flow */ interface IDelegationRegistry { /// @notice Delegation type enum DelegationType { NONE, ALL, CONTRACT, TOKEN } /// @notice Info about a single delegation, used for onchain enumeration struct DelegationInfo { DelegationType type_; address vault; address delegate; address contract_; uint256 tokenId; } /// @notice Info about a single contract-level delegation struct ContractDelegation { address contract_; address delegate; } /// @notice Info about a single token-level delegation struct TokenDelegation { address contract_; uint256 tokenId; address delegate; } /// @notice Emitted when a user delegates their entire wallet event DelegateForAll(address vault, address delegate, bool value); /// @notice Emitted when a user delegates a specific contract event DelegateForContract(address vault, address delegate, address contract_, bool value); /// @notice Emitted when a user delegates a specific token event DelegateForToken(address vault, address delegate, address contract_, uint256 tokenId, bool value); /// @notice Emitted when a user revokes all delegations event RevokeAllDelegates(address vault); /// @notice Emitted when a user revoes all delegations for a given delegate event RevokeDelegate(address vault, address delegate); /** * ----------- WRITE ----------- */ /** * @notice Allow the delegate to act on your behalf for all contracts * @param delegate The hotwallet to act on your behalf * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForAll(address delegate, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific contract * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForContract(address delegate, address contract_, bool value) external; /** * @notice Allow the delegate to act on your behalf for a specific token * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking */ function delegateForToken(address delegate, address contract_, uint256 tokenId, bool value) external; /** * @notice Revoke all delegates */ function revokeAllDelegates() external; /** * @notice Revoke a specific delegate for all their permissions * @param delegate The hotwallet to revoke */ function revokeDelegate(address delegate) external; /** * @notice Remove yourself as a delegate for a specific vault * @param vault The vault which delegated to the msg.sender, and should be removed */ function revokeSelf(address vault) external; /** * ----------- READ ----------- */ /** * @notice Returns all active delegations a given delegate is able to claim on behalf of * @param delegate The delegate that you would like to retrieve delegations for * @return info Array of DelegationInfo structs */ function getDelegationsByDelegate(address delegate) external view returns (DelegationInfo[] memory); /** * @notice Returns an array of wallet-level delegates for a given vault * @param vault The cold wallet who issued the delegation * @return addresses Array of wallet-level delegates for a given vault */ function getDelegatesForAll(address vault) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault and contract * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract you're delegating * @return addresses Array of contract-level delegates for a given vault and contract */ function getDelegatesForContract(address vault, address contract_) external view returns (address[] memory); /** * @notice Returns an array of contract-level delegates for a given vault's token * @param vault The cold wallet who issued the delegation * @param contract_ The address for the contract holding the token * @param tokenId The token id for the token you're delegating * @return addresses Array of contract-level delegates for a given vault's token */ function getDelegatesForToken(address vault, address contract_, uint256 tokenId) external view returns (address[] memory); /** * @notice Returns all contract-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of ContractDelegation structs */ function getContractLevelDelegations(address vault) external view returns (ContractDelegation[] memory delegations); /** * @notice Returns all token-level delegations for a given vault * @param vault The cold wallet who issued the delegations * @return delegations Array of TokenDelegation structs */ function getTokenLevelDelegations(address vault) external view returns (TokenDelegation[] memory delegations); /** * @notice Returns true if the address is delegated to act on the entire vault * @param delegate The hotwallet to act on your behalf * @param vault The cold wallet who issued the delegation */ function checkDelegateForAll(address delegate, address vault) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForContract(address delegate, address vault, address contract_) external view returns (bool); /** * @notice Returns true if the address is delegated to act on your behalf for a specific token, the token's contract or an entire vault * @param delegate The hotwallet to act on your behalf * @param contract_ The address for the contract you're delegating * @param tokenId The token id for the token you're delegating * @param vault The cold wallet who issued the delegation */ function checkDelegateForToken(address delegate, address vault, address contract_, uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"initialBaseURI","type":"string"},{"internalType":"address","name":"invisibleFriendsAddress","type":"address"},{"internalType":"address","name":"delegationRegistryAddress","type":"address"},{"internalType":"address payable","name":"royaltiesReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ExceedsMaxSupplyError","type":"error"},{"inputs":[],"name":"IncorrectAmountError","type":"error"},{"inputs":[],"name":"InsufficientListAmountError","type":"error"},{"inputs":[],"name":"InvalidProofError","type":"error"},{"inputs":[],"name":"ListDisabledError","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotDelegatedError","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"NotOwnerError","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SaleStateClosedError","type":"error"},{"inputs":[],"name":"TokenBasedMintDisabledError","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TokenIdAlreadyMintedError","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"UnknownListError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"list","type":"string"},{"internalType":"address","name":"account","type":"address"}],"name":"alreadyListMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"}],"name":"alreadyMintedIFIDs","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256[]","name":"originalIds","type":"uint256[]"}],"name":"delegatedMintForInvisibleFriends","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"delegationRegistry","outputs":[{"internalType":"contract IDelegationRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"invisibleFriends","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"originalIds","type":"uint256[]"}],"name":"mintForInvisibleFriends","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"list","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"mintListed","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"enum InvisibleFriends3D.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"list","type":"string"},{"internalType":"bool","name":"disabled","type":"bool"}],"name":"setListDisabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"list","type":"string"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setListRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"hash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"receiver","type":"address"},{"internalType":"uint96","name":"numerator","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum InvisibleFriends3D.SaleState","name":"_saleState","type":"uint8"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"disabled","type":"bool"}],"name":"setTokenBasedDisabled","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":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"destination","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600e60146101000a81548160ff021916908360028111156200002d576200002c620005d4565b5b02179055506001601460006101000a81548160ff0219169083151502179055503480156200005a57600080fd5b5060405162005a9938038062005a99833981810160405281019062000080919062000840565b6040518060400160405280601481526020017f496e76697369626c6520467269656e64732033440000000000000000000000008152506040518060400160405280600981526020017f494e5653424c45334400000000000000000000000000000000000000000000008152508160029081620000fd919062000b1c565b5080600390816200010f919062000b1c565b50620001206200020d60201b60201c565b6000819055505050620001486200013c6200021660201b60201c565b6200021e60201b60201c565b83600c908162000159919062000b1c565b5082600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620001f0816101f4620002e460201b60201c565b620002036000806200030a60201b60201c565b5050505062000d90565b60006001905090565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620002f46200036c60201b60201c565b620003068282620003fd60201b60201c565b5050565b637d3e3dbe8260601b60601c9250816200033957826200033157634420e486905062000339565b63a0af290390505b8060e01b600052306004528260245260008060446000806daaeb6d7670e522a718067333cd4e5af1506000602452505050565b6200037c6200021660201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620003a2620005a060201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620003fb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003f29062000c64565b60405180910390fd5b565b6200040d620005ca60201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200046e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004659062000cfc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620004e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004d79062000d6e565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000612710905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200066c8262000621565b810181811067ffffffffffffffff821117156200068e576200068d62000632565b5b80604052505050565b6000620006a362000603565b9050620006b1828262000661565b919050565b600067ffffffffffffffff821115620006d457620006d362000632565b5b620006df8262000621565b9050602081019050919050565b60005b838110156200070c578082015181840152602081019050620006ef565b60008484015250505050565b60006200072f6200072984620006b6565b62000697565b9050828152602081018484840111156200074e576200074d6200061c565b5b6200075b848285620006ec565b509392505050565b600082601f8301126200077b576200077a62000617565b5b81516200078d84826020860162000718565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620007c38262000796565b9050919050565b620007d581620007b6565b8114620007e157600080fd5b50565b600081519050620007f581620007ca565b92915050565b6000620008088262000796565b9050919050565b6200081a81620007fb565b81146200082657600080fd5b50565b6000815190506200083a816200080f565b92915050565b600080600080608085870312156200085d576200085c6200060d565b5b600085015167ffffffffffffffff8111156200087e576200087d62000612565b5b6200088c8782880162000763565b94505060206200089f87828801620007e4565b9350506040620008b287828801620007e4565b9250506060620008c58782880162000829565b91505092959194509250565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200092457607f821691505b6020821081036200093a5762000939620008dc565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620009a47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000965565b620009b0868362000965565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620009fd620009f7620009f184620009c8565b620009d2565b620009c8565b9050919050565b6000819050919050565b62000a1983620009dc565b62000a3162000a288262000a04565b84845462000972565b825550505050565b600090565b62000a4862000a39565b62000a5581848462000a0e565b505050565b5b8181101562000a7d5762000a7160008262000a3e565b60018101905062000a5b565b5050565b601f82111562000acc5762000a968162000940565b62000aa18462000955565b8101602085101562000ab1578190505b62000ac962000ac08562000955565b83018262000a5a565b50505b505050565b600082821c905092915050565b600062000af16000198460080262000ad1565b1980831691505092915050565b600062000b0c838362000ade565b9150826002028217905092915050565b62000b2782620008d1565b67ffffffffffffffff81111562000b435762000b4262000632565b5b62000b4f82546200090b565b62000b5c82828562000a81565b600060209050601f83116001811462000b94576000841562000b7f578287015190505b62000b8b858262000afe565b86555062000bfb565b601f19841662000ba48662000940565b60005b8281101562000bce5784890151825560018201915060208501945060208101905062000ba7565b8683101562000bee578489015162000bea601f89168262000ade565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000c4c60208362000c03565b915062000c598262000c14565b602082019050919050565b6000602082019050818103600083015262000c7f8162000c3d565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000ce4602a8362000c03565b915062000cf18262000c86565b604082019050919050565b6000602082019050818103600083015262000d178162000cd5565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000d5660198362000c03565b915062000d638262000d1e565b602082019050919050565b6000602082019050818103600083015262000d898162000d47565b9050919050565b614cf98062000da06000396000f3fe60806040526004361061023b5760003560e01c80635a67de071161012e578063a22cb465116100ab578063efd0cbf91161006f578063efd0cbf91461081f578063f2fde38b1461083b578063fb796e6c14610864578063fc76fdb01461088f578063ff1b6556146108cc5761023b565b8063a22cb46514610737578063b7c0b8e814610760578063b88d4fde14610789578063c87b56dd146107a5578063e985e9c5146107e25761023b565b806370a08231116100f257806370a0823114610650578063715018a61461068d5780638da5cb5b146106a4578063901d84b6146106cf57806395d89b411461070c5761023b565b80635a67de071461056b578063603f4d521461059457806362697342146105bf5780636352211e146105e85780636c0360eb146106255761023b565b806323b872dd116101bc57806342842e0e1161018057806342842e0e146104b8578063484b973c146104d45780634f58fd78146104fd57806351cff8d91461051957806355f804b3146105425761023b565b806323b872dd146103fb57806325b7b22b14610417578063289144d6146104335780632a55205a1461044f5780632ec302a61461048d5761023b565b80630c52d18b116102035780630c52d18b1461032a578063109695231461035357806318160ddd1461037c5780631fbdd72d146103a7578063204f1c0e146103d25761023b565b806301ffc9a71461024057806302fa7c471461027d57806306fdde03146102a6578063081812fc146102d1578063095ea7b31461030e575b600080fd5b34801561024c57600080fd5b5061026760048036038101906102629190613458565b6108f7565b60405161027491906134a0565b60405180910390f35b34801561028957600080fd5b506102a4600480360381019061029f919061355d565b610919565b005b3480156102b257600080fd5b506102bb61092f565b6040516102c8919061362d565b60405180910390f35b3480156102dd57600080fd5b506102f860048036038101906102f39190613685565b6109c1565b60405161030591906136d3565b60405180910390f35b6103286004803603810190610323919061371a565b610a40565b005b34801561033657600080fd5b50610351600480360381019061034c91906137f5565b610a75565b005b34801561035f57600080fd5b5061037a60048036038101906103759190613855565b610aa7565b005b34801561038857600080fd5b50610391610ac5565b60405161039e91906138b1565b60405180910390f35b3480156103b357600080fd5b506103bc610adc565b6040516103c9919061392b565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f49190613972565b610b02565b005b610415600480360381019061041091906139d2565b610b47565b005b610431600480360381019061042c9190613a7b565b610bb2565b005b61044d60048036038101906104489190613ac8565b610d35565b005b34801561045b57600080fd5b5061047660048036038101906104719190613b28565b610f8f565b604051610484929190613b68565b60405180910390f35b34801561049957600080fd5b506104a2611179565b6040516104af9190613bb2565b60405180910390f35b6104d260048036038101906104cd91906139d2565b61119f565b005b3480156104e057600080fd5b506104fb60048036038101906104f6919061371a565b61120a565b005b61051760048036038101906105129190613c23565b611270565b005b34801561052557600080fd5b50610540600480360381019061053b9190613cca565b61153c565b005b34801561054e57600080fd5b5061056960048036038101906105649190613e27565b61158e565b005b34801561057757600080fd5b50610592600480360381019061058d9190613e95565b6115a9565b005b3480156105a057600080fd5b506105a96115de565b6040516105b69190613f39565b60405180910390f35b3480156105cb57600080fd5b506105e660048036038101906105e19190613f54565b6115f1565b005b3480156105f457600080fd5b5061060f600480360381019061060a9190613685565b611616565b60405161061c91906136d3565b60405180910390f35b34801561063157600080fd5b5061063a611628565b604051610647919061362d565b60405180910390f35b34801561065c57600080fd5b5061067760048036038101906106729190613f81565b6116b6565b60405161068491906138b1565b60405180910390f35b34801561069957600080fd5b506106a261176e565b005b3480156106b057600080fd5b506106b9611782565b6040516106c691906136d3565b60405180910390f35b3480156106db57600080fd5b506106f660048036038101906106f19190613a7b565b6117ac565b604051610703919061406c565b60405180910390f35b34801561071857600080fd5b50610721611889565b60405161072e919061362d565b60405180910390f35b34801561074357600080fd5b5061075e6004803603810190610759919061408e565b61191b565b005b34801561076c57600080fd5b5061078760048036038101906107829190613f54565b611950565b005b6107a3600480360381019061079e919061416f565b611975565b005b3480156107b157600080fd5b506107cc60048036038101906107c79190613685565b6119e2565b6040516107d9919061362d565b60405180910390f35b3480156107ee57600080fd5b50610809600480360381019061080491906141f2565b611a80565b60405161081691906134a0565b60405180910390f35b61083960048036038101906108349190613685565b611b14565b005b34801561084757600080fd5b50610862600480360381019061085d9190613f81565b611c34565b005b34801561087057600080fd5b50610879611cb7565b60405161088691906134a0565b60405180910390f35b34801561089b57600080fd5b506108b660048036038101906108b19190614232565b611cca565b6040516108c391906138b1565b60405180910390f35b3480156108d857600080fd5b506108e1611cf3565b6040516108ee919061362d565b60405180910390f35b600061090282611d81565b80610912575061091182611e13565b5b9050919050565b610921611e8d565b61092b8282611f0b565b5050565b60606002805461093e906142c1565b80601f016020809104026020016040519081016040528092919081815260200182805461096a906142c1565b80156109b75780601f1061098c576101008083540402835291602001916109b7565b820191906000526020600020905b81548152906001019060200180831161099a57829003601f168201915b5050505050905090565b60006109cc826120a0565b610a02576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610a4a816120ff565b610a6657610a56612106565b15610a6557610a648161211d565b5b5b610a708383612161565b505050565b610a7d611e8d565b8060118484604051610a90929190614322565b908152602001604051809103902081905550505050565b610aaf611e8d565b8181600b9182610ac09291906144e8565b505050565b6000610acf6122a5565b6001546000540303905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b0a611e8d565b8060128484604051610b1d929190614322565b908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ba157610b84336120ff565b610ba057610b90612106565b15610b9f57610b9e3361211d565b5b5b5b610bac8484846122ae565b50505050565b6001806002811115610bc757610bc6613ec2565b5b600e60149054906101000a900460ff166002811115610be957610be8613ec2565b5b14610c20576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601060009054906101000a900460ff1615610c67576040517f410f312c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828290508066f8b0a10e470000610c7e91906145e7565b3414610cb6576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383905061138881610cc6610ac5565b610cd09190614629565b1115610d08576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1a8585610d156125d0565b6125d8565b610d2e610d256125d0565b868690506127bb565b5050505050565b6001806002811115610d4a57610d49613ec2565b5b600e60149054906101000a900460ff166002811115610d6c57610d6b613ec2565b5b14610da3576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601060009054906101000a900460ff1615610dea576040517f410f312c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828290508066f8b0a10e470000610e0191906145e7565b3414610e39576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383905061138881610e49610ac5565b610e539190614629565b1115610e8b576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390c9a2d0610ed16125d0565b88306040518463ffffffff1660e01b8152600401610ef19392919061465d565b602060405180830381865afa158015610f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3291906146a9565b610f68576040517f3d94debd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f738585886125d8565b610f87610f7e6125d0565b868690506127bb565b505050505050565b6000806000600960008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036111245760086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b600061112e612976565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff168661115a91906145e7565b6111649190614705565b90508160000151819350935050509250929050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111f9576111dc336120ff565b6111f8576111e8612106565b156111f7576111f63361211d565b5b5b5b611204848484612980565b50505050565b611212611e8d565b806113888161121f610ac5565b6112299190614629565b1115611261576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61126b83836127bb565b505050565b600180600281111561128557611284613ec2565b5b600e60149054906101000a900460ff1660028111156112a7576112a6613ec2565b5b146112de576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b848066f8b0a10e4700006112f291906145e7565b341461132a576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8561138881611337610ac5565b6113419190614629565b1115611379576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b888860006011838360405161138f929190614322565b908152602001604051809103902054036113d5576040517f6d79786900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60128b8b6040516113e7929190614322565b908152602001604051809103902060009054906101000a900460ff161561143a576040517f91140ed500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61144f8b8b8a8a6114496125d0565b8b6129a0565b611485576040517f7d31e14900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114998c8c6114946125d0565b612a4f565b90506013600082815260200190815260200160002054876114ba9190614736565b8a11156114f3576040517f7dabc05000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b896013600083815260200190815260200160002060008282546115169190614629565b9250508190555061152e6115286125d0565b8b6127bb565b505050505050505050505050565b611544611e8d565b8073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561158a573d6000803e3d6000fd5b5050565b611596611e8d565b80600c90816115a5919061476a565b5050565b6115b1611e8d565b80600e60146101000a81548160ff021916908360028111156115d6576115d5613ec2565b5b021790555050565b600e60149054906101000a900460ff1681565b6115f9611e8d565b80601060006101000a81548160ff02191690831515021790555050565b600061162182612a85565b9050919050565b600c8054611635906142c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611661906142c1565b80156116ae5780601f10611683576101008083540402835291602001916116ae565b820191906000526020600020905b81548152906001019060200180831161169157829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361171d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611776611e8d565b6117806000612b51565b565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060008383905067ffffffffffffffff8111156117cd576117cc613cfc565b5b6040519080825280602002602001820160405280156117fb5781602001602082028036833780820191505090505b50905060005b8484905081101561187e57600f60008686848181106118235761182261483c565b5b90506020020135815260200190815260200160002060009054906101000a900460ff168282815181106118595761185861483c565b5b60200260200101901515908115158152505080806118769061486b565b915050611801565b508091505092915050565b606060038054611898906142c1565b80601f01602080910402602001604051908101604052809291908181526020018280546118c4906142c1565b80156119115780601f106118e657610100808354040283529160200191611911565b820191906000526020600020905b8154815290600101906020018083116118f457829003601f168201915b5050505050905090565b81611925816120ff565b61194157611931612106565b156119405761193f8161211d565b5b5b61194b8383612c17565b505050565b611958611e8d565b80601460006101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146119cf576119b2336120ff565b6119ce576119be612106565b156119cd576119cc3361211d565b5b5b5b6119db85858585612d22565b5050505050565b60606119ed826120a0565b611a23576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a2d612d95565b90506000815103611a4d5760405180602001604052806000815250611a78565b80611a5784612e27565b604051602001611a689291906148e4565b6040516020818303038152906040525b915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6002806002811115611b2957611b28613ec2565b5b600e60149054906101000a900460ff166002811115611b4b57611b4a613ec2565b5b14611b82576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818066f8b0a10e470000611b9691906145e7565b3414611bce576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261138881611bdb610ac5565b611be59190614629565b1115611c1d576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c2e611c286125d0565b856127bb565b50505050565b611c3c611e8d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca29061497a565b60405180910390fd5b611cb481612b51565b50565b601460009054906101000a900460ff1681565b600060136000611cdb868686612a4f565b81526020019081526020016000205490509392505050565b600b8054611d00906142c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d2c906142c1565b8015611d795780601f10611d4e57610100808354040283529160200191611d79565b820191906000526020600020905b815481529060010190602001808311611d5c57829003601f168201915b505050505081565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611ddc57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611e0c5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611e865750611e8582612e77565b5b9050919050565b611e956125d0565b73ffffffffffffffffffffffffffffffffffffffff16611eb3611782565b73ffffffffffffffffffffffffffffffffffffffff1614611f09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f00906149e6565b60405180910390fd5b565b611f13612976565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115611f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6890614a78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611fe0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd790614ae4565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000816120ab6122a5565b111580156120ba575060005482105b80156120f8575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b6000919050565b6000601460009054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa612159573d6000803e3d6000fd5b6000603a5250565b600061216c82611616565b90508073ffffffffffffffffffffffffffffffffffffffff1661218d612ee1565b73ffffffffffffffffffffffffffffffffffffffff16146121f0576121b9816121b4612ee1565b611a80565b6121ef576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006001905090565b60006122b982612a85565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612320576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061232c84612ee9565b91509150612342818761233d612ee1565b612f10565b61238e5761235786612352612ee1565b611a80565b61238d576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036123f4576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124018686866001612f54565b801561240c57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506124da856124b6888887612f5a565b7c020000000000000000000000000000000000000000000000000000000017612f82565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612560576000600185019050600060046000838152602001908152602001600020540361255e57600054811461255d578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125c88686866001612fad565b505050505050565b600033905090565b600080600090505b848490508110156127b4578484828181106125fe576125fd61483c565b5b9050602002013591508273ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161267991906138b1565b602060405180830381865afa158015612696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ba9190614b19565b73ffffffffffffffffffffffffffffffffffffffff161461271257816040517f48f62f3c00000000000000000000000000000000000000000000000000000000815260040161270991906138b1565b60405180910390fd5b600f600083815260200190815260200160002060009054906101000a900460ff161561277557816040517f91bd7c2800000000000000000000000000000000000000000000000000000000815260040161276c91906138b1565b60405180910390fd5b6001600f600084815260200190815260200160002060006101000a81548160ff02191690831515021790555080806127ac9061486b565b9150506125e0565b5050505050565b600080549050600082036127fb576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6128086000848385612f54565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061287f836128706000866000612f5a565b61287985612fb3565b17612f82565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461292057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506128e5565b506000820361295b576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506129716000848385612fad565b505050565b6000612710905090565b61299b83838360405180602001604052806000815250611975565b505050565b600080836129ad84612fc3565b6040516020016129be929190614b8e565b604051602081830303815290604052805190602001209050612a42868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060118a8a604051612a2d929190614322565b90815260200160405180910390205483613091565b9150509695505050505050565b6000838383604051602001612a6693929190614bb6565b6040516020818303038152906040528051906020012090509392505050565b60008082905080612a946122a5565b11612b1a57600054811015612b195760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612b17575b60008103612b0d576004600083600190039350838152602001908152602001600020549050612ae3565b8092505050612b4c565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8060076000612c24612ee1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612cd1612ee1565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612d1691906134a0565b60405180910390a35050565b612d2d848484610b47565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612d8f57612d58848484846130a8565b612d8e576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6060600c8054612da4906142c1565b80601f0160208091040260200160405190810160405280929190818152602001828054612dd0906142c1565b8015612e1d5780601f10612df257610100808354040283529160200191612e1d565b820191906000526020600020905b815481529060010190602001808311612e0057829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612e6257600184039350600a81066030018453600a8104905080612e40575b50828103602084039350808452505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612f718686846131f8565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b606060006001612fd284613201565b01905060008167ffffffffffffffff811115612ff157612ff0613cfc565b5b6040519080825280601f01601f1916602001820160405280156130235781602001600182028036833780820191505090505b509050600082602001820190505b600115613086578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161307a576130796146d6565b5b04945060008503613031575b819350505050919050565b60008261309e8584613354565b1490509392505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130ce612ee1565b8786866040518563ffffffff1660e01b81526004016130f09493929190614c35565b6020604051808303816000875af192505050801561312c57506040513d601f19601f820116820180604052508101906131299190614c96565b60015b6131a5573d806000811461315c576040519150601f19603f3d011682016040523d82523d6000602084013e613161565b606091505b50600081510361319d576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061325f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381613255576132546146d6565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061329c576d04ee2d6d415b85acef81000000008381613292576132916146d6565b5b0492506020810190505b662386f26fc1000083106132cb57662386f26fc1000083816132c1576132c06146d6565b5b0492506010810190505b6305f5e10083106132f4576305f5e10083816132ea576132e96146d6565b5b0492506008810190505b612710831061331957612710838161330f5761330e6146d6565b5b0492506004810190505b6064831061333c5760648381613332576133316146d6565b5b0492506002810190505b600a831061334b576001810190505b80915050919050565b60008082905060005b845181101561339f5761338a8286838151811061337d5761337c61483c565b5b60200260200101516133aa565b915080806133979061486b565b91505061335d565b508091505092915050565b60008183106133c2576133bd82846133d5565b6133cd565b6133cc83836133d5565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61343581613400565b811461344057600080fd5b50565b6000813590506134528161342c565b92915050565b60006020828403121561346e5761346d6133f6565b5b600061347c84828501613443565b91505092915050565b60008115159050919050565b61349a81613485565b82525050565b60006020820190506134b56000830184613491565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006134e6826134bb565b9050919050565b6134f6816134db565b811461350157600080fd5b50565b600081359050613513816134ed565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61353a81613519565b811461354557600080fd5b50565b60008135905061355781613531565b92915050565b60008060408385031215613574576135736133f6565b5b600061358285828601613504565b925050602061359385828601613548565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156135d75780820151818401526020810190506135bc565b60008484015250505050565b6000601f19601f8301169050919050565b60006135ff8261359d565b61360981856135a8565b93506136198185602086016135b9565b613622816135e3565b840191505092915050565b6000602082019050818103600083015261364781846135f4565b905092915050565b6000819050919050565b6136628161364f565b811461366d57600080fd5b50565b60008135905061367f81613659565b92915050565b60006020828403121561369b5761369a6133f6565b5b60006136a984828501613670565b91505092915050565b60006136bd826134bb565b9050919050565b6136cd816136b2565b82525050565b60006020820190506136e860008301846136c4565b92915050565b6136f7816136b2565b811461370257600080fd5b50565b600081359050613714816136ee565b92915050565b60008060408385031215613731576137306133f6565b5b600061373f85828601613705565b925050602061375085828601613670565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261377f5761377e61375a565b5b8235905067ffffffffffffffff81111561379c5761379b61375f565b5b6020830191508360018202830111156137b8576137b7613764565b5b9250929050565b6000819050919050565b6137d2816137bf565b81146137dd57600080fd5b50565b6000813590506137ef816137c9565b92915050565b60008060006040848603121561380e5761380d6133f6565b5b600084013567ffffffffffffffff81111561382c5761382b6133fb565b5b61383886828701613769565b9350935050602061384b868287016137e0565b9150509250925092565b6000806020838503121561386c5761386b6133f6565b5b600083013567ffffffffffffffff81111561388a576138896133fb565b5b61389685828601613769565b92509250509250929050565b6138ab8161364f565b82525050565b60006020820190506138c660008301846138a2565b92915050565b6000819050919050565b60006138f16138ec6138e7846134bb565b6138cc565b6134bb565b9050919050565b6000613903826138d6565b9050919050565b6000613915826138f8565b9050919050565b6139258161390a565b82525050565b6000602082019050613940600083018461391c565b92915050565b61394f81613485565b811461395a57600080fd5b50565b60008135905061396c81613946565b92915050565b60008060006040848603121561398b5761398a6133f6565b5b600084013567ffffffffffffffff8111156139a9576139a86133fb565b5b6139b586828701613769565b935093505060206139c88682870161395d565b9150509250925092565b6000806000606084860312156139eb576139ea6133f6565b5b60006139f986828701613705565b9350506020613a0a86828701613705565b9250506040613a1b86828701613670565b9150509250925092565b60008083601f840112613a3b57613a3a61375a565b5b8235905067ffffffffffffffff811115613a5857613a5761375f565b5b602083019150836020820283011115613a7457613a73613764565b5b9250929050565b60008060208385031215613a9257613a916133f6565b5b600083013567ffffffffffffffff811115613ab057613aaf6133fb565b5b613abc85828601613a25565b92509250509250929050565b600080600060408486031215613ae157613ae06133f6565b5b6000613aef86828701613705565b935050602084013567ffffffffffffffff811115613b1057613b0f6133fb565b5b613b1c86828701613a25565b92509250509250925092565b60008060408385031215613b3f57613b3e6133f6565b5b6000613b4d85828601613670565b9250506020613b5e85828601613670565b9150509250929050565b6000604082019050613b7d60008301856136c4565b613b8a60208301846138a2565b9392505050565b6000613b9c826138f8565b9050919050565b613bac81613b91565b82525050565b6000602082019050613bc76000830184613ba3565b92915050565b60008083601f840112613be357613be261375a565b5b8235905067ffffffffffffffff811115613c0057613bff61375f565b5b602083019150836020820283011115613c1c57613c1b613764565b5b9250929050565b60008060008060008060808789031215613c4057613c3f6133f6565b5b600087013567ffffffffffffffff811115613c5e57613c5d6133fb565b5b613c6a89828a01613769565b96509650506020613c7d89828a01613670565b945050604087013567ffffffffffffffff811115613c9e57613c9d6133fb565b5b613caa89828a01613bcd565b93509350506060613cbd89828a01613670565b9150509295509295509295565b600060208284031215613ce057613cdf6133f6565b5b6000613cee84828501613504565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613d34826135e3565b810181811067ffffffffffffffff82111715613d5357613d52613cfc565b5b80604052505050565b6000613d666133ec565b9050613d728282613d2b565b919050565b600067ffffffffffffffff821115613d9257613d91613cfc565b5b613d9b826135e3565b9050602081019050919050565b82818337600083830152505050565b6000613dca613dc584613d77565b613d5c565b905082815260208101848484011115613de657613de5613cf7565b5b613df1848285613da8565b509392505050565b600082601f830112613e0e57613e0d61375a565b5b8135613e1e848260208601613db7565b91505092915050565b600060208284031215613e3d57613e3c6133f6565b5b600082013567ffffffffffffffff811115613e5b57613e5a6133fb565b5b613e6784828501613df9565b91505092915050565b60038110613e7d57600080fd5b50565b600081359050613e8f81613e70565b92915050565b600060208284031215613eab57613eaa6133f6565b5b6000613eb984828501613e80565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613f0257613f01613ec2565b5b50565b6000819050613f1382613ef1565b919050565b6000613f2382613f05565b9050919050565b613f3381613f18565b82525050565b6000602082019050613f4e6000830184613f2a565b92915050565b600060208284031215613f6a57613f696133f6565b5b6000613f788482850161395d565b91505092915050565b600060208284031215613f9757613f966133f6565b5b6000613fa584828501613705565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613fe381613485565b82525050565b6000613ff58383613fda565b60208301905092915050565b6000602082019050919050565b600061401982613fae565b6140238185613fb9565b935061402e83613fca565b8060005b8381101561405f5781516140468882613fe9565b975061405183614001565b925050600181019050614032565b5085935050505092915050565b60006020820190508181036000830152614086818461400e565b905092915050565b600080604083850312156140a5576140a46133f6565b5b60006140b385828601613705565b92505060206140c48582860161395d565b9150509250929050565b600067ffffffffffffffff8211156140e9576140e8613cfc565b5b6140f2826135e3565b9050602081019050919050565b600061411261410d846140ce565b613d5c565b90508281526020810184848401111561412e5761412d613cf7565b5b614139848285613da8565b509392505050565b600082601f8301126141565761415561375a565b5b81356141668482602086016140ff565b91505092915050565b60008060008060808587031215614189576141886133f6565b5b600061419787828801613705565b94505060206141a887828801613705565b93505060406141b987828801613670565b925050606085013567ffffffffffffffff8111156141da576141d96133fb565b5b6141e687828801614141565b91505092959194509250565b60008060408385031215614209576142086133f6565b5b600061421785828601613705565b925050602061422885828601613705565b9150509250929050565b60008060006040848603121561424b5761424a6133f6565b5b600084013567ffffffffffffffff811115614269576142686133fb565b5b61427586828701613769565b9350935050602061428886828701613705565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806142d957607f821691505b6020821081036142ec576142eb614292565b5b50919050565b600081905092915050565b600061430983856142f2565b9350614316838584613da8565b82840190509392505050565b600061432f8284866142fd565b91508190509392505050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026143a87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261436b565b6143b2868361436b565b95508019841693508086168417925050509392505050565b60006143e56143e06143db8461364f565b6138cc565b61364f565b9050919050565b6000819050919050565b6143ff836143ca565b61441361440b826143ec565b848454614378565b825550505050565b600090565b61442861441b565b6144338184846143f6565b505050565b5b818110156144575761444c600082614420565b600181019050614439565b5050565b601f82111561449c5761446d81614346565b6144768461435b565b81016020851015614485578190505b6144996144918561435b565b830182614438565b50505b505050565b600082821c905092915050565b60006144bf600019846008026144a1565b1980831691505092915050565b60006144d883836144ae565b9150826002028217905092915050565b6144f2838361433b565b67ffffffffffffffff81111561450b5761450a613cfc565b5b61451582546142c1565b61452082828561445b565b6000601f83116001811461454f576000841561453d578287013590505b61454785826144cc565b8655506145af565b601f19841661455d86614346565b60005b8281101561458557848901358255600182019150602085019450602081019050614560565b868310156145a2578489013561459e601f8916826144ae565b8355505b6001600288020188555050505b50505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145f28261364f565b91506145fd8361364f565b925082820261460b8161364f565b91508282048414831517614622576146216145b8565b5b5092915050565b60006146348261364f565b915061463f8361364f565b9250828201905080821115614657576146566145b8565b5b92915050565b600060608201905061467260008301866136c4565b61467f60208301856136c4565b61468c60408301846136c4565b949350505050565b6000815190506146a381613946565b92915050565b6000602082840312156146bf576146be6133f6565b5b60006146cd84828501614694565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006147108261364f565b915061471b8361364f565b92508261472b5761472a6146d6565b5b828204905092915050565b60006147418261364f565b915061474c8361364f565b9250828203905081811115614764576147636145b8565b5b92915050565b6147738261359d565b67ffffffffffffffff81111561478c5761478b613cfc565b5b61479682546142c1565b6147a182828561445b565b600060209050601f8311600181146147d457600084156147c2578287015190505b6147cc85826144cc565b865550614834565b601f1984166147e286614346565b60005b8281101561480a578489015182556001820191506020850194506020810190506147e5565b868310156148275784890151614823601f8916826144ae565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006148768261364f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036148a8576148a76145b8565b5b600182019050919050565b60006148be8261359d565b6148c881856142f2565b93506148d88185602086016135b9565b80840191505092915050565b60006148f082856148b3565b91506148fc82846148b3565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006149646026836135a8565b915061496f82614908565b604082019050919050565b6000602082019050818103600083015261499381614957565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006149d06020836135a8565b91506149db8261499a565b602082019050919050565b600060208201905081810360008301526149ff816149c3565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614a62602a836135a8565b9150614a6d82614a06565b604082019050919050565b60006020820190508181036000830152614a9181614a55565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614ace6019836135a8565b9150614ad982614a98565b602082019050919050565b60006020820190508181036000830152614afd81614ac1565b9050919050565b600081519050614b13816136ee565b92915050565b600060208284031215614b2f57614b2e6133f6565b5b6000614b3d84828501614b04565b91505092915050565b60008160601b9050919050565b6000614b5e82614b46565b9050919050565b6000614b7082614b53565b9050919050565b614b88614b83826136b2565b614b65565b82525050565b6000614b9a8285614b77565b601482019150614baa82846148b3565b91508190509392505050565b6000614bc38285876142fd565b9150614bcf8284614b77565b601482019150819050949350505050565b600081519050919050565b600082825260208201905092915050565b6000614c0782614be0565b614c118185614beb565b9350614c218185602086016135b9565b614c2a816135e3565b840191505092915050565b6000608082019050614c4a60008301876136c4565b614c5760208301866136c4565b614c6460408301856138a2565b8181036060830152614c768184614bfc565b905095945050505050565b600081519050614c908161342c565b92915050565b600060208284031215614cac57614cab6133f6565b5b6000614cba84828501614c81565b9150509291505056fea2646970667358221220fc4bc20421896d033f0c80103e69a0858b5f6d45de9750df279e036ae8abe4eb64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000059468516a8259058bad1ca5f8f4bff190d30e06600000000000000000000000000000000000076a84fef008cdabe6409d2fe638b00000000000000000000000056657a72dd7df70a17a647e2998e2ca72320e699000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f696e76697369626c65667269656e64732e696f2f6170692f6d657461646174612f33642f0000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061023b5760003560e01c80635a67de071161012e578063a22cb465116100ab578063efd0cbf91161006f578063efd0cbf91461081f578063f2fde38b1461083b578063fb796e6c14610864578063fc76fdb01461088f578063ff1b6556146108cc5761023b565b8063a22cb46514610737578063b7c0b8e814610760578063b88d4fde14610789578063c87b56dd146107a5578063e985e9c5146107e25761023b565b806370a08231116100f257806370a0823114610650578063715018a61461068d5780638da5cb5b146106a4578063901d84b6146106cf57806395d89b411461070c5761023b565b80635a67de071461056b578063603f4d521461059457806362697342146105bf5780636352211e146105e85780636c0360eb146106255761023b565b806323b872dd116101bc57806342842e0e1161018057806342842e0e146104b8578063484b973c146104d45780634f58fd78146104fd57806351cff8d91461051957806355f804b3146105425761023b565b806323b872dd146103fb57806325b7b22b14610417578063289144d6146104335780632a55205a1461044f5780632ec302a61461048d5761023b565b80630c52d18b116102035780630c52d18b1461032a578063109695231461035357806318160ddd1461037c5780631fbdd72d146103a7578063204f1c0e146103d25761023b565b806301ffc9a71461024057806302fa7c471461027d57806306fdde03146102a6578063081812fc146102d1578063095ea7b31461030e575b600080fd5b34801561024c57600080fd5b5061026760048036038101906102629190613458565b6108f7565b60405161027491906134a0565b60405180910390f35b34801561028957600080fd5b506102a4600480360381019061029f919061355d565b610919565b005b3480156102b257600080fd5b506102bb61092f565b6040516102c8919061362d565b60405180910390f35b3480156102dd57600080fd5b506102f860048036038101906102f39190613685565b6109c1565b60405161030591906136d3565b60405180910390f35b6103286004803603810190610323919061371a565b610a40565b005b34801561033657600080fd5b50610351600480360381019061034c91906137f5565b610a75565b005b34801561035f57600080fd5b5061037a60048036038101906103759190613855565b610aa7565b005b34801561038857600080fd5b50610391610ac5565b60405161039e91906138b1565b60405180910390f35b3480156103b357600080fd5b506103bc610adc565b6040516103c9919061392b565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f49190613972565b610b02565b005b610415600480360381019061041091906139d2565b610b47565b005b610431600480360381019061042c9190613a7b565b610bb2565b005b61044d60048036038101906104489190613ac8565b610d35565b005b34801561045b57600080fd5b5061047660048036038101906104719190613b28565b610f8f565b604051610484929190613b68565b60405180910390f35b34801561049957600080fd5b506104a2611179565b6040516104af9190613bb2565b60405180910390f35b6104d260048036038101906104cd91906139d2565b61119f565b005b3480156104e057600080fd5b506104fb60048036038101906104f6919061371a565b61120a565b005b61051760048036038101906105129190613c23565b611270565b005b34801561052557600080fd5b50610540600480360381019061053b9190613cca565b61153c565b005b34801561054e57600080fd5b5061056960048036038101906105649190613e27565b61158e565b005b34801561057757600080fd5b50610592600480360381019061058d9190613e95565b6115a9565b005b3480156105a057600080fd5b506105a96115de565b6040516105b69190613f39565b60405180910390f35b3480156105cb57600080fd5b506105e660048036038101906105e19190613f54565b6115f1565b005b3480156105f457600080fd5b5061060f600480360381019061060a9190613685565b611616565b60405161061c91906136d3565b60405180910390f35b34801561063157600080fd5b5061063a611628565b604051610647919061362d565b60405180910390f35b34801561065c57600080fd5b5061067760048036038101906106729190613f81565b6116b6565b60405161068491906138b1565b60405180910390f35b34801561069957600080fd5b506106a261176e565b005b3480156106b057600080fd5b506106b9611782565b6040516106c691906136d3565b60405180910390f35b3480156106db57600080fd5b506106f660048036038101906106f19190613a7b565b6117ac565b604051610703919061406c565b60405180910390f35b34801561071857600080fd5b50610721611889565b60405161072e919061362d565b60405180910390f35b34801561074357600080fd5b5061075e6004803603810190610759919061408e565b61191b565b005b34801561076c57600080fd5b5061078760048036038101906107829190613f54565b611950565b005b6107a3600480360381019061079e919061416f565b611975565b005b3480156107b157600080fd5b506107cc60048036038101906107c79190613685565b6119e2565b6040516107d9919061362d565b60405180910390f35b3480156107ee57600080fd5b50610809600480360381019061080491906141f2565b611a80565b60405161081691906134a0565b60405180910390f35b61083960048036038101906108349190613685565b611b14565b005b34801561084757600080fd5b50610862600480360381019061085d9190613f81565b611c34565b005b34801561087057600080fd5b50610879611cb7565b60405161088691906134a0565b60405180910390f35b34801561089b57600080fd5b506108b660048036038101906108b19190614232565b611cca565b6040516108c391906138b1565b60405180910390f35b3480156108d857600080fd5b506108e1611cf3565b6040516108ee919061362d565b60405180910390f35b600061090282611d81565b80610912575061091182611e13565b5b9050919050565b610921611e8d565b61092b8282611f0b565b5050565b60606002805461093e906142c1565b80601f016020809104026020016040519081016040528092919081815260200182805461096a906142c1565b80156109b75780601f1061098c576101008083540402835291602001916109b7565b820191906000526020600020905b81548152906001019060200180831161099a57829003601f168201915b5050505050905090565b60006109cc826120a0565b610a02576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610a4a816120ff565b610a6657610a56612106565b15610a6557610a648161211d565b5b5b610a708383612161565b505050565b610a7d611e8d565b8060118484604051610a90929190614322565b908152602001604051809103902081905550505050565b610aaf611e8d565b8181600b9182610ac09291906144e8565b505050565b6000610acf6122a5565b6001546000540303905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b0a611e8d565b8060128484604051610b1d929190614322565b908152602001604051809103902060006101000a81548160ff021916908315150217905550505050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610ba157610b84336120ff565b610ba057610b90612106565b15610b9f57610b9e3361211d565b5b5b5b610bac8484846122ae565b50505050565b6001806002811115610bc757610bc6613ec2565b5b600e60149054906101000a900460ff166002811115610be957610be8613ec2565b5b14610c20576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601060009054906101000a900460ff1615610c67576040517f410f312c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828290508066f8b0a10e470000610c7e91906145e7565b3414610cb6576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383905061138881610cc6610ac5565b610cd09190614629565b1115610d08576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1a8585610d156125d0565b6125d8565b610d2e610d256125d0565b868690506127bb565b5050505050565b6001806002811115610d4a57610d49613ec2565b5b600e60149054906101000a900460ff166002811115610d6c57610d6b613ec2565b5b14610da3576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601060009054906101000a900460ff1615610dea576040517f410f312c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828290508066f8b0a10e470000610e0191906145e7565b3414610e39576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383905061138881610e49610ac5565b610e539190614629565b1115610e8b576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390c9a2d0610ed16125d0565b88306040518463ffffffff1660e01b8152600401610ef19392919061465d565b602060405180830381865afa158015610f0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3291906146a9565b610f68576040517f3d94debd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f738585886125d8565b610f87610f7e6125d0565b868690506127bb565b505050505050565b6000806000600960008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036111245760086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b600061112e612976565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff168661115a91906145e7565b6111649190614705565b90508160000151819350935050509250929050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111f9576111dc336120ff565b6111f8576111e8612106565b156111f7576111f63361211d565b5b5b5b611204848484612980565b50505050565b611212611e8d565b806113888161121f610ac5565b6112299190614629565b1115611261576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61126b83836127bb565b505050565b600180600281111561128557611284613ec2565b5b600e60149054906101000a900460ff1660028111156112a7576112a6613ec2565b5b146112de576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b848066f8b0a10e4700006112f291906145e7565b341461132a576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8561138881611337610ac5565b6113419190614629565b1115611379576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b888860006011838360405161138f929190614322565b908152602001604051809103902054036113d5576040517f6d79786900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60128b8b6040516113e7929190614322565b908152602001604051809103902060009054906101000a900460ff161561143a576040517f91140ed500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61144f8b8b8a8a6114496125d0565b8b6129a0565b611485576040517f7d31e14900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114998c8c6114946125d0565b612a4f565b90506013600082815260200190815260200160002054876114ba9190614736565b8a11156114f3576040517f7dabc05000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b896013600083815260200190815260200160002060008282546115169190614629565b9250508190555061152e6115286125d0565b8b6127bb565b505050505050505050505050565b611544611e8d565b8073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561158a573d6000803e3d6000fd5b5050565b611596611e8d565b80600c90816115a5919061476a565b5050565b6115b1611e8d565b80600e60146101000a81548160ff021916908360028111156115d6576115d5613ec2565b5b021790555050565b600e60149054906101000a900460ff1681565b6115f9611e8d565b80601060006101000a81548160ff02191690831515021790555050565b600061162182612a85565b9050919050565b600c8054611635906142c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611661906142c1565b80156116ae5780601f10611683576101008083540402835291602001916116ae565b820191906000526020600020905b81548152906001019060200180831161169157829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361171d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611776611e8d565b6117806000612b51565b565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060008383905067ffffffffffffffff8111156117cd576117cc613cfc565b5b6040519080825280602002602001820160405280156117fb5781602001602082028036833780820191505090505b50905060005b8484905081101561187e57600f60008686848181106118235761182261483c565b5b90506020020135815260200190815260200160002060009054906101000a900460ff168282815181106118595761185861483c565b5b60200260200101901515908115158152505080806118769061486b565b915050611801565b508091505092915050565b606060038054611898906142c1565b80601f01602080910402602001604051908101604052809291908181526020018280546118c4906142c1565b80156119115780601f106118e657610100808354040283529160200191611911565b820191906000526020600020905b8154815290600101906020018083116118f457829003601f168201915b5050505050905090565b81611925816120ff565b61194157611931612106565b156119405761193f8161211d565b5b5b61194b8383612c17565b505050565b611958611e8d565b80601460006101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146119cf576119b2336120ff565b6119ce576119be612106565b156119cd576119cc3361211d565b5b5b5b6119db85858585612d22565b5050505050565b60606119ed826120a0565b611a23576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a2d612d95565b90506000815103611a4d5760405180602001604052806000815250611a78565b80611a5784612e27565b604051602001611a689291906148e4565b6040516020818303038152906040525b915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6002806002811115611b2957611b28613ec2565b5b600e60149054906101000a900460ff166002811115611b4b57611b4a613ec2565b5b14611b82576040517f7af9518b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818066f8b0a10e470000611b9691906145e7565b3414611bce576040517f5b79039b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261138881611bdb610ac5565b611be59190614629565b1115611c1d576040517f0b17a17b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c2e611c286125d0565b856127bb565b50505050565b611c3c611e8d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca29061497a565b60405180910390fd5b611cb481612b51565b50565b601460009054906101000a900460ff1681565b600060136000611cdb868686612a4f565b81526020019081526020016000205490509392505050565b600b8054611d00906142c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d2c906142c1565b8015611d795780601f10611d4e57610100808354040283529160200191611d79565b820191906000526020600020905b815481529060010190602001808311611d5c57829003601f168201915b505050505081565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611ddc57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611e0c5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611e865750611e8582612e77565b5b9050919050565b611e956125d0565b73ffffffffffffffffffffffffffffffffffffffff16611eb3611782565b73ffffffffffffffffffffffffffffffffffffffff1614611f09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f00906149e6565b60405180910390fd5b565b611f13612976565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115611f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6890614a78565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611fe0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd790614ae4565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000816120ab6122a5565b111580156120ba575060005482105b80156120f8575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b6000919050565b6000601460009054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa612159573d6000803e3d6000fd5b6000603a5250565b600061216c82611616565b90508073ffffffffffffffffffffffffffffffffffffffff1661218d612ee1565b73ffffffffffffffffffffffffffffffffffffffff16146121f0576121b9816121b4612ee1565b611a80565b6121ef576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006001905090565b60006122b982612a85565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612320576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061232c84612ee9565b91509150612342818761233d612ee1565b612f10565b61238e5761235786612352612ee1565b611a80565b61238d576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036123f4576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6124018686866001612f54565b801561240c57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506124da856124b6888887612f5a565b7c020000000000000000000000000000000000000000000000000000000017612f82565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612560576000600185019050600060046000838152602001908152602001600020540361255e57600054811461255d578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46125c88686866001612fad565b505050505050565b600033905090565b600080600090505b848490508110156127b4578484828181106125fe576125fd61483c565b5b9050602002013591508273ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161267991906138b1565b602060405180830381865afa158015612696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ba9190614b19565b73ffffffffffffffffffffffffffffffffffffffff161461271257816040517f48f62f3c00000000000000000000000000000000000000000000000000000000815260040161270991906138b1565b60405180910390fd5b600f600083815260200190815260200160002060009054906101000a900460ff161561277557816040517f91bd7c2800000000000000000000000000000000000000000000000000000000815260040161276c91906138b1565b60405180910390fd5b6001600f600084815260200190815260200160002060006101000a81548160ff02191690831515021790555080806127ac9061486b565b9150506125e0565b5050505050565b600080549050600082036127fb576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6128086000848385612f54565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061287f836128706000866000612f5a565b61287985612fb3565b17612f82565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461292057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506128e5565b506000820361295b576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506129716000848385612fad565b505050565b6000612710905090565b61299b83838360405180602001604052806000815250611975565b505050565b600080836129ad84612fc3565b6040516020016129be929190614b8e565b604051602081830303815290604052805190602001209050612a42868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060118a8a604051612a2d929190614322565b90815260200160405180910390205483613091565b9150509695505050505050565b6000838383604051602001612a6693929190614bb6565b6040516020818303038152906040528051906020012090509392505050565b60008082905080612a946122a5565b11612b1a57600054811015612b195760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612b17575b60008103612b0d576004600083600190039350838152602001908152602001600020549050612ae3565b8092505050612b4c565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8060076000612c24612ee1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612cd1612ee1565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612d1691906134a0565b60405180910390a35050565b612d2d848484610b47565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612d8f57612d58848484846130a8565b612d8e576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6060600c8054612da4906142c1565b80601f0160208091040260200160405190810160405280929190818152602001828054612dd0906142c1565b8015612e1d5780601f10612df257610100808354040283529160200191612e1d565b820191906000526020600020905b815481529060010190602001808311612e0057829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612e6257600184039350600a81066030018453600a8104905080612e40575b50828103602084039350808452505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8612f718686846131f8565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b606060006001612fd284613201565b01905060008167ffffffffffffffff811115612ff157612ff0613cfc565b5b6040519080825280601f01601f1916602001820160405280156130235781602001600182028036833780820191505090505b509050600082602001820190505b600115613086578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161307a576130796146d6565b5b04945060008503613031575b819350505050919050565b60008261309e8584613354565b1490509392505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130ce612ee1565b8786866040518563ffffffff1660e01b81526004016130f09493929190614c35565b6020604051808303816000875af192505050801561312c57506040513d601f19601f820116820180604052508101906131299190614c96565b60015b6131a5573d806000811461315c576040519150601f19603f3d011682016040523d82523d6000602084013e613161565b606091505b50600081510361319d576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061325f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381613255576132546146d6565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061329c576d04ee2d6d415b85acef81000000008381613292576132916146d6565b5b0492506020810190505b662386f26fc1000083106132cb57662386f26fc1000083816132c1576132c06146d6565b5b0492506010810190505b6305f5e10083106132f4576305f5e10083816132ea576132e96146d6565b5b0492506008810190505b612710831061331957612710838161330f5761330e6146d6565b5b0492506004810190505b6064831061333c5760648381613332576133316146d6565b5b0492506002810190505b600a831061334b576001810190505b80915050919050565b60008082905060005b845181101561339f5761338a8286838151811061337d5761337c61483c565b5b60200260200101516133aa565b915080806133979061486b565b91505061335d565b508091505092915050565b60008183106133c2576133bd82846133d5565b6133cd565b6133cc83836133d5565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61343581613400565b811461344057600080fd5b50565b6000813590506134528161342c565b92915050565b60006020828403121561346e5761346d6133f6565b5b600061347c84828501613443565b91505092915050565b60008115159050919050565b61349a81613485565b82525050565b60006020820190506134b56000830184613491565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006134e6826134bb565b9050919050565b6134f6816134db565b811461350157600080fd5b50565b600081359050613513816134ed565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61353a81613519565b811461354557600080fd5b50565b60008135905061355781613531565b92915050565b60008060408385031215613574576135736133f6565b5b600061358285828601613504565b925050602061359385828601613548565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156135d75780820151818401526020810190506135bc565b60008484015250505050565b6000601f19601f8301169050919050565b60006135ff8261359d565b61360981856135a8565b93506136198185602086016135b9565b613622816135e3565b840191505092915050565b6000602082019050818103600083015261364781846135f4565b905092915050565b6000819050919050565b6136628161364f565b811461366d57600080fd5b50565b60008135905061367f81613659565b92915050565b60006020828403121561369b5761369a6133f6565b5b60006136a984828501613670565b91505092915050565b60006136bd826134bb565b9050919050565b6136cd816136b2565b82525050565b60006020820190506136e860008301846136c4565b92915050565b6136f7816136b2565b811461370257600080fd5b50565b600081359050613714816136ee565b92915050565b60008060408385031215613731576137306133f6565b5b600061373f85828601613705565b925050602061375085828601613670565b9150509250929050565b600080fd5b600080fd5b600080fd5b60008083601f84011261377f5761377e61375a565b5b8235905067ffffffffffffffff81111561379c5761379b61375f565b5b6020830191508360018202830111156137b8576137b7613764565b5b9250929050565b6000819050919050565b6137d2816137bf565b81146137dd57600080fd5b50565b6000813590506137ef816137c9565b92915050565b60008060006040848603121561380e5761380d6133f6565b5b600084013567ffffffffffffffff81111561382c5761382b6133fb565b5b61383886828701613769565b9350935050602061384b868287016137e0565b9150509250925092565b6000806020838503121561386c5761386b6133f6565b5b600083013567ffffffffffffffff81111561388a576138896133fb565b5b61389685828601613769565b92509250509250929050565b6138ab8161364f565b82525050565b60006020820190506138c660008301846138a2565b92915050565b6000819050919050565b60006138f16138ec6138e7846134bb565b6138cc565b6134bb565b9050919050565b6000613903826138d6565b9050919050565b6000613915826138f8565b9050919050565b6139258161390a565b82525050565b6000602082019050613940600083018461391c565b92915050565b61394f81613485565b811461395a57600080fd5b50565b60008135905061396c81613946565b92915050565b60008060006040848603121561398b5761398a6133f6565b5b600084013567ffffffffffffffff8111156139a9576139a86133fb565b5b6139b586828701613769565b935093505060206139c88682870161395d565b9150509250925092565b6000806000606084860312156139eb576139ea6133f6565b5b60006139f986828701613705565b9350506020613a0a86828701613705565b9250506040613a1b86828701613670565b9150509250925092565b60008083601f840112613a3b57613a3a61375a565b5b8235905067ffffffffffffffff811115613a5857613a5761375f565b5b602083019150836020820283011115613a7457613a73613764565b5b9250929050565b60008060208385031215613a9257613a916133f6565b5b600083013567ffffffffffffffff811115613ab057613aaf6133fb565b5b613abc85828601613a25565b92509250509250929050565b600080600060408486031215613ae157613ae06133f6565b5b6000613aef86828701613705565b935050602084013567ffffffffffffffff811115613b1057613b0f6133fb565b5b613b1c86828701613a25565b92509250509250925092565b60008060408385031215613b3f57613b3e6133f6565b5b6000613b4d85828601613670565b9250506020613b5e85828601613670565b9150509250929050565b6000604082019050613b7d60008301856136c4565b613b8a60208301846138a2565b9392505050565b6000613b9c826138f8565b9050919050565b613bac81613b91565b82525050565b6000602082019050613bc76000830184613ba3565b92915050565b60008083601f840112613be357613be261375a565b5b8235905067ffffffffffffffff811115613c0057613bff61375f565b5b602083019150836020820283011115613c1c57613c1b613764565b5b9250929050565b60008060008060008060808789031215613c4057613c3f6133f6565b5b600087013567ffffffffffffffff811115613c5e57613c5d6133fb565b5b613c6a89828a01613769565b96509650506020613c7d89828a01613670565b945050604087013567ffffffffffffffff811115613c9e57613c9d6133fb565b5b613caa89828a01613bcd565b93509350506060613cbd89828a01613670565b9150509295509295509295565b600060208284031215613ce057613cdf6133f6565b5b6000613cee84828501613504565b91505092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613d34826135e3565b810181811067ffffffffffffffff82111715613d5357613d52613cfc565b5b80604052505050565b6000613d666133ec565b9050613d728282613d2b565b919050565b600067ffffffffffffffff821115613d9257613d91613cfc565b5b613d9b826135e3565b9050602081019050919050565b82818337600083830152505050565b6000613dca613dc584613d77565b613d5c565b905082815260208101848484011115613de657613de5613cf7565b5b613df1848285613da8565b509392505050565b600082601f830112613e0e57613e0d61375a565b5b8135613e1e848260208601613db7565b91505092915050565b600060208284031215613e3d57613e3c6133f6565b5b600082013567ffffffffffffffff811115613e5b57613e5a6133fb565b5b613e6784828501613df9565b91505092915050565b60038110613e7d57600080fd5b50565b600081359050613e8f81613e70565b92915050565b600060208284031215613eab57613eaa6133f6565b5b6000613eb984828501613e80565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613f0257613f01613ec2565b5b50565b6000819050613f1382613ef1565b919050565b6000613f2382613f05565b9050919050565b613f3381613f18565b82525050565b6000602082019050613f4e6000830184613f2a565b92915050565b600060208284031215613f6a57613f696133f6565b5b6000613f788482850161395d565b91505092915050565b600060208284031215613f9757613f966133f6565b5b6000613fa584828501613705565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613fe381613485565b82525050565b6000613ff58383613fda565b60208301905092915050565b6000602082019050919050565b600061401982613fae565b6140238185613fb9565b935061402e83613fca565b8060005b8381101561405f5781516140468882613fe9565b975061405183614001565b925050600181019050614032565b5085935050505092915050565b60006020820190508181036000830152614086818461400e565b905092915050565b600080604083850312156140a5576140a46133f6565b5b60006140b385828601613705565b92505060206140c48582860161395d565b9150509250929050565b600067ffffffffffffffff8211156140e9576140e8613cfc565b5b6140f2826135e3565b9050602081019050919050565b600061411261410d846140ce565b613d5c565b90508281526020810184848401111561412e5761412d613cf7565b5b614139848285613da8565b509392505050565b600082601f8301126141565761415561375a565b5b81356141668482602086016140ff565b91505092915050565b60008060008060808587031215614189576141886133f6565b5b600061419787828801613705565b94505060206141a887828801613705565b93505060406141b987828801613670565b925050606085013567ffffffffffffffff8111156141da576141d96133fb565b5b6141e687828801614141565b91505092959194509250565b60008060408385031215614209576142086133f6565b5b600061421785828601613705565b925050602061422885828601613705565b9150509250929050565b60008060006040848603121561424b5761424a6133f6565b5b600084013567ffffffffffffffff811115614269576142686133fb565b5b61427586828701613769565b9350935050602061428886828701613705565b9150509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806142d957607f821691505b6020821081036142ec576142eb614292565b5b50919050565b600081905092915050565b600061430983856142f2565b9350614316838584613da8565b82840190509392505050565b600061432f8284866142fd565b91508190509392505050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026143a87fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261436b565b6143b2868361436b565b95508019841693508086168417925050509392505050565b60006143e56143e06143db8461364f565b6138cc565b61364f565b9050919050565b6000819050919050565b6143ff836143ca565b61441361440b826143ec565b848454614378565b825550505050565b600090565b61442861441b565b6144338184846143f6565b505050565b5b818110156144575761444c600082614420565b600181019050614439565b5050565b601f82111561449c5761446d81614346565b6144768461435b565b81016020851015614485578190505b6144996144918561435b565b830182614438565b50505b505050565b600082821c905092915050565b60006144bf600019846008026144a1565b1980831691505092915050565b60006144d883836144ae565b9150826002028217905092915050565b6144f2838361433b565b67ffffffffffffffff81111561450b5761450a613cfc565b5b61451582546142c1565b61452082828561445b565b6000601f83116001811461454f576000841561453d578287013590505b61454785826144cc565b8655506145af565b601f19841661455d86614346565b60005b8281101561458557848901358255600182019150602085019450602081019050614560565b868310156145a2578489013561459e601f8916826144ae565b8355505b6001600288020188555050505b50505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145f28261364f565b91506145fd8361364f565b925082820261460b8161364f565b91508282048414831517614622576146216145b8565b5b5092915050565b60006146348261364f565b915061463f8361364f565b9250828201905080821115614657576146566145b8565b5b92915050565b600060608201905061467260008301866136c4565b61467f60208301856136c4565b61468c60408301846136c4565b949350505050565b6000815190506146a381613946565b92915050565b6000602082840312156146bf576146be6133f6565b5b60006146cd84828501614694565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006147108261364f565b915061471b8361364f565b92508261472b5761472a6146d6565b5b828204905092915050565b60006147418261364f565b915061474c8361364f565b9250828203905081811115614764576147636145b8565b5b92915050565b6147738261359d565b67ffffffffffffffff81111561478c5761478b613cfc565b5b61479682546142c1565b6147a182828561445b565b600060209050601f8311600181146147d457600084156147c2578287015190505b6147cc85826144cc565b865550614834565b601f1984166147e286614346565b60005b8281101561480a578489015182556001820191506020850194506020810190506147e5565b868310156148275784890151614823601f8916826144ae565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006148768261364f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036148a8576148a76145b8565b5b600182019050919050565b60006148be8261359d565b6148c881856142f2565b93506148d88185602086016135b9565b80840191505092915050565b60006148f082856148b3565b91506148fc82846148b3565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006149646026836135a8565b915061496f82614908565b604082019050919050565b6000602082019050818103600083015261499381614957565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006149d06020836135a8565b91506149db8261499a565b602082019050919050565b600060208201905081810360008301526149ff816149c3565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614a62602a836135a8565b9150614a6d82614a06565b604082019050919050565b60006020820190508181036000830152614a9181614a55565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614ace6019836135a8565b9150614ad982614a98565b602082019050919050565b60006020820190508181036000830152614afd81614ac1565b9050919050565b600081519050614b13816136ee565b92915050565b600060208284031215614b2f57614b2e6133f6565b5b6000614b3d84828501614b04565b91505092915050565b60008160601b9050919050565b6000614b5e82614b46565b9050919050565b6000614b7082614b53565b9050919050565b614b88614b83826136b2565b614b65565b82525050565b6000614b9a8285614b77565b601482019150614baa82846148b3565b91508190509392505050565b6000614bc38285876142fd565b9150614bcf8284614b77565b601482019150819050949350505050565b600081519050919050565b600082825260208201905092915050565b6000614c0782614be0565b614c118185614beb565b9350614c218185602086016135b9565b614c2a816135e3565b840191505092915050565b6000608082019050614c4a60008301876136c4565b614c5760208301866136c4565b614c6460408301856138a2565b8181036060830152614c768184614bfc565b905095945050505050565b600081519050614c908161342c565b92915050565b600060208284031215614cac57614cab6133f6565b5b6000614cba84828501614c81565b9150509291505056fea2646970667358221220fc4bc20421896d033f0c80103e69a0858b5f6d45de9750df279e036ae8abe4eb64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000059468516a8259058bad1ca5f8f4bff190d30e06600000000000000000000000000000000000076a84fef008cdabe6409d2fe638b00000000000000000000000056657a72dd7df70a17a647e2998e2ca72320e699000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f696e76697369626c65667269656e64732e696f2f6170692f6d657461646174612f33642f0000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : initialBaseURI (string): https://invisiblefriends.io/api/metadata/3d/
Arg [1] : invisibleFriendsAddress (address): 0x59468516a8259058baD1cA5F8f4BFF190d30E066
Arg [2] : delegationRegistryAddress (address): 0x00000000000076A84feF008CDAbe6409d2FE638B
Arg [3] : royaltiesReceiver (address): 0x56657A72DD7Df70a17A647E2998e2CA72320e699
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000059468516a8259058bad1ca5f8f4bff190d30e066
Arg [2] : 00000000000000000000000000000000000076a84fef008cdabe6409d2fe638b
Arg [3] : 00000000000000000000000056657a72dd7df70a17a647e2998e2ca72320e699
Arg [4] : 000000000000000000000000000000000000000000000000000000000000002c
Arg [5] : 68747470733a2f2f696e76697369626c65667269656e64732e696f2f6170692f
Arg [6] : 6d657461646174612f33642f0000000000000000000000000000000000000000
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.