ERC-1155
Overview
Max Total Supply
1,325 CURIOS
Holders
302
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Curios
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import "./lib/CurioBase.sol"; contract Curios is CurioBase { constructor( string memory name_, string memory symbol_, address signer_, string memory uri_ ) CurioBase(name_, symbol_, signer_, uri_) { _setDefaultRoyalty(msg.sender, 500); } // Mint (Public) function mintCurioPublic( uint tokenId ) external payable checkLocked(tokenId) { Curio memory curio = fullData(tokenId); if (!curio.mintable || !curio.publicMint) { revert PublicMintUnavailable(); } if (msg.value < curio.mintPrice) { revert InsufficientFunds(); } _mint(_msgSender(), tokenId, 1, ""); } // Mint (With signature) function mintCurioSigned( bytes calldata signature, uint tokenId, uint nonce ) external payable checkLocked(tokenId) { Curio memory curio = fullData(tokenId); if (!verify(signature, _msgSender(), tokenId, nonce)) { revert InvalidSignature(); } if (msg.value < curio.mintPrice) { revert InsufficientFunds(); } _mint(_msgSender(), tokenId, 1, ""); } // Airdrop function airdropCurio( address to_, uint tokenId ) external payable onlyOwner checkLocked(tokenId) { _mint(to_, tokenId, 1, ""); } function airdropCurioOneToMany( address[] calldata to_, uint tokenId ) external payable onlyOwner checkLocked(tokenId) { uint howMany = to_.length; for (uint i = 0; i < howMany; ) { _mint(to_[i], tokenId, 1, ""); unchecked { ++i; } } } function airdropCurioManyToMany( address[] calldata to_, uint[] calldata ids, uint[] calldata amts ) external payable onlyOwner { uint howMany = to_.length; if (howMany != ids.length || howMany != amts.length) { revert MismatchedParameters(); } for (uint i = 0; i < howMany; ) { _checkLocked(ids[i]); _mint(to_[i], ids[i], amts[i], ""); unchecked { ++i; } } } // Initialize Wearable function newCurio(uint8 slotId) external payable onlyOwner { Curio memory curio; curio.slotId = slotId; _createNewItem(curio); } function newCurioMint( uint8 slotId, uint80 mintPrice, uint16 maxSupply, uint8 slotCollision, bool soulbound, bool mintable, uint16 minGeneration ) external payable onlyOwner { Curio memory curio; curio.slotId = slotId; curio.mintPrice = mintPrice; curio.maxSupply = maxSupply; curio.slotCollision = slotCollision; curio.soulbound = soulbound; curio.mintable = mintable; curio.minGeneration = minGeneration; _createNewItem(curio); } function newThread(uint8[] calldata slotIds) external payable { uint howMany = slotIds.length; for (uint i = 0; i < howMany; ) { Curio memory curio; curio.slotId = slotIds[i]; _createNewItem(curio); unchecked { ++i; } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import "@openzeppelin/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/token/common/ERC2981.sol"; import "@openzeppelin/access/Ownable.sol"; import "@operator-filter-registry/RevokableDefaultOperatorFilterer.sol"; import "@operator-filter-registry/UpdatableOperatorFilterer.sol"; import "../interfaces/IERC4906.sol"; import "./CurioSignatureCheck.sol"; import "./CurioErrorsAndEvents.sol"; import "./CurioStructs.sol"; contract CurioBase is CurioErrorsAndEvents, CurioStructs, ERC1155Burnable, CurioEIP712, IERC4906, ERC2981, RevokableDefaultOperatorFilterer, Ownable { address public POPPETS; address public PACKS; address private _receiver; string public name; string public symbol; uint public nextToken = 0; uint16 public currentThread = 0; mapping(bytes32 => bool) private _usedSignatures; mapping(uint => Curio) private _curios; mapping(address => bool) private _soulboundExempt; constructor( string memory name_, string memory symbol_, address signer_, string memory uri_ ) ERC1155(uri_) CurioEIP712(name_, signer_) { name = name_; symbol = symbol_; } // ███ ███ ██████ ██████ ██ ███████ ██ ███████ ██████ ███████ // ████ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ████ ██ ██ ██ ██ ██ ██ █████ ██ █████ ██████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██████ ██████ ██ ██ ██ ███████ ██ ██ ███████ modifier checkSoulbound(uint tokenId) { _revertIfSoulbound(tokenId); _; } modifier checkLocked(uint tokenId) { _checkLocked(tokenId); _; } modifier checkSoulboundBatch(uint[] memory tokenIds) { uint howMany = tokenIds.length; for (uint i = 0; i < howMany; ) { _revertIfSoulbound(tokenIds[i]); unchecked { ++i; } } _; } function _checkLocked(uint tokenId) public view { if (_curios[tokenId].locked) { revert TokenLocked(); } } // Utility function to revert whether a token is soulbound function _revertIfSoulbound(uint tokenId) private view { if (_curios[tokenId].soulbound) { if (!_soulboundExempt[_msgSender()]) { revert SoulboundNotTransferrable(); } } } // █████ ██████ ███ ███ ██ ███ ██ // ██ ██ ██ ██ ████ ████ ██ ████ ██ // ███████ ██ ██ ██ ████ ██ ██ ██ ██ ██ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██████ ██ ██ ██ ██ ████ function setSigner(address signer_) external payable onlyOwner { _setSigner(signer_); } function setPoppetsAddress(address poppets_) external payable onlyOwner { _setPoppetsAddress(poppets_); } function _setPoppetsAddress(address poppets) internal { POPPETS = poppets; } function setPacksAddress(address packs_) external payable onlyOwner { _setPacksAddress(packs_); } function _setPacksAddress(address packs_) internal { PACKS = packs_; } function setURI(string calldata uri_) external payable onlyOwner { _setURI(uri_); emit BatchMetadataUpdate(0, nextToken - 1); } function exemptAddressFromSoulbound( address wallet ) external payable onlyOwner { _exemptAddressFromSoulbound(wallet); } function _exemptAddressFromSoulbound(address wallet) internal { _soulboundExempt[wallet] = true; } function _setCurrentThread(uint16 thread_) external payable onlyOwner { currentThread = thread_; } // ██████ █████ ██████ ██ ██ ███████ ██ ██████ ██████ ██████ ██████ ███████ ████████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ███████ ██ █████ ███████ ██ ██████ ██ ██ ██████ ██████ █████ ██ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██ ███████ ██ ███████ function mintFromPack(address to_, uint[] calldata ids) external { if (_msgSender() != PACKS) { revert InsufficientPermissions(); } uint howMany = ids.length; for (uint i = 0; i < howMany; ) { _mint(to_, ids[i], 1, ""); unchecked { ++i; } } } function mintFromPoppets(uint[] calldata ids) external { if (_msgSender() != POPPETS) { revert InsufficientPermissions(); } uint howMany = ids.length; for (uint i = 0; i < howMany; ) { _mint(POPPETS, ids[i], 1, ""); unchecked { ++i; } } } // ██████ ██ ██ ██████ ██ ██████ ███ ███ ██████ ███ ███ ████████ // ██ ██ ██ ██ ██ ██ ██ ██ ████ ████ ██ ████ ████ ██ // ██ ██ ██ ██████ ██ ██ ██ ██ ████ ██ ██ ███ ██ ████ ██ ██ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ██████ ██ ██ ██ ██████ ██ ██ ██████ ██ ██ ██ function _createNewItem(Curio memory curio) internal { curio.thread = currentThread; curio.timestamp = uint40(block.timestamp); _curios[nextToken] = curio; emit NewItemCreated(nextToken, curio.slotId); unchecked { ++nextToken; } } // Setters for Curio metadata // function setSlotId( uint tokenId, uint8 val ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].slotId = val; } function setMintPrice( uint tokenId, uint80 val ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].mintPrice = val; } function setMaxSupply( uint tokenId, uint16 val ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].maxSupply = val; } function setSlotCollision( uint tokenId, uint8 val ) external payable onlyOwner { _curios[tokenId].slotCollision = val; } function toggleSoulbound( uint tokenId ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].soulbound = !_curios[tokenId].soulbound; } function toggleMintable( uint tokenId ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].mintable = !_curios[tokenId].mintable; } function togglePublicMint( uint tokenId ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].publicMint = !_curios[tokenId].publicMint; } function toggleSignedMint( uint tokenId ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].signedMint = !_curios[tokenId].signedMint; } function setMinGeneration( uint tokenId, uint16 val ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].minGeneration = val; } function setMaxGeneration( uint tokenId, uint16 val ) external payable onlyOwner { _curios[tokenId].maxGeneration = val; } function setThread( uint tokenId, uint16 val ) external payable checkLocked(tokenId) onlyOwner { _curios[tokenId].thread = val; } function lockItem( uint tokenId ) external payable onlyOwner { Curio storage curio = _curios[tokenId]; curio.locked = true; curio.maxSupply = curio.totalSupply; } // ██████ ███████ ████████ ████████ ███████ ██████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ // ██ ███ █████ ██ ██ █████ ██████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ███████ ██ ██ ███████ ██ ██ ███████ function compatibilityData( uint tokenId ) public view returns ( uint slotId, uint slotCollision, uint minGeneration, uint maxGeneration ) { Curio storage curio = _curios[tokenId]; return ( curio.slotId, curio.slotCollision, curio.minGeneration, curio.maxGeneration ); } function fullData(uint tokenId) public view returns (Curio memory curio) { return _curios[tokenId]; } // ██████ ██ ██ ███████ ██████ ██████ ██ ██████ ███████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██ ██ █████ ██████ ██████ ██ ██ ██ █████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██████ ████ ███████ ██ ██ ██ ██ ██ ██████ ███████ ███████ // // Functions that override ERC-standards, primarily for the OS Operator Filter // and soulbound tokens /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * Overrides here include checks for individual token supply limits, tracking * totalSupply for each token, */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override { if (from == address(0)) { // Minting - make sure totalSupply is less than maxSupply uint howMany = ids.length; for (uint i = 0; i < howMany; ) { Curio storage curio = _curios[ids[i]]; // avoid integer overflow if (amounts[i] + curio.totalSupply > type(uint16).max) { revert ExceedsMaxSupply(); } // Do not exceed maxSupply (if set) if (curio.maxSupply > 0) { if (curio.totalSupply + amounts[i] > curio.maxSupply) { revert ExceedsMaxSupply(); } } curio.totalSupply += uint16(amounts[i]); unchecked { ++i; } } } else if (to == address(0)) { // Burns - reduce totalSupply by the amount being burned uint howMany = ids.length; for (uint i = 0; i < howMany; ) { _curios[ids[i]].totalSupply -= uint16(amounts[i]); } } super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll( address account, address operator ) public view virtual override(IERC1155, ERC1155) returns (bool) { return super.isApprovedForAll(account, operator) || operator == POPPETS; } /** * @dev See {IERC1155-setApprovalForAll}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function setApprovalForAll( address operator, bool approved ) public override(IERC1155, ERC1155) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } /** * @dev See {IERC1155-safeTransferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override(IERC1155, ERC1155) onlyAllowedOperator(from) checkSoulbound(tokenId) { super.safeTransferFrom(from, to, tokenId, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override(IERC1155, ERC1155) onlyAllowedOperator(from) checkSoulboundBatch(ids) { super.safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Returns the owner of the ERC1155 token contract. */ function owner() public view virtual override(Ownable, UpdatableOperatorFilterer) returns (address) { return Ownable.owner(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, ERC1155, ERC2981) returns (bool) { return interfaceId == bytes4(0x49064906) || // ERC-4906 ERC1155.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } // ███████ ██ ███ ██ █████ ███ ██ ██████ ███████ ███████ // ██ ██ ████ ██ ██ ██ ████ ██ ██ ██ ██ // █████ ██ ██ ██ ██ ███████ ██ ██ ██ ██ █████ ███████ // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // ██ ██ ██ ████ ██ ██ ██ ████ ██████ ███████ ███████ function withdraw() public payable { (bool sent, bytes memory data) = payable(_receiver).call{ value: address(this).balance }(""); require(sent, "Failed to send Ether"); } function setDefaultRoyalty( address receiver, uint96 feeNumerator ) public payable onlyOwner { _receiver = receiver; _setDefaultRoyalty(_receiver, feeNumerator); } }
// 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 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.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 pragma solidity ^0.8.20; import "@openzeppelin/utils/cryptography/EIP712.sol"; import "./CurioErrorsAndEvents.sol"; contract CurioEIP712 is EIP712, CurioErrorsAndEvents { struct Claim { address wallet; uint256 tokenId; uint256 nonce; } mapping ( bytes => bool) private _signature_used; bytes32 private constant MINTKEY_TYPE_HASH = keccak256("Claim(address wallet,uint256 tokenId,uint256 nonce)"); address private _signer; address public vault; string private _migratedBaseURI; string private _unmigratedBaseURI; constructor( string memory name_, address signer_ ) EIP712(name_, "1") { _setSigner(signer_); } function _setSigner(address signer) internal { _signer = signer; } function verify( bytes calldata signature, address wallet, uint256 tokenId, uint256 nonce ) internal returns (bool) { if (_signature_used[signature]) { revert SignatureAlreadyUsed(); } bytes32 digest = _hashTypedDataV4( keccak256(abi.encode(MINTKEY_TYPE_HASH, wallet, tokenId, nonce)) ); _signature_used[signature] = true; return ECDSA.recover(digest, signature) == _signer; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface CurioErrorsAndEvents { error SoulboundNotTransferrable(); error SlotIdInvalid(); error InsufficientFunds(); error ExceedsMaxSupply(); error NotMintable(); error PublicMintUnavailable(); error InvalidSignature(); error SignatureAlreadyUsed(); error MismatchedParameters(); error TokenLocked(); error InsufficientPermissions(); event NewItemCreated(uint indexed tokenId, uint indexed slotId); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// 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 // 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 pragma solidity ^0.8.13; import {RevokableOperatorFilterer} from "./RevokableOperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION, CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title RevokableDefaultOperatorFilterer * @notice Inherits from RevokableOperatorFilterer and automatically subscribes to the default OpenSea subscription. * Note that OpenSea will disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableDefaultOperatorFilterer is RevokableOperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() RevokableOperatorFilterer(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS, CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {UpdatableOperatorFilterer} from "./UpdatableOperatorFilterer.sol"; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title RevokableOperatorFilterer * @notice This contract is meant to allow contracts to permanently skip OperatorFilterRegistry checks if desired. The * Registry itself has an "unregister" function, but if the contract is ownable, the owner can re-register at * any point. As implemented, this abstract contract allows the contract owner to permanently skip the * OperatorFilterRegistry checks by calling revokeOperatorFilterRegistry. Once done, the registry * address cannot be further updated. * Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. */ abstract contract RevokableOperatorFilterer is UpdatableOperatorFilterer { /// @dev Emitted when the registry has already been revoked. error RegistryHasBeenRevoked(); /// @dev Emitted when the initial registry address is attempted to be set to the zero address. error InitialRegistryAddressCannotBeZeroAddress(); event OperatorFilterRegistryRevoked(); bool public isOperatorFilterRegistryRevoked; /// @dev The constructor that is called when the contract is being deployed. constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) UpdatableOperatorFilterer(_registry, subscriptionOrRegistrantToCopy, subscribe) { // don't allow creating a contract with a permanently revoked registry if (_registry == address(0)) { revert InitialRegistryAddressCannotBeZeroAddress(); } } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be permanently bypassed, and the address cannot be updated again. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public override { if (msg.sender != owner()) { revert OnlyOwner(); } // if registry has been revoked, do not allow further updates if (isOperatorFilterRegistryRevoked) { revert RegistryHasBeenRevoked(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); emit OperatorFilterRegistryAddressUpdated(newRegistry); } /** * @notice Revoke the OperatorFilterRegistry address, permanently bypassing checks. OnlyOwner. */ function revokeOperatorFilterRegistry() public { if (msg.sender != owner()) { revert OnlyOwner(); } // if registry has been revoked, do not allow further updates if (isOperatorFilterRegistryRevoked) { revert RegistryHasBeenRevoked(); } // set to zero address to bypass checks operatorFilterRegistry = IOperatorFilterRegistry(address(0)); isOperatorFilterRegistryRevoked = true; emit OperatorFilterRegistryRevoked(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title UpdatableOperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. This contract allows the Owner to update the * OperatorFilterRegistry address via updateOperatorFilterRegistryAddress, including to the zero address, * which will bypass registry checks. * Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract UpdatableOperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); /// @dev Emitted when someone other than the owner is trying to call an only owner function. error OnlyOwner(); event OperatorFilterRegistryAddressUpdated(address newRegistry); IOperatorFilterRegistry public operatorFilterRegistry; /// @dev The constructor that is called when the contract is being deployed. constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) { IOperatorFilterRegistry registry = IOperatorFilterRegistry(_registry); operatorFilterRegistry = registry; // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(registry).code.length > 0) { if (subscribe) { registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { registry.register(address(this)); } } } } /** * @dev A helper function to check if the operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if the operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be bypassed. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public virtual { if (msg.sender != owner()) { revert OnlyOwner(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); emit OperatorFilterRegistryAddressUpdated(newRegistry); } /** * @dev Assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract. */ function owner() public view virtual returns (address); /** * @dev A helper function to check if the operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { IOperatorFilterRegistry registry = operatorFilterRegistry; // Check registry code length to facilitate testing in environments without a deployed registry. if (address(registry) != address(0) && address(registry).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!registry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner or approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner or approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// 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 v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// 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 pragma solidity ^0.8.0; import "@openzeppelin/interfaces/IERC165.sol"; import "@openzeppelin/interfaces/IERC1155.sol"; /// @title EIP-1155 Metadata Update Extension interface IERC4906 is IERC165, IERC1155 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol) pragma solidity ^0.8.0; import "../token/ERC1155/IERC1155.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface CurioStructs { struct Curio { // 256 bits available uint8 slotId; // 8 uint80 mintPrice; // 88 uint16 maxSupply; // 104 uint16 totalSupply; // 120 uint8 slotCollision; // 128 bool soulbound; // 136 bool mintable; // 144 bool publicMint; // 152 bool signedMint; // 160 uint16 minGeneration; // 176 uint16 maxGeneration; // 192 uint16 thread; // 208 bool locked; // 216 uint40 timestamp; // 256 } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "remappings": [ "@openzeppelin=.cache/OpenZeppelin/v4.8.3", "@operator-filter-registry=.cache/OpenSeaOperatorFilter/v1.4.1" ] }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"signer_","type":"address"},{"internalType":"string","name":"uri_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ExceedsMaxSupply","type":"error"},{"inputs":[],"name":"InitialRegistryAddressCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InsufficientPermissions","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"MismatchedParameters","type":"error"},{"inputs":[],"name":"NotMintable","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"PublicMintUnavailable","type":"error"},{"inputs":[],"name":"RegistryHasBeenRevoked","type":"error"},{"inputs":[],"name":"SignatureAlreadyUsed","type":"error"},{"inputs":[],"name":"SlotIdInvalid","type":"error"},{"inputs":[],"name":"SoulboundNotTransferrable","type":"error"},{"inputs":[],"name":"TokenLocked","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"slotId","type":"uint256"}],"name":"NewItemCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRegistry","type":"address"}],"name":"OperatorFilterRegistryAddressUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"OperatorFilterRegistryRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"PACKS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POPPETS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"_checkLocked","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"thread_","type":"uint16"}],"name":"_setCurrentThread","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"airdropCurio","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to_","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amts","type":"uint256[]"}],"name":"airdropCurioManyToMany","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to_","type":"address[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"airdropCurioOneToMany","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"compatibilityData","outputs":[{"internalType":"uint256","name":"slotId","type":"uint256"},{"internalType":"uint256","name":"slotCollision","type":"uint256"},{"internalType":"uint256","name":"minGeneration","type":"uint256"},{"internalType":"uint256","name":"maxGeneration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentThread","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"exemptAddressFromSoulbound","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"fullData","outputs":[{"components":[{"internalType":"uint8","name":"slotId","type":"uint8"},{"internalType":"uint80","name":"mintPrice","type":"uint80"},{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"uint16","name":"totalSupply","type":"uint16"},{"internalType":"uint8","name":"slotCollision","type":"uint8"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"bool","name":"mintable","type":"bool"},{"internalType":"bool","name":"publicMint","type":"bool"},{"internalType":"bool","name":"signedMint","type":"bool"},{"internalType":"uint16","name":"minGeneration","type":"uint16"},{"internalType":"uint16","name":"maxGeneration","type":"uint16"},{"internalType":"uint16","name":"thread","type":"uint16"},{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"uint40","name":"timestamp","type":"uint40"}],"internalType":"struct CurioStructs.Curio","name":"curio","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOperatorFilterRegistryRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockItem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintCurioPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"mintCurioSigned","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"mintFromPack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"mintFromPoppets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"slotId","type":"uint8"}],"name":"newCurio","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"slotId","type":"uint8"},{"internalType":"uint80","name":"mintPrice","type":"uint80"},{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"uint8","name":"slotCollision","type":"uint8"},{"internalType":"bool","name":"soulbound","type":"bool"},{"internalType":"bool","name":"mintable","type":"bool"},{"internalType":"uint16","name":"minGeneration","type":"uint16"}],"name":"newCurioMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"slotIds","type":"uint8[]"}],"name":"newThread","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"nextToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilterRegistry","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeOperatorFilterRegistry","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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"val","type":"uint16"}],"name":"setMaxGeneration","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"val","type":"uint16"}],"name":"setMaxSupply","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"val","type":"uint16"}],"name":"setMinGeneration","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint80","name":"val","type":"uint80"}],"name":"setMintPrice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"packs_","type":"address"}],"name":"setPacksAddress","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"poppets_","type":"address"}],"name":"setPoppetsAddress","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"val","type":"uint8"}],"name":"setSlotCollision","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"val","type":"uint8"}],"name":"setSlotId","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"val","type":"uint16"}],"name":"setThread","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"payable","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":"toggleMintable","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"togglePublicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"toggleSignedMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"toggleSoulbound","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistry","type":"address"}],"name":"updateOperatorFilterRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
6101406040525f6011556012805461ffff1916905534801562000020575f80fd5b5060405162004b4a38038062004b4a833981016040819052620000439162000544565b6040805180820182526001808252603160f81b60209283015286518783012060e08190527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66101008190524660a081815286517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818801819052818901959095526060810193909352608080840192909252308382018190528751808503909201825260c09384019097528051950194909420909352929091526101209190915284908490849084906daaeb6d7670e522a718067333cd4e90733cc6cdda760b79bafa08df41ecfa224f810dceb69082828289888862000143816200031a565b50600480546001600160a01b0319166001600160a01b0383161790555050600a80546001600160a01b0319166001600160a01b03851690811790915583903b1562000290578115620001f457604051633e9f1edf60e11b81523060048201526001600160a01b038481166024830152821690637d3e3dbe906044015b5f604051808303815f87803b158015620001d7575f80fd5b505af1158015620001ea573d5f803e3d5ffd5b5050505062000290565b6001600160a01b03831615620002395760405163a0af290360e01b81523060048201526001600160a01b03848116602483015282169063a0af290390604401620001bf565b604051632210724360e11b81523060048201526001600160a01b03821690634420e486906024015f604051808303815f87803b15801562000278575f80fd5b505af11580156200028b573d5f803e3d5ffd5b505050505b5050506001600160a01b0384169050620002bd5760405163c49d17ad60e01b815260040160405180910390fd5b505050620002da620002d46200032c60201b60201c565b62000330565b600f620002e885826200067c565b506010620002f784826200067c565b505050505062000310336101f46200038160201b60201c565b5050505062000744565b60026200032882826200067c565b5050565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6127106001600160601b0382161115620003f55760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b0382166200044d5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620003ec565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112620004aa575f80fd5b81516001600160401b0380821115620004c757620004c762000486565b604051601f8301601f19908116603f01168101908282118183101715620004f257620004f262000486565b816040528381526020925086838588010111156200050e575f80fd5b5f91505b8382101562000531578582018301518183018401529082019062000512565b5f93810190920192909252949350505050565b5f805f806080858703121562000558575f80fd5b84516001600160401b03808211156200056f575f80fd5b6200057d888389016200049a565b9550602087015191508082111562000593575f80fd5b620005a1888389016200049a565b604088015190955091506001600160a01b0382168214620005c0575f80fd5b606087015191935080821115620005d5575f80fd5b50620005e4878288016200049a565b91505092959194509250565b600181811c908216806200060557607f821691505b6020821081036200062457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000677575f81815260208120601f850160051c81016020861015620006525750805b601f850160051c820191505b8181101562000673578281556001016200065e565b5050505b505050565b81516001600160401b0381111562000698576200069862000486565b620006b081620006a98454620005f0565b846200062a565b602080601f831160018114620006e6575f8415620006ce5750858301515b5f19600386901b1c1916600185901b17855562000673565b5f85815260208120601f198616915b828110156200071657888601518255948401946001909101908401620006f5565b50858210156200073457878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e05161010051610120516143be6200078c5f395f61300001525f61304f01525f61302a01525f612f8301525f612fad01525f612fd701526143be5ff3fe60806040526004361061036f575f3560e01c806379d82b51116101c8578063c626d4b0116100fd578063f2fde38b1161009d578063f626e9711161006d578063f626e97114610951578063f84502df14610964578063fad8a5a214610977578063fbfa77cf146109a3575f80fd5b8063f2fde38b146108ed578063f35be6fe1461090c578063f3647d0f1461091f578063f5298aca14610932575f80fd5b8063e6f21628116100d8578063e6f216281461081d578063e985e9c51461088f578063ecba222a146108ae578063f242432a146108ce575f80fd5b8063c626d4b0146107cc578063caed35c6146107eb578063df2b91191461080a575f80fd5b806399e8ab6811610168578063aff2439711610143578063aff2439714610768578063b03396301461077b578063b0ccc31e1461078e578063b8d1e532146107ad575f80fd5b806399e8ab6814610723578063a22cb46514610736578063a9194ce014610755575f80fd5b80638da5cb5b116101a35780638da5cb5b146106d357806393464ab3146106e75780639499ac54146106fa57806395d89b411461070f575f80fd5b806379d82b511461069a57806381decc7b146106ad57806385837689146106c0575f80fd5b806332c577e6116102a95780635943d986116102495780636b20c454116102195780636b20c454146106415780636c19e78314610660578063715018a6146106735780637804244f14610687575f80fd5b80635943d986146105e85780635ef9432a146105fb5780636650cc8b1461060f5780636939139b1461062e575f80fd5b806348ab4ed41161028457806348ab4ed4146105835780634e1273f41461059657806351a5a52f146105c25780635716bc30146105d5575f80fd5b806332c577e61461054957806339b176da146105685780633ccfd60b1461057b575f80fd5b806307aff0181161031457806311240ab8116102ef57806311240ab8146104c657806317542cf7146104d95780632a55205a146104ec5780632eb2c2d61461052a575f80fd5b806307aff0181461045d5780630e89341c146104945780630f546802146104b3575f80fd5b806302fe53051161034f57806302fe53051461040157806304634d8d146104165780630468265e1461042957806306fdde031461043c575f80fd5b8062fb0d9d14610373578062fdd58e146103a557806301ffc9a7146103d2575b5f80fd5b34801561037e575f80fd5b5060125461038d9061ffff1681565b60405161ffff90911681526020015b60405180910390f35b3480156103b0575f80fd5b506103c46103bf366004613373565b6109c2565b60405190815260200161039c565b3480156103dd575f80fd5b506103f16103ec3660046133b0565b610a59565b604051901515815260200161039c565b61041461040f366004613408565b610a8c565b005b610414610424366004613446565b610b1f565b610414610437366004613486565b610b53565b348015610447575f80fd5b50610450610b92565b60405161039c91906134e0565b348015610468575f80fd5b50600c5461047c906001600160a01b031681565b6040516001600160a01b03909116815260200161039c565b34801561049f575f80fd5b506104506104ae366004613486565b610c1e565b6104146104c1366004613486565b610cb0565b6104146104d4366004613508565b610cef565b6104146104e7366004613486565b610d39565b3480156104f7575f80fd5b5061050b610506366004613532565b610d78565b604080516001600160a01b03909316835260208301919091520161039c565b348015610535575f80fd5b50610414610544366004613691565b610e24565b348015610554575f80fd5b50610414610563366004613486565b610e8e565b610414610576366004613744565b610ec7565b610414610efd565b610414610591366004613765565b610f99565b3480156105a1575f80fd5b506105b56105b03660046137b1565b61102b565b60405161039c91906138ae565b6104146105d03660046138d0565b611152565b6104146105e33660046138f1565b611186565b6104146105f636600461394a565b6111a6565b348015610606575f80fd5b506104146111f5565b34801561061a575f80fd5b50600d5461047c906001600160a01b031681565b61041461063c366004613991565b611299565b34801561064c575f80fd5b5061041461065b3660046139c3565b6112f0565b61041461066e366004613a31565b611338565b34801561067e575f80fd5b5061041461135e565b610414610695366004613a57565b611371565b6104146106a8366004613744565b6113cb565b6104146106bb366004613a31565b61140c565b6104146106ce366004613adc565b611432565b3480156106de575f80fd5b5061047c611451565b6104146106f5366004613486565b611469565b348015610705575f80fd5b506103c460115481565b34801561071a575f80fd5b506104506114a8565b6104146107313660046138d0565b6114b5565b348015610741575f80fd5b50610414610750366004613af5565b6114e9565b610414610763366004613a31565b6114fd565b610414610776366004613486565b61152c565b610414610789366004613373565b6115bc565b348015610799575f80fd5b50600a5461047c906001600160a01b031681565b3480156107b8575f80fd5b506104146107c7366004613a31565b6115e9565b3480156107d7575f80fd5b506104146107e6366004613b1f565b6116a1565b3480156107f6575f80fd5b50610414610805366004613991565b611722565b610414610818366004613a31565b61178b565b348015610828575f80fd5b5061086f610837366004613486565b5f9081526014602052604090205460ff80821692600160781b83049091169161ffff600160a01b8204811692600160b01b9092041690565b60408051948552602085019390935291830152606082015260800161039c565b34801561089a575f80fd5b506103f16108a9366004613b6d565b6117b1565b3480156108b9575f80fd5b50600a546103f190600160a01b900460ff1681565b3480156108d9575f80fd5b506104146108e8366004613b95565b6117fa565b3480156108f8575f80fd5b50610414610907366004613a31565b611834565b61041461091a366004613bf4565b6118aa565b61041461092d366004613744565b611983565b34801561093d575f80fd5b5061041461094c366004613c86565b6119c4565b61041461095f366004613486565b611a07565b610414610972366004613744565b611a5b565b348015610982575f80fd5b50610996610991366004613486565b611a9c565b60405161039c9190613cb6565b3480156109ae575f80fd5b5060055461047c906001600160a01b031681565b5f6001600160a01b038316610a315760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b505f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6001600160e01b03198216632483248360e11b1480610a7d5750610a7d82611ba8565b80610a535750610a5382611bf7565b610a94611c1b565b610ad282828080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611c7a92505050565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c5f6001601154610b039190613dd0565b6040805192835260208301919091520160405180910390a15050565b610b27611c1b565b600e80546001600160a01b0319166001600160a01b038416908117909155610b4f9082611c86565b5050565b80610b5d81610e8e565b610b65611c1b565b505f908152601460205260409020805460ff60881b198116600160881b9182900460ff1615909102179055565b600f8054610b9f90613de3565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcb90613de3565b8015610c165780601f10610bed57610100808354040283529160200191610c16565b820191905f5260205f20905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b606060028054610c2d90613de3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5990613de3565b8015610ca45780601f10610c7b57610100808354040283529160200191610ca4565b820191905f5260205f20905b815481529060010190602001808311610c8757829003601f168201915b50505050509050919050565b80610cba81610e8e565b610cc2611c1b565b505f908152601460205260409020805460ff60981b198116600160981b9182900460ff1615909102179055565b81610cf981610e8e565b610d01611c1b565b505f9182526014602052604090912080546001600160501b03909216610100026affffffffffffffffffff0019909216919091179055565b80610d4381610e8e565b610d4b611c1b565b505f908152601460205260409020805460ff60801b198116600160801b9182900460ff1615909102179055565b5f8281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610dec5750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610e0a906001600160601b031687613e1b565b610e149190613e32565b91519350909150505b9250929050565b846001600160a01b0381163314610e3e57610e3e33611d83565b835184905f5b81811015610e7657610e6e838281518110610e6157610e61613e51565b6020026020010151611e42565b600101610e44565b50610e848888888888611e8e565b5050505050505050565b5f81815260146020526040902054600160d01b900460ff1615610ec457604051635a8181f760e01b815260040160405180910390fd5b50565b610ecf611c1b565b5f91825260146020526040909120805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b600e546040515f9182916001600160a01b039091169047908381818185875af1925050503d805f8114610f4b576040519150601f19603f3d011682016040523d82523d5f602084013e610f50565b606091505b509150915081610b4f5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610a28565b81610fa381610e8e565b5f610fad84611a9c565b9050610fbc8686338787611ed3565b610fd957604051638baa579f60e01b815260040160405180910390fd5b80602001516001600160501b03163410156110075760405163356680b760e01b815260040160405180910390fd5b611023335b85600160405180602001604052805f815250612016565b505050505050565b606081518351146110905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610a28565b5f83516001600160401b038111156110aa576110aa613552565b6040519080825280602002602001820160405280156110d3578160200160208202803683370190505b5090505f5b845181101561114a5761111d8582815181106110f6576110f6613e51565b602002602001015185838151811061111057611110613e51565b60200260200101516109c2565b82828151811061112f5761112f613e51565b602090810291909101015261114381613e65565b90506110d8565b509392505050565b8161115c81610e8e565b611164611c1b565b505f91825260146020526040909120805460ff191660ff909216919091179055565b61118e611c1b565b6012805461ffff191661ffff92909216919091179055565b6111ae611c1b565b806111b881610e8e565b825f5b81811015611023576111ed8686838181106111d8576111d8613e51565b905060200201602081019061100c9190613a31565b6001016111bb565b6111fd611451565b6001600160a01b0316336001600160a01b03161461122e57604051635fc483c560e01b815260040160405180910390fd5b600a54600160a01b900460ff161561125957604051631551a48f60e11b815260040160405180910390fd5b600a80546001600160a81b031916600160a01b1790556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad16905f90a1565b805f5b818110156112ea576112ac6132e5565b8484838181106112be576112be613e51565b90506020020160208101906112d39190613adc565b60ff1681526112e18161212a565b5060010161129c565b50505050565b6001600160a01b03831633148061130c575061130c83336117b1565b6113285760405162461bcd60e51b8152600401610a2890613e7d565b61133383838361239f565b505050565b611340611c1b565b600480546001600160a01b0319166001600160a01b03831617905550565b611366611c1b565b61136f5f612531565b565b611379611c1b565b6113816132e5565b60ff80891682526001600160501b038816602083015261ffff8088166040840152908616608083015284151560a083015283151560c08301528216610120820152610e848161212a565b816113d581610e8e565b6113dd611c1b565b505f91825260146020526040909120805461ffff909216600160581b0261ffff60581b19909216919091179055565b611414611c1b565b600c80546001600160a01b0319166001600160a01b03831617905550565b61143a611c1b565b6114426132e5565b60ff82168152610b4f8161212a565b5f611464600b546001600160a01b031690565b905090565b8061147381610e8e565b61147b611c1b565b505f908152601460205260409020805460ff60901b198116600160901b9182900460ff1615909102179055565b60108054610b9f90613de3565b6114bd611c1b565b5f91825260146020526040909120805460ff909216600160781b0260ff60781b19909216919091179055565b816114f381611d83565b6113338383612582565b611505611c1b565b610ec4816001600160a01b03165f908152601560205260409020805460ff19166001179055565b8061153681610e8e565b5f61154083611a9c565b90508060c00151158061155557508060e00151155b1561157357604051637338bcbd60e11b815260040160405180910390fd5b80602001516001600160501b03163410156115a15760405163356680b760e01b815260040160405180910390fd5b6113333384600160405180602001604052805f815250612016565b6115c4611c1b565b806115ce81610e8e565b6113338383600160405180602001604052805f815250612016565b6115f1611451565b6001600160a01b0316336001600160a01b03161461162257604051635fc483c560e01b815260040160405180910390fd5b600a54600160a01b900460ff161561164d57604051631551a48f60e11b815260040160405180910390fd5b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b600d546001600160a01b0316336001600160a01b0316146116d55760405163061cbdd360e51b815260040160405180910390fd5b805f5b8181101561171b57611713858585848181106116f6576116f6613e51565b90506020020135600160405180602001604052805f815250612016565b6001016116d8565b5050505050565b600c546001600160a01b0316336001600160a01b0316146117565760405163061cbdd360e51b815260040160405180910390fd5b805f5b818110156112ea57600c54611783906001600160a01b03168585848181106116f6576116f6613e51565b600101611759565b611793611c1b565b600d80546001600160a01b0319166001600160a01b03831617905550565b6001600160a01b038083165f90815260016020908152604080832093851683529290529081205460ff16806117f35750600c546001600160a01b038381169116145b9392505050565b846001600160a01b03811633146118145761181433611d83565b8361181e81611e42565b61182b878787878761258d565b50505050505050565b61183c611c1b565b6001600160a01b0381166118a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a28565b610ec481612531565b6118b2611c1b565b8483811415806118c25750808214155b156118e05760405163a9b1729f60e01b815260040160405180910390fd5b5f5b81811015610e845761190b8686838181106118ff576118ff613e51565b90506020020135610e8e565b61197b88888381811061192057611920613e51565b90506020020160208101906119359190613a31565b87878481811061194757611947613e51565b9050602002013586868581811061196057611960613e51565b9050602002013560405180602001604052805f815250612016565b6001016118e2565b8161198d81610e8e565b611995611c1b565b505f91825260146020526040909120805461ffff909216600160c01b0261ffff60c01b19909216919091179055565b6001600160a01b0383163314806119e057506119e083336117b1565b6119fc5760405162461bcd60e51b8152600401610a2890613e7d565b6113338383836125d2565b611a0f611c1b565b5f90815260146020526040902080546fff00000000000000000000000000ffff60581b198116600160681b600160d01b60ff60d01b1990931683170461ffff16600160581b0217179055565b81611a6581610e8e565b611a6d611c1b565b505f91825260146020526040909120805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b611aa46132e5565b505f9081526014602090815260409182902082516101c081018452905460ff80821683526101008083046001600160501b031694840194909452600160581b820461ffff90811695840195909552600160681b820485166060840152600160781b820481166080840152600160801b82048116151560a0840152600160881b82048116151560c0840152600160901b82048116151560e0840152600160981b82048116151593830193909352600160a01b81048416610120830152600160b01b81048416610140830152600160c01b8104909316610160820152600160d01b83049091161515610180820152600160d81b90910464ffffffffff166101a082015290565b5f6001600160e01b03198216636cdb3d1360e11b1480611bd857506001600160e01b031982166303a24d0760e21b145b80610a5357506301ffc9a760e01b6001600160e01b0319831614610a53565b5f6001600160e01b0319821663152a902d60e11b1480610a535750610a5382611ba8565b33611c24611451565b6001600160a01b03161461136f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b6002610b4f8282613f10565b6127106001600160601b0382161115611cf45760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610a28565b6001600160a01b038216611d4a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610a28565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b600a546001600160a01b03168015801590611da757505f816001600160a01b03163b115b15610b4f57604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015611df6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e1a9190613fcb565b610b4f57604051633b79c77360e21b81526001600160a01b0383166004820152602401610a28565b5f81815260146020526040902054600160801b900460ff1615610ec457335f9081526015602052604090205460ff16610ec45760405163d745569560e01b815260040160405180910390fd5b6001600160a01b038516331480611eaa5750611eaa85336117b1565b611ec65760405162461bcd60e51b8152600401610a2890613e7d565b61171b85858585856126e3565b5f60038686604051611ee6929190613fe6565b9081526040519081900360200190205460ff1615611f175760405163900bb2c960e01b815260040160405180910390fd5b604080517fa7356b5574e8b18140cff2900b1c2ece457143ea668bb5c2373b2f15991f8b5560208201526001600160a01b0386169181019190915260608101849052608081018390525f90611f849060a00160405160208183030381529060405280519060200120612880565b9050600160038888604051611f9a929190613fe6565b9081526040805160209281900383018120805460ff191694151594909417909355600454601f8a018390048302840183019091528883526001600160a01b031691612001918491908b908b90819084018382808284375f920191909152506128cc92505050565b6001600160a01b031614979650505050505050565b6001600160a01b0384166120765760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610a28565b335f612081856128e6565b90505f61208d856128e6565b905061209d835f8985858961292f565b5f868152602081815260408083206001600160a01b038b168452909152812080548792906120cc908490613ff5565b909155505060408051878152602081018790526001600160a01b03808a16925f92918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461182b835f89898989612b50565b60125f9054906101000a900461ffff1681610160019061ffff16908161ffff168152505042816101a0019064ffffffffff16908164ffffffffff16815250508060145f60115481526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a8154816001600160501b0302191690836001600160501b031602179055506040820151815f01600b6101000a81548161ffff021916908361ffff1602179055506060820151815f01600d6101000a81548161ffff021916908361ffff1602179055506080820151815f01600f6101000a81548160ff021916908360ff16021790555060a0820151815f0160106101000a81548160ff02191690831515021790555060c0820151815f0160116101000a81548160ff02191690831515021790555060e0820151815f0160126101000a81548160ff021916908315150217905550610100820151815f0160136101000a81548160ff021916908315150217905550610120820151815f0160146101000a81548161ffff021916908361ffff160217905550610140820151815f0160166101000a81548161ffff021916908361ffff160217905550610160820151815f0160186101000a81548161ffff021916908361ffff160217905550610180820151815f01601a6101000a81548160ff0219169083151502179055506101a0820151815f01601b6101000a81548164ffffffffff021916908364ffffffffff160217905550905050805f015160ff166011547f3fe04496bf546cb2f336546df634517af329855430af324f9bb9f4d7ad75813160405160405180910390a350601180546001019055565b6001600160a01b0383166123c55760405162461bcd60e51b8152600401610a2890614008565b80518251146123e65760405162461bcd60e51b8152600401610a289061404b565b5f33905061240681855f868660405180602001604052805f81525061292f565b5f5b83518110156124c6575f84828151811061242457612424613e51565b602002602001015190505f84838151811061244157612441613e51565b6020908102919091018101515f84815280835260408082206001600160a01b038c1683529093529190912054909150818110156124905760405162461bcd60e51b8152600401610a2890614093565b5f928352602083815260408085206001600160a01b038b16865290915290922091039055806124be81613e65565b915050612408565b505f6001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516125169291906140d7565b60405180910390a460408051602081019091525f90526112ea565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b610b4f338383612caa565b6001600160a01b0385163314806125a957506125a985336117b1565b6125c55760405162461bcd60e51b8152600401610a2890613e7d565b61171b8585858585612d89565b6001600160a01b0383166125f85760405162461bcd60e51b8152600401610a2890614008565b335f612603846128e6565b90505f61260f846128e6565b905061262d83875f858560405180602001604052805f81525061292f565b5f858152602081815260408083206001600160a01b038a1684529091529020548481101561266d5760405162461bcd60e51b8152600401610a2890614093565b5f868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a460408051602081019091525f905261182b565b81518351146127045760405162461bcd60e51b8152600401610a289061404b565b6001600160a01b03841661272a5760405162461bcd60e51b8152600401610a2890614104565b3361273981878787878761292f565b5f5b845181101561281a575f85828151811061275757612757613e51565b602002602001015190505f85838151811061277457612774613e51565b6020908102919091018101515f84815280835260408082206001600160a01b038e1683529093529190912054909150818110156127c35760405162461bcd60e51b8152600401610a2890614149565b5f838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906127ff908490613ff5565b925050819055505050508061281390613e65565b905061273b565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161286a9291906140d7565b60405180910390a4611023818787878787612ebd565b5f610a5361288c612f77565b8360405161190160f01b602082015260228101839052604281018290525f9060620160405160208183030381529060405280519060200120905092915050565b5f805f6128d985856130a0565b9150915061114a816130df565b6040805160018082528183019092526060915f91906020808301908036833701905050905082815f8151811061291e5761291e613e51565b602090810291909101015292915050565b6001600160a01b038516612ab05782515f5b81811015612aa9575f60145f87848151811061295f5761295f613e51565b602002602001015181526020019081526020015f20905061ffff8016815f01600d9054906101000a900461ffff1661ffff168684815181106129a3576129a3613e51565b60200260200101516129b59190613ff5565b11156129d45760405163c30436e960e01b815260040160405180910390fd5b8054600160581b900461ffff1615612a4a5780548551600160581b90910461ffff1690869084908110612a0957612a09613e51565b60209081029190910101518254612a2b9190600160681b900461ffff16613ff5565b1115612a4a5760405163c30436e960e01b815260040160405180910390fd5b848281518110612a5c57612a5c613e51565b6020026020010151815f01600d8282829054906101000a900461ffff16612a839190614193565b92506101000a81548161ffff021916908361ffff16021790555081600101915050612941565b5050611023565b6001600160a01b038416612b4b5782515f5b81811015612aa957838181518110612adc57612adc613e51565b602002602001015160145f878481518110612af957612af9613e51565b602002602001015181526020019081526020015f205f01600d8282829054906101000a900461ffff16612b2c91906141b5565b92506101000a81548161ffff021916908361ffff160217905550612ac2565b611023565b6001600160a01b0384163b156110235760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612b9490899089908890889088906004016141d0565b6020604051808303815f875af1925050508015612bce575060408051601f3d908101601f19168201909252612bcb91810190614214565b60015b612c7a57612bda61422f565b806308c379a003612c135750612bee614247565b80612bf95750612c15565b8060405162461bcd60e51b8152600401610a2891906134e0565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610a28565b6001600160e01b0319811663f23a6e6160e01b1461182b5760405162461bcd60e51b8152600401610a28906142cf565b816001600160a01b0316836001600160a01b031603612d1d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610a28565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416612daf5760405162461bcd60e51b8152600401610a2890614104565b335f612dba856128e6565b90505f612dc6856128e6565b9050612dd683898985858961292f565b5f868152602081815260408083206001600160a01b038c16845290915290205485811015612e165760405162461bcd60e51b8152600401610a2890614149565b5f878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612e52908490613ff5565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612eb2848a8a8a8a8a612b50565b505050505050505050565b6001600160a01b0384163b156110235760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612f019089908990889088908890600401614317565b6020604051808303815f875af1925050508015612f3b575060408051601f3d908101601f19168201909252612f3891810190614214565b60015b612f4757612bda61422f565b6001600160e01b0319811663bc197c8160e01b1461182b5760405162461bcd60e51b8152600401610a28906142cf565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612fcf57507f000000000000000000000000000000000000000000000000000000000000000046145b15612ff957507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b5f8082516041036130d4576020830151604084015160608501515f1a6130c887828585613228565b94509450505050610e1d565b505f90506002610e1d565b5f8160048111156130f2576130f2614374565b036130fa5750565b600181600481111561310e5761310e614374565b0361315b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a28565b600281600481111561316f5761316f614374565b036131bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a28565b60038160048111156131d0576131d0614374565b03610ec45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a28565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561325d57505f905060036132dc565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156132ae573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381166132d6575f600192509250506132dc565b91505f90505b94509492505050565b604080516101c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081019190915290565b80356001600160a01b038116811461336e575f80fd5b919050565b5f8060408385031215613384575f80fd5b61338d83613358565b946020939093013593505050565b6001600160e01b031981168114610ec4575f80fd5b5f602082840312156133c0575f80fd5b81356117f38161339b565b5f8083601f8401126133db575f80fd5b5081356001600160401b038111156133f1575f80fd5b602083019150836020828501011115610e1d575f80fd5b5f8060208385031215613419575f80fd5b82356001600160401b0381111561342e575f80fd5b61343a858286016133cb565b90969095509350505050565b5f8060408385031215613457575f80fd5b61346083613358565b915060208301356001600160601b038116811461347b575f80fd5b809150509250929050565b5f60208284031215613496575f80fd5b5035919050565b5f81518084525f5b818110156134c1576020818501810151868301820152016134a5565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f6117f3602083018461349d565b80356001600160501b038116811461336e575f80fd5b5f8060408385031215613519575f80fd5b82359150613529602084016134f2565b90509250929050565b5f8060408385031215613543575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b601f8201601f191681016001600160401b038111828210171561358b5761358b613552565b6040525050565b5f6001600160401b038211156135aa576135aa613552565b5060051b60200190565b5f82601f8301126135c3575f80fd5b813560206135d082613592565b6040516135dd8282613566565b83815260059390931b85018201928281019150868411156135fc575f80fd5b8286015b848110156136175780358352918301918301613600565b509695505050505050565b5f82601f830112613631575f80fd5b81356001600160401b0381111561364a5761364a613552565b604051613661601f8301601f191660200182613566565b818152846020838601011115613675575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a086880312156136a5575f80fd5b6136ae86613358565b94506136bc60208701613358565b935060408601356001600160401b03808211156136d7575f80fd5b6136e389838a016135b4565b945060608801359150808211156136f8575f80fd5b61370489838a016135b4565b93506080880135915080821115613719575f80fd5b5061372688828901613622565b9150509295509295909350565b803561ffff8116811461336e575f80fd5b5f8060408385031215613755575f80fd5b8235915061352960208401613733565b5f805f8060608587031215613778575f80fd5b84356001600160401b0381111561378d575f80fd5b613799878288016133cb565b90989097506020870135966040013595509350505050565b5f80604083850312156137c2575f80fd5b82356001600160401b03808211156137d8575f80fd5b818501915085601f8301126137eb575f80fd5b813560206137f882613592565b6040516138058282613566565b83815260059390931b8501820192828101915089841115613824575f80fd5b948201945b838610156138495761383a86613358565b82529482019490820190613829565b9650508601359250508082111561385e575f80fd5b5061386b858286016135b4565b9150509250929050565b5f8151808452602080850194508084015f5b838110156138a357815187529582019590820190600101613887565b509495945050505050565b602081525f6117f36020830184613875565b803560ff8116811461336e575f80fd5b5f80604083850312156138e1575f80fd5b82359150613529602084016138c0565b5f60208284031215613901575f80fd5b6117f382613733565b5f8083601f84011261391a575f80fd5b5081356001600160401b03811115613930575f80fd5b6020830191508360208260051b8501011115610e1d575f80fd5b5f805f6040848603121561395c575f80fd5b83356001600160401b03811115613971575f80fd5b61397d8682870161390a565b909790965060209590950135949350505050565b5f80602083850312156139a2575f80fd5b82356001600160401b038111156139b7575f80fd5b61343a8582860161390a565b5f805f606084860312156139d5575f80fd5b6139de84613358565b925060208401356001600160401b03808211156139f9575f80fd5b613a05878388016135b4565b93506040860135915080821115613a1a575f80fd5b50613a27868287016135b4565b9150509250925092565b5f60208284031215613a41575f80fd5b6117f382613358565b8015158114610ec4575f80fd5b5f805f805f805f60e0888a031215613a6d575f80fd5b613a76886138c0565b9650613a84602089016134f2565b9550613a9260408901613733565b9450613aa0606089016138c0565b93506080880135613ab081613a4a565b925060a0880135613ac081613a4a565b9150613ace60c08901613733565b905092959891949750929550565b5f60208284031215613aec575f80fd5b6117f3826138c0565b5f8060408385031215613b06575f80fd5b613b0f83613358565b9150602083013561347b81613a4a565b5f805f60408486031215613b31575f80fd5b613b3a84613358565b925060208401356001600160401b03811115613b54575f80fd5b613b608682870161390a565b9497909650939450505050565b5f8060408385031215613b7e575f80fd5b613b8783613358565b915061352960208401613358565b5f805f805f60a08688031215613ba9575f80fd5b613bb286613358565b9450613bc060208701613358565b9350604086013592506060860135915060808601356001600160401b03811115613be8575f80fd5b61372688828901613622565b5f805f805f8060608789031215613c09575f80fd5b86356001600160401b0380821115613c1f575f80fd5b613c2b8a838b0161390a565b90985096506020890135915080821115613c43575f80fd5b613c4f8a838b0161390a565b90965094506040890135915080821115613c67575f80fd5b50613c7489828a0161390a565b979a9699509497509295939492505050565b5f805f60608486031215613c98575f80fd5b613ca184613358565b95602085013595506040909401359392505050565b815160ff1681526101c081016020830151613cdc60208401826001600160501b03169052565b506040830151613cf2604084018261ffff169052565b506060830151613d08606084018261ffff169052565b506080830151613d1d608084018260ff169052565b5060a0830151613d3160a084018215159052565b5060c0830151613d4560c084018215159052565b5060e0830151613d5960e084018215159052565b50610100838101511515908301526101208084015161ffff90811691840191909152610140808501518216908401526101608085015190911690830152610180808401511515908301526101a09283015164ffffffffff16929091019190915290565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610a5357610a53613dbc565b600181811c90821680613df757607f821691505b602082108103613e1557634e487b7160e01b5f52602260045260245ffd5b50919050565b8082028115828204841417610a5357610a53613dbc565b5f82613e4c57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f60018201613e7657613e76613dbc565b5060010190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b601f821115611333575f81815260208120601f850160051c81016020861015613ef15750805b601f850160051c820191505b8181101561102357828155600101613efd565b81516001600160401b03811115613f2957613f29613552565b613f3d81613f378454613de3565b84613ecb565b602080601f831160018114613f70575f8415613f595750858301515b5f19600386901b1c1916600185901b178555611023565b5f85815260208120601f198616915b82811015613f9e57888601518255948401946001909101908401613f7f565b5085821015613fbb57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215613fdb575f80fd5b81516117f381613a4a565b818382375f9101908152919050565b80820180821115610a5357610a53613dbc565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081525f6140e96040830185613875565b82810360208401526140fb8185613875565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b61ffff8181168382160190808211156141ae576141ae613dbc565b5092915050565b61ffff8281168282160390808211156141ae576141ae613dbc565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f906142099083018461349d565b979650505050505050565b5f60208284031215614224575f80fd5b81516117f38161339b565b5f60033d111561309d5760045f803e505f5160e01c90565b5f60443d10156142545790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561428357505050505090565b828501915081518181111561429b5750505050505090565b843d87010160208285010111156142b55750505050505090565b6142c460208286010187613566565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190525f9061434290830186613875565b82810360608401526143548186613875565b90508281036080840152614368818561349d565b98975050505050505050565b634e487b7160e01b5f52602160045260245ffdfea26469706673582212203822446962acce0630f6056175cac49732122e0c76c83fc5602229aa54d3fc2864736f6c63430008140033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000001783091457be14521c9c3873ccf749984d33805800000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000013506c61677565506f7070657473437572696f73000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006435552494f530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c697066733a2f2f62616679626569626d686e72326178336d7737666371356b366a36656b32746f726b6c6f7867723761716a6165616e7271726f6c6a6362796b74612f7b69647d2e6a736f6e0000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061036f575f3560e01c806379d82b51116101c8578063c626d4b0116100fd578063f2fde38b1161009d578063f626e9711161006d578063f626e97114610951578063f84502df14610964578063fad8a5a214610977578063fbfa77cf146109a3575f80fd5b8063f2fde38b146108ed578063f35be6fe1461090c578063f3647d0f1461091f578063f5298aca14610932575f80fd5b8063e6f21628116100d8578063e6f216281461081d578063e985e9c51461088f578063ecba222a146108ae578063f242432a146108ce575f80fd5b8063c626d4b0146107cc578063caed35c6146107eb578063df2b91191461080a575f80fd5b806399e8ab6811610168578063aff2439711610143578063aff2439714610768578063b03396301461077b578063b0ccc31e1461078e578063b8d1e532146107ad575f80fd5b806399e8ab6814610723578063a22cb46514610736578063a9194ce014610755575f80fd5b80638da5cb5b116101a35780638da5cb5b146106d357806393464ab3146106e75780639499ac54146106fa57806395d89b411461070f575f80fd5b806379d82b511461069a57806381decc7b146106ad57806385837689146106c0575f80fd5b806332c577e6116102a95780635943d986116102495780636b20c454116102195780636b20c454146106415780636c19e78314610660578063715018a6146106735780637804244f14610687575f80fd5b80635943d986146105e85780635ef9432a146105fb5780636650cc8b1461060f5780636939139b1461062e575f80fd5b806348ab4ed41161028457806348ab4ed4146105835780634e1273f41461059657806351a5a52f146105c25780635716bc30146105d5575f80fd5b806332c577e61461054957806339b176da146105685780633ccfd60b1461057b575f80fd5b806307aff0181161031457806311240ab8116102ef57806311240ab8146104c657806317542cf7146104d95780632a55205a146104ec5780632eb2c2d61461052a575f80fd5b806307aff0181461045d5780630e89341c146104945780630f546802146104b3575f80fd5b806302fe53051161034f57806302fe53051461040157806304634d8d146104165780630468265e1461042957806306fdde031461043c575f80fd5b8062fb0d9d14610373578062fdd58e146103a557806301ffc9a7146103d2575b5f80fd5b34801561037e575f80fd5b5060125461038d9061ffff1681565b60405161ffff90911681526020015b60405180910390f35b3480156103b0575f80fd5b506103c46103bf366004613373565b6109c2565b60405190815260200161039c565b3480156103dd575f80fd5b506103f16103ec3660046133b0565b610a59565b604051901515815260200161039c565b61041461040f366004613408565b610a8c565b005b610414610424366004613446565b610b1f565b610414610437366004613486565b610b53565b348015610447575f80fd5b50610450610b92565b60405161039c91906134e0565b348015610468575f80fd5b50600c5461047c906001600160a01b031681565b6040516001600160a01b03909116815260200161039c565b34801561049f575f80fd5b506104506104ae366004613486565b610c1e565b6104146104c1366004613486565b610cb0565b6104146104d4366004613508565b610cef565b6104146104e7366004613486565b610d39565b3480156104f7575f80fd5b5061050b610506366004613532565b610d78565b604080516001600160a01b03909316835260208301919091520161039c565b348015610535575f80fd5b50610414610544366004613691565b610e24565b348015610554575f80fd5b50610414610563366004613486565b610e8e565b610414610576366004613744565b610ec7565b610414610efd565b610414610591366004613765565b610f99565b3480156105a1575f80fd5b506105b56105b03660046137b1565b61102b565b60405161039c91906138ae565b6104146105d03660046138d0565b611152565b6104146105e33660046138f1565b611186565b6104146105f636600461394a565b6111a6565b348015610606575f80fd5b506104146111f5565b34801561061a575f80fd5b50600d5461047c906001600160a01b031681565b61041461063c366004613991565b611299565b34801561064c575f80fd5b5061041461065b3660046139c3565b6112f0565b61041461066e366004613a31565b611338565b34801561067e575f80fd5b5061041461135e565b610414610695366004613a57565b611371565b6104146106a8366004613744565b6113cb565b6104146106bb366004613a31565b61140c565b6104146106ce366004613adc565b611432565b3480156106de575f80fd5b5061047c611451565b6104146106f5366004613486565b611469565b348015610705575f80fd5b506103c460115481565b34801561071a575f80fd5b506104506114a8565b6104146107313660046138d0565b6114b5565b348015610741575f80fd5b50610414610750366004613af5565b6114e9565b610414610763366004613a31565b6114fd565b610414610776366004613486565b61152c565b610414610789366004613373565b6115bc565b348015610799575f80fd5b50600a5461047c906001600160a01b031681565b3480156107b8575f80fd5b506104146107c7366004613a31565b6115e9565b3480156107d7575f80fd5b506104146107e6366004613b1f565b6116a1565b3480156107f6575f80fd5b50610414610805366004613991565b611722565b610414610818366004613a31565b61178b565b348015610828575f80fd5b5061086f610837366004613486565b5f9081526014602052604090205460ff80821692600160781b83049091169161ffff600160a01b8204811692600160b01b9092041690565b60408051948552602085019390935291830152606082015260800161039c565b34801561089a575f80fd5b506103f16108a9366004613b6d565b6117b1565b3480156108b9575f80fd5b50600a546103f190600160a01b900460ff1681565b3480156108d9575f80fd5b506104146108e8366004613b95565b6117fa565b3480156108f8575f80fd5b50610414610907366004613a31565b611834565b61041461091a366004613bf4565b6118aa565b61041461092d366004613744565b611983565b34801561093d575f80fd5b5061041461094c366004613c86565b6119c4565b61041461095f366004613486565b611a07565b610414610972366004613744565b611a5b565b348015610982575f80fd5b50610996610991366004613486565b611a9c565b60405161039c9190613cb6565b3480156109ae575f80fd5b5060055461047c906001600160a01b031681565b5f6001600160a01b038316610a315760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b505f818152602081815260408083206001600160a01b03861684529091529020545b92915050565b5f6001600160e01b03198216632483248360e11b1480610a7d5750610a7d82611ba8565b80610a535750610a5382611bf7565b610a94611c1b565b610ad282828080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250611c7a92505050565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c5f6001601154610b039190613dd0565b6040805192835260208301919091520160405180910390a15050565b610b27611c1b565b600e80546001600160a01b0319166001600160a01b038416908117909155610b4f9082611c86565b5050565b80610b5d81610e8e565b610b65611c1b565b505f908152601460205260409020805460ff60881b198116600160881b9182900460ff1615909102179055565b600f8054610b9f90613de3565b80601f0160208091040260200160405190810160405280929190818152602001828054610bcb90613de3565b8015610c165780601f10610bed57610100808354040283529160200191610c16565b820191905f5260205f20905b815481529060010190602001808311610bf957829003601f168201915b505050505081565b606060028054610c2d90613de3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5990613de3565b8015610ca45780601f10610c7b57610100808354040283529160200191610ca4565b820191905f5260205f20905b815481529060010190602001808311610c8757829003601f168201915b50505050509050919050565b80610cba81610e8e565b610cc2611c1b565b505f908152601460205260409020805460ff60981b198116600160981b9182900460ff1615909102179055565b81610cf981610e8e565b610d01611c1b565b505f9182526014602052604090912080546001600160501b03909216610100026affffffffffffffffffff0019909216919091179055565b80610d4381610e8e565b610d4b611c1b565b505f908152601460205260409020805460ff60801b198116600160801b9182900460ff1615909102179055565b5f8281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610dec5750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610e0a906001600160601b031687613e1b565b610e149190613e32565b91519350909150505b9250929050565b846001600160a01b0381163314610e3e57610e3e33611d83565b835184905f5b81811015610e7657610e6e838281518110610e6157610e61613e51565b6020026020010151611e42565b600101610e44565b50610e848888888888611e8e565b5050505050505050565b5f81815260146020526040902054600160d01b900460ff1615610ec457604051635a8181f760e01b815260040160405180910390fd5b50565b610ecf611c1b565b5f91825260146020526040909120805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b600e546040515f9182916001600160a01b039091169047908381818185875af1925050503d805f8114610f4b576040519150601f19603f3d011682016040523d82523d5f602084013e610f50565b606091505b509150915081610b4f5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b6044820152606401610a28565b81610fa381610e8e565b5f610fad84611a9c565b9050610fbc8686338787611ed3565b610fd957604051638baa579f60e01b815260040160405180910390fd5b80602001516001600160501b03163410156110075760405163356680b760e01b815260040160405180910390fd5b611023335b85600160405180602001604052805f815250612016565b505050505050565b606081518351146110905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610a28565b5f83516001600160401b038111156110aa576110aa613552565b6040519080825280602002602001820160405280156110d3578160200160208202803683370190505b5090505f5b845181101561114a5761111d8582815181106110f6576110f6613e51565b602002602001015185838151811061111057611110613e51565b60200260200101516109c2565b82828151811061112f5761112f613e51565b602090810291909101015261114381613e65565b90506110d8565b509392505050565b8161115c81610e8e565b611164611c1b565b505f91825260146020526040909120805460ff191660ff909216919091179055565b61118e611c1b565b6012805461ffff191661ffff92909216919091179055565b6111ae611c1b565b806111b881610e8e565b825f5b81811015611023576111ed8686838181106111d8576111d8613e51565b905060200201602081019061100c9190613a31565b6001016111bb565b6111fd611451565b6001600160a01b0316336001600160a01b03161461122e57604051635fc483c560e01b815260040160405180910390fd5b600a54600160a01b900460ff161561125957604051631551a48f60e11b815260040160405180910390fd5b600a80546001600160a81b031916600160a01b1790556040517f51e2d870cc2e10853e38dc06fcdae46ad3c3f588f326608803dac6204541ad16905f90a1565b805f5b818110156112ea576112ac6132e5565b8484838181106112be576112be613e51565b90506020020160208101906112d39190613adc565b60ff1681526112e18161212a565b5060010161129c565b50505050565b6001600160a01b03831633148061130c575061130c83336117b1565b6113285760405162461bcd60e51b8152600401610a2890613e7d565b61133383838361239f565b505050565b611340611c1b565b600480546001600160a01b0319166001600160a01b03831617905550565b611366611c1b565b61136f5f612531565b565b611379611c1b565b6113816132e5565b60ff80891682526001600160501b038816602083015261ffff8088166040840152908616608083015284151560a083015283151560c08301528216610120820152610e848161212a565b816113d581610e8e565b6113dd611c1b565b505f91825260146020526040909120805461ffff909216600160581b0261ffff60581b19909216919091179055565b611414611c1b565b600c80546001600160a01b0319166001600160a01b03831617905550565b61143a611c1b565b6114426132e5565b60ff82168152610b4f8161212a565b5f611464600b546001600160a01b031690565b905090565b8061147381610e8e565b61147b611c1b565b505f908152601460205260409020805460ff60901b198116600160901b9182900460ff1615909102179055565b60108054610b9f90613de3565b6114bd611c1b565b5f91825260146020526040909120805460ff909216600160781b0260ff60781b19909216919091179055565b816114f381611d83565b6113338383612582565b611505611c1b565b610ec4816001600160a01b03165f908152601560205260409020805460ff19166001179055565b8061153681610e8e565b5f61154083611a9c565b90508060c00151158061155557508060e00151155b1561157357604051637338bcbd60e11b815260040160405180910390fd5b80602001516001600160501b03163410156115a15760405163356680b760e01b815260040160405180910390fd5b6113333384600160405180602001604052805f815250612016565b6115c4611c1b565b806115ce81610e8e565b6113338383600160405180602001604052805f815250612016565b6115f1611451565b6001600160a01b0316336001600160a01b03161461162257604051635fc483c560e01b815260040160405180910390fd5b600a54600160a01b900460ff161561164d57604051631551a48f60e11b815260040160405180910390fd5b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de4769060200160405180910390a150565b600d546001600160a01b0316336001600160a01b0316146116d55760405163061cbdd360e51b815260040160405180910390fd5b805f5b8181101561171b57611713858585848181106116f6576116f6613e51565b90506020020135600160405180602001604052805f815250612016565b6001016116d8565b5050505050565b600c546001600160a01b0316336001600160a01b0316146117565760405163061cbdd360e51b815260040160405180910390fd5b805f5b818110156112ea57600c54611783906001600160a01b03168585848181106116f6576116f6613e51565b600101611759565b611793611c1b565b600d80546001600160a01b0319166001600160a01b03831617905550565b6001600160a01b038083165f90815260016020908152604080832093851683529290529081205460ff16806117f35750600c546001600160a01b038381169116145b9392505050565b846001600160a01b03811633146118145761181433611d83565b8361181e81611e42565b61182b878787878761258d565b50505050505050565b61183c611c1b565b6001600160a01b0381166118a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a28565b610ec481612531565b6118b2611c1b565b8483811415806118c25750808214155b156118e05760405163a9b1729f60e01b815260040160405180910390fd5b5f5b81811015610e845761190b8686838181106118ff576118ff613e51565b90506020020135610e8e565b61197b88888381811061192057611920613e51565b90506020020160208101906119359190613a31565b87878481811061194757611947613e51565b9050602002013586868581811061196057611960613e51565b9050602002013560405180602001604052805f815250612016565b6001016118e2565b8161198d81610e8e565b611995611c1b565b505f91825260146020526040909120805461ffff909216600160c01b0261ffff60c01b19909216919091179055565b6001600160a01b0383163314806119e057506119e083336117b1565b6119fc5760405162461bcd60e51b8152600401610a2890613e7d565b6113338383836125d2565b611a0f611c1b565b5f90815260146020526040902080546fff00000000000000000000000000ffff60581b198116600160681b600160d01b60ff60d01b1990931683170461ffff16600160581b0217179055565b81611a6581610e8e565b611a6d611c1b565b505f91825260146020526040909120805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b611aa46132e5565b505f9081526014602090815260409182902082516101c081018452905460ff80821683526101008083046001600160501b031694840194909452600160581b820461ffff90811695840195909552600160681b820485166060840152600160781b820481166080840152600160801b82048116151560a0840152600160881b82048116151560c0840152600160901b82048116151560e0840152600160981b82048116151593830193909352600160a01b81048416610120830152600160b01b81048416610140830152600160c01b8104909316610160820152600160d01b83049091161515610180820152600160d81b90910464ffffffffff166101a082015290565b5f6001600160e01b03198216636cdb3d1360e11b1480611bd857506001600160e01b031982166303a24d0760e21b145b80610a5357506301ffc9a760e01b6001600160e01b0319831614610a53565b5f6001600160e01b0319821663152a902d60e11b1480610a535750610a5382611ba8565b33611c24611451565b6001600160a01b03161461136f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a28565b6002610b4f8282613f10565b6127106001600160601b0382161115611cf45760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610a28565b6001600160a01b038216611d4a5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610a28565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b600a546001600160a01b03168015801590611da757505f816001600160a01b03163b115b15610b4f57604051633185c44d60e21b81523060048201526001600160a01b03838116602483015282169063c617113490604401602060405180830381865afa158015611df6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e1a9190613fcb565b610b4f57604051633b79c77360e21b81526001600160a01b0383166004820152602401610a28565b5f81815260146020526040902054600160801b900460ff1615610ec457335f9081526015602052604090205460ff16610ec45760405163d745569560e01b815260040160405180910390fd5b6001600160a01b038516331480611eaa5750611eaa85336117b1565b611ec65760405162461bcd60e51b8152600401610a2890613e7d565b61171b85858585856126e3565b5f60038686604051611ee6929190613fe6565b9081526040519081900360200190205460ff1615611f175760405163900bb2c960e01b815260040160405180910390fd5b604080517fa7356b5574e8b18140cff2900b1c2ece457143ea668bb5c2373b2f15991f8b5560208201526001600160a01b0386169181019190915260608101849052608081018390525f90611f849060a00160405160208183030381529060405280519060200120612880565b9050600160038888604051611f9a929190613fe6565b9081526040805160209281900383018120805460ff191694151594909417909355600454601f8a018390048302840183019091528883526001600160a01b031691612001918491908b908b90819084018382808284375f920191909152506128cc92505050565b6001600160a01b031614979650505050505050565b6001600160a01b0384166120765760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610a28565b335f612081856128e6565b90505f61208d856128e6565b905061209d835f8985858961292f565b5f868152602081815260408083206001600160a01b038b168452909152812080548792906120cc908490613ff5565b909155505060408051878152602081018790526001600160a01b03808a16925f92918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461182b835f89898989612b50565b60125f9054906101000a900461ffff1681610160019061ffff16908161ffff168152505042816101a0019064ffffffffff16908164ffffffffff16815250508060145f60115481526020019081526020015f205f820151815f015f6101000a81548160ff021916908360ff1602179055506020820151815f0160016101000a8154816001600160501b0302191690836001600160501b031602179055506040820151815f01600b6101000a81548161ffff021916908361ffff1602179055506060820151815f01600d6101000a81548161ffff021916908361ffff1602179055506080820151815f01600f6101000a81548160ff021916908360ff16021790555060a0820151815f0160106101000a81548160ff02191690831515021790555060c0820151815f0160116101000a81548160ff02191690831515021790555060e0820151815f0160126101000a81548160ff021916908315150217905550610100820151815f0160136101000a81548160ff021916908315150217905550610120820151815f0160146101000a81548161ffff021916908361ffff160217905550610140820151815f0160166101000a81548161ffff021916908361ffff160217905550610160820151815f0160186101000a81548161ffff021916908361ffff160217905550610180820151815f01601a6101000a81548160ff0219169083151502179055506101a0820151815f01601b6101000a81548164ffffffffff021916908364ffffffffff160217905550905050805f015160ff166011547f3fe04496bf546cb2f336546df634517af329855430af324f9bb9f4d7ad75813160405160405180910390a350601180546001019055565b6001600160a01b0383166123c55760405162461bcd60e51b8152600401610a2890614008565b80518251146123e65760405162461bcd60e51b8152600401610a289061404b565b5f33905061240681855f868660405180602001604052805f81525061292f565b5f5b83518110156124c6575f84828151811061242457612424613e51565b602002602001015190505f84838151811061244157612441613e51565b6020908102919091018101515f84815280835260408082206001600160a01b038c1683529093529190912054909150818110156124905760405162461bcd60e51b8152600401610a2890614093565b5f928352602083815260408085206001600160a01b038b16865290915290922091039055806124be81613e65565b915050612408565b505f6001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516125169291906140d7565b60405180910390a460408051602081019091525f90526112ea565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b610b4f338383612caa565b6001600160a01b0385163314806125a957506125a985336117b1565b6125c55760405162461bcd60e51b8152600401610a2890613e7d565b61171b8585858585612d89565b6001600160a01b0383166125f85760405162461bcd60e51b8152600401610a2890614008565b335f612603846128e6565b90505f61260f846128e6565b905061262d83875f858560405180602001604052805f81525061292f565b5f858152602081815260408083206001600160a01b038a1684529091529020548481101561266d5760405162461bcd60e51b8152600401610a2890614093565b5f868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a460408051602081019091525f905261182b565b81518351146127045760405162461bcd60e51b8152600401610a289061404b565b6001600160a01b03841661272a5760405162461bcd60e51b8152600401610a2890614104565b3361273981878787878761292f565b5f5b845181101561281a575f85828151811061275757612757613e51565b602002602001015190505f85838151811061277457612774613e51565b6020908102919091018101515f84815280835260408082206001600160a01b038e1683529093529190912054909150818110156127c35760405162461bcd60e51b8152600401610a2890614149565b5f838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906127ff908490613ff5565b925050819055505050508061281390613e65565b905061273b565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161286a9291906140d7565b60405180910390a4611023818787878787612ebd565b5f610a5361288c612f77565b8360405161190160f01b602082015260228101839052604281018290525f9060620160405160208183030381529060405280519060200120905092915050565b5f805f6128d985856130a0565b9150915061114a816130df565b6040805160018082528183019092526060915f91906020808301908036833701905050905082815f8151811061291e5761291e613e51565b602090810291909101015292915050565b6001600160a01b038516612ab05782515f5b81811015612aa9575f60145f87848151811061295f5761295f613e51565b602002602001015181526020019081526020015f20905061ffff8016815f01600d9054906101000a900461ffff1661ffff168684815181106129a3576129a3613e51565b60200260200101516129b59190613ff5565b11156129d45760405163c30436e960e01b815260040160405180910390fd5b8054600160581b900461ffff1615612a4a5780548551600160581b90910461ffff1690869084908110612a0957612a09613e51565b60209081029190910101518254612a2b9190600160681b900461ffff16613ff5565b1115612a4a5760405163c30436e960e01b815260040160405180910390fd5b848281518110612a5c57612a5c613e51565b6020026020010151815f01600d8282829054906101000a900461ffff16612a839190614193565b92506101000a81548161ffff021916908361ffff16021790555081600101915050612941565b5050611023565b6001600160a01b038416612b4b5782515f5b81811015612aa957838181518110612adc57612adc613e51565b602002602001015160145f878481518110612af957612af9613e51565b602002602001015181526020019081526020015f205f01600d8282829054906101000a900461ffff16612b2c91906141b5565b92506101000a81548161ffff021916908361ffff160217905550612ac2565b611023565b6001600160a01b0384163b156110235760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612b9490899089908890889088906004016141d0565b6020604051808303815f875af1925050508015612bce575060408051601f3d908101601f19168201909252612bcb91810190614214565b60015b612c7a57612bda61422f565b806308c379a003612c135750612bee614247565b80612bf95750612c15565b8060405162461bcd60e51b8152600401610a2891906134e0565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610a28565b6001600160e01b0319811663f23a6e6160e01b1461182b5760405162461bcd60e51b8152600401610a28906142cf565b816001600160a01b0316836001600160a01b031603612d1d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610a28565b6001600160a01b038381165f81815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416612daf5760405162461bcd60e51b8152600401610a2890614104565b335f612dba856128e6565b90505f612dc6856128e6565b9050612dd683898985858961292f565b5f868152602081815260408083206001600160a01b038c16845290915290205485811015612e165760405162461bcd60e51b8152600401610a2890614149565b5f878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612e52908490613ff5565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612eb2848a8a8a8a8a612b50565b505050505050505050565b6001600160a01b0384163b156110235760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612f019089908990889088908890600401614317565b6020604051808303815f875af1925050508015612f3b575060408051601f3d908101601f19168201909252612f3891810190614214565b60015b612f4757612bda61422f565b6001600160e01b0319811663bc197c8160e01b1461182b5760405162461bcd60e51b8152600401610a28906142cf565b5f306001600160a01b037f000000000000000000000000007f9b7fabd7ec162f0416dfc1fcefba59ba9cd916148015612fcf57507f000000000000000000000000000000000000000000000000000000000000000146145b15612ff957507f26a59f275270cd2239fe4148fcbdb96652d1dd23e0984388831b40b80a693eb490565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fcb485085c4686492c755de92c693ddd2102d1e193f7e00159776f68f617ef829828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b5f8082516041036130d4576020830151604084015160608501515f1a6130c887828585613228565b94509450505050610e1d565b505f90506002610e1d565b5f8160048111156130f2576130f2614374565b036130fa5750565b600181600481111561310e5761310e614374565b0361315b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a28565b600281600481111561316f5761316f614374565b036131bc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a28565b60038160048111156131d0576131d0614374565b03610ec45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a28565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561325d57505f905060036132dc565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156132ae573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b0381166132d6575f600192509250506132dc565b91505f90505b94509492505050565b604080516101c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081019190915290565b80356001600160a01b038116811461336e575f80fd5b919050565b5f8060408385031215613384575f80fd5b61338d83613358565b946020939093013593505050565b6001600160e01b031981168114610ec4575f80fd5b5f602082840312156133c0575f80fd5b81356117f38161339b565b5f8083601f8401126133db575f80fd5b5081356001600160401b038111156133f1575f80fd5b602083019150836020828501011115610e1d575f80fd5b5f8060208385031215613419575f80fd5b82356001600160401b0381111561342e575f80fd5b61343a858286016133cb565b90969095509350505050565b5f8060408385031215613457575f80fd5b61346083613358565b915060208301356001600160601b038116811461347b575f80fd5b809150509250929050565b5f60208284031215613496575f80fd5b5035919050565b5f81518084525f5b818110156134c1576020818501810151868301820152016134a5565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f6117f3602083018461349d565b80356001600160501b038116811461336e575f80fd5b5f8060408385031215613519575f80fd5b82359150613529602084016134f2565b90509250929050565b5f8060408385031215613543575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b601f8201601f191681016001600160401b038111828210171561358b5761358b613552565b6040525050565b5f6001600160401b038211156135aa576135aa613552565b5060051b60200190565b5f82601f8301126135c3575f80fd5b813560206135d082613592565b6040516135dd8282613566565b83815260059390931b85018201928281019150868411156135fc575f80fd5b8286015b848110156136175780358352918301918301613600565b509695505050505050565b5f82601f830112613631575f80fd5b81356001600160401b0381111561364a5761364a613552565b604051613661601f8301601f191660200182613566565b818152846020838601011115613675575f80fd5b816020850160208301375f918101602001919091529392505050565b5f805f805f60a086880312156136a5575f80fd5b6136ae86613358565b94506136bc60208701613358565b935060408601356001600160401b03808211156136d7575f80fd5b6136e389838a016135b4565b945060608801359150808211156136f8575f80fd5b61370489838a016135b4565b93506080880135915080821115613719575f80fd5b5061372688828901613622565b9150509295509295909350565b803561ffff8116811461336e575f80fd5b5f8060408385031215613755575f80fd5b8235915061352960208401613733565b5f805f8060608587031215613778575f80fd5b84356001600160401b0381111561378d575f80fd5b613799878288016133cb565b90989097506020870135966040013595509350505050565b5f80604083850312156137c2575f80fd5b82356001600160401b03808211156137d8575f80fd5b818501915085601f8301126137eb575f80fd5b813560206137f882613592565b6040516138058282613566565b83815260059390931b8501820192828101915089841115613824575f80fd5b948201945b838610156138495761383a86613358565b82529482019490820190613829565b9650508601359250508082111561385e575f80fd5b5061386b858286016135b4565b9150509250929050565b5f8151808452602080850194508084015f5b838110156138a357815187529582019590820190600101613887565b509495945050505050565b602081525f6117f36020830184613875565b803560ff8116811461336e575f80fd5b5f80604083850312156138e1575f80fd5b82359150613529602084016138c0565b5f60208284031215613901575f80fd5b6117f382613733565b5f8083601f84011261391a575f80fd5b5081356001600160401b03811115613930575f80fd5b6020830191508360208260051b8501011115610e1d575f80fd5b5f805f6040848603121561395c575f80fd5b83356001600160401b03811115613971575f80fd5b61397d8682870161390a565b909790965060209590950135949350505050565b5f80602083850312156139a2575f80fd5b82356001600160401b038111156139b7575f80fd5b61343a8582860161390a565b5f805f606084860312156139d5575f80fd5b6139de84613358565b925060208401356001600160401b03808211156139f9575f80fd5b613a05878388016135b4565b93506040860135915080821115613a1a575f80fd5b50613a27868287016135b4565b9150509250925092565b5f60208284031215613a41575f80fd5b6117f382613358565b8015158114610ec4575f80fd5b5f805f805f805f60e0888a031215613a6d575f80fd5b613a76886138c0565b9650613a84602089016134f2565b9550613a9260408901613733565b9450613aa0606089016138c0565b93506080880135613ab081613a4a565b925060a0880135613ac081613a4a565b9150613ace60c08901613733565b905092959891949750929550565b5f60208284031215613aec575f80fd5b6117f3826138c0565b5f8060408385031215613b06575f80fd5b613b0f83613358565b9150602083013561347b81613a4a565b5f805f60408486031215613b31575f80fd5b613b3a84613358565b925060208401356001600160401b03811115613b54575f80fd5b613b608682870161390a565b9497909650939450505050565b5f8060408385031215613b7e575f80fd5b613b8783613358565b915061352960208401613358565b5f805f805f60a08688031215613ba9575f80fd5b613bb286613358565b9450613bc060208701613358565b9350604086013592506060860135915060808601356001600160401b03811115613be8575f80fd5b61372688828901613622565b5f805f805f8060608789031215613c09575f80fd5b86356001600160401b0380821115613c1f575f80fd5b613c2b8a838b0161390a565b90985096506020890135915080821115613c43575f80fd5b613c4f8a838b0161390a565b90965094506040890135915080821115613c67575f80fd5b50613c7489828a0161390a565b979a9699509497509295939492505050565b5f805f60608486031215613c98575f80fd5b613ca184613358565b95602085013595506040909401359392505050565b815160ff1681526101c081016020830151613cdc60208401826001600160501b03169052565b506040830151613cf2604084018261ffff169052565b506060830151613d08606084018261ffff169052565b506080830151613d1d608084018260ff169052565b5060a0830151613d3160a084018215159052565b5060c0830151613d4560c084018215159052565b5060e0830151613d5960e084018215159052565b50610100838101511515908301526101208084015161ffff90811691840191909152610140808501518216908401526101608085015190911690830152610180808401511515908301526101a09283015164ffffffffff16929091019190915290565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610a5357610a53613dbc565b600181811c90821680613df757607f821691505b602082108103613e1557634e487b7160e01b5f52602260045260245ffd5b50919050565b8082028115828204841417610a5357610a53613dbc565b5f82613e4c57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f60018201613e7657613e76613dbc565b5060010190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b601f821115611333575f81815260208120601f850160051c81016020861015613ef15750805b601f850160051c820191505b8181101561102357828155600101613efd565b81516001600160401b03811115613f2957613f29613552565b613f3d81613f378454613de3565b84613ecb565b602080601f831160018114613f70575f8415613f595750858301515b5f19600386901b1c1916600185901b178555611023565b5f85815260208120601f198616915b82811015613f9e57888601518255948401946001909101908401613f7f565b5085821015613fbb57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215613fdb575f80fd5b81516117f381613a4a565b818382375f9101908152919050565b80820180821115610a5357610a53613dbc565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b604081525f6140e96040830185613875565b82810360208401526140fb8185613875565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b61ffff8181168382160190808211156141ae576141ae613dbc565b5092915050565b61ffff8281168282160390808211156141ae576141ae613dbc565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f906142099083018461349d565b979650505050505050565b5f60208284031215614224575f80fd5b81516117f38161339b565b5f60033d111561309d5760045f803e505f5160e01c90565b5f60443d10156142545790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561428357505050505090565b828501915081518181111561429b5750505050505090565b843d87010160208285010111156142b55750505050505090565b6142c460208286010187613566565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190525f9061434290830186613875565b82810360608401526143548186613875565b90508281036080840152614368818561349d565b98975050505050505050565b634e487b7160e01b5f52602160045260245ffdfea26469706673582212203822446962acce0630f6056175cac49732122e0c76c83fc5602229aa54d3fc2864736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000001783091457be14521c9c3873ccf749984d33805800000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000013506c61677565506f7070657473437572696f73000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006435552494f530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c697066733a2f2f62616679626569626d686e72326178336d7737666371356b366a36656b32746f726b6c6f7867723761716a6165616e7271726f6c6a6362796b74612f7b69647d2e6a736f6e0000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): PlaguePoppetsCurios
Arg [1] : symbol_ (string): CURIOS
Arg [2] : signer_ (address): 0x1783091457Be14521c9c3873CCf749984d338058
Arg [3] : uri_ (string): ipfs://bafybeibmhnr2ax3mw7fcq5k6j6ek2torkloxgr7aqjaeanrqroljcbykta/{id}.json
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000001783091457be14521c9c3873ccf749984d338058
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [5] : 506c61677565506f7070657473437572696f7300000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 435552494f530000000000000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000004c
Arg [9] : 697066733a2f2f62616679626569626d686e72326178336d7737666371356b36
Arg [10] : 6a36656b32746f726b6c6f7867723761716a6165616e7271726f6c6a6362796b
Arg [11] : 74612f7b69647d2e6a736f6e0000000000000000000000000000000000000000
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.