ERC-721
Overview
Max Total Supply
335 TFDEEP
Holders
76
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
11 TFDEEPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
TheFabricantDEEP
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 500000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* ___________ __ __ _______ (" _ "/" | | "\ /" "| )__/ \\__(: (__) :(: ______) \\_ / \/ \/ \/ | |. | // __ \\ // ___)_ \: | (: ( ) :(: "| ___\__| _\__| |__/_\_______)____ __ ______ __ _____ ___ ___________ /" "|/""\ | _ "\ /" \ |" \ /" _ "\ /""\ (\" \|" (" _ ") (: ______/ \ (. |_) :|: ||| |(: ( \___) / \ |.\\ \ )__/ \\__/ \/ |/' /\ \ |: \/|_____/ )|: | \/ \ /' /\ \ |: \. \\ | \\_ / // ___// __' \ (| _ \\ // / |. | // \ _ // __' \|. \ \. | |. | (: ( / / \\ \|: |_) :|: __ \ /\ |(: _) \ / / \\ | \ \ | \: | \__/(___/ __\___(_______/|__|__\___(__\_|_\_______(___/ \___\___|\____\) \__| |" "\ /" "|/" "| | __ "\ (. ___ :(: ______(: ______) (. |__) :) |: \ ) ||\/ | \/ | |: ____/ (| (___\ ||// ___)_ // ___)_ (| / |: :(: "(: "|/|__/ \ (________/ \_______)\_______(_______) */ pragma solidity ^0.8.0; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import "../../../lib/openzeppelin-contracts/contracts/security/Pausable.sol"; import "lib/openzeppelin-contracts/contracts/utils/Strings.sol"; import "lib/openzeppelin-contracts/contracts/token/common/ERC2981.sol"; import "../../lib/token/ERC721A.sol"; import "../../lib/token/metadata/TFMetadata.sol"; /// @title TheFabricantDEEP /// @author The Fabricant ([email protected], [email protected]) /// @notice The Fabricant's DEEP NFT collection contract TheFabricantDEEP is Ownable, Pausable, ERC721A, ERC2981, ReentrancyGuard, TFMetadata { using Strings for uint32; /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ /// @notice Event emitted when the access list is updated /// @param addresses Array of addresses to update /// @param allowed Array of booleans indicating if the address is allowed to mint event AccessListUpdated(address[] addresses, bool[] allowed); /// @notice Event emitted when the base URI is updated /// @param baseURI New base URI event BaseURIUpdated(string baseURI); /// @notice Event emitted when the default royalty receiver and fee are updated /// @param receiver Address to receive royalties /// @param feeNumerator Numerator of the royalty fee event DefaultRoyaltyUpdated(address receiver, uint96 feeNumerator); /// @notice Event emitted when the sale is opened or closed /// @param isOpen Boolean indicating if the sale is open or closed event SaleIsOpenUpdated(bool isOpen); /// @notice Event emitted when the dev minting phase is opened or closed /// @param isOpen Boolean indicating if the dev minting phase is open or closed event DevMintIsOpenUpdated(bool isOpen); /// @notice Event emitted when a payment is withdrawn /// @param receiver Address to receive mint royalties /// @param amount Amount withdrawn event PaymentWithdrawn(address receiver, uint256 amount); /// @notice Event emitted when the price of a variant is updated /// @param variantId Variant ID of the variant to set the price for /// @param price Price to set for the variant event VariantPriceUpdated(uint32 indexed variantId, uint256 price); /// @notice Event emitted when an NFT is minted /// @param tokenId Token ID of the NFT minted /// @param variantId Variant ID of the NFT minted /// @param receiver Address that received the NFT event NftMinted(uint256 indexed tokenId, uint32 indexed variantId, address indexed receiver); /*////////////////////////////////////////////////////////////// DATA STRUCTURES //////////////////////////////////////////////////////////////*/ /// @notice Used by contract to keep track of sale struct SaleConfig { bool isOpen; // Minting is open/closed bool devMintIsOpen; // Dev minting is open/closed uint16 maxBatchSize; // Max number of tokens that can be minted in a single transaction } /// @notice Used to get Sale data off-chain struct SaleData { bool isOpen; // Minting is open/closed uint16 maxBatchSize; // max number of nfts that can be minted in a single batch uint32 totalSupply; // total number sold uint32[] allowedVariants; // Array of variant IDs that are allowed to be minted uint16[] unitsSold; // Number sold of each variant uint256[] variantPrices; // Prices of each variant } /// @notice Used by contract to get variant data struct VariantData { bool isSet; // Indicates if variantData is set for this position in the _variantData mapping uint32 variantId; // id of the variant uint16 unitsSold; // number of nfts minted for this variant uint256 price; // price of the variant in wei string variantName; // name of the variant string description; // desc of the variant } /*////////////////////////////////////////////////////////////// STATE VARIABLES //////////////////////////////////////////////////////////////*/ /// @notice Configuration settings for the sale SaleConfig public saleConfig; /// @notice Used internally to track settings for each variant and check if a variant can be minted /// @dev Maps variant IDs to their respective VariantData mapping(uint32 => VariantData) internal _variantData; /// @notice Used internally to construct metadata for tokens /// @dev Maps token IDs to their corresponding variant IDs mapping(uint32 => uint32) internal _tokenIdToVariantId; /// @notice Access list for addresses allowed to mint in dev minting phase /// @dev Used exclusively for dev minting, mapping an address to a bool indicating allowed access mapping(address => bool) public accessList; /// @notice Address designated to receive minting royalties /// @dev Public address that is set to receive royalties from minting address public mintRoyaltyReceiver; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ /// @notice Constructor for TheFabricantDEEP /// @param _baseURIString Base URI for token metadata /// @param _royaltyBasisPoints Royalty basis points for minting constructor(string memory _baseURIString, uint96 _royaltyBasisPoints) ERC721A("TheFabricantDEEP", "TFDEEP") { // Set VariantData // Variant 1 VariantData memory v1 = VariantData({ isSet: true, price: 0.001 ether, variantId: 1, unitsSold: 0, variantName: "UNKNOWN", description: "Style unknown, creativity redefined." }); _variantData[1] = v1; // Variant 2 VariantData memory v2 = VariantData({ isSet: true, price: 0.001 ether, variantId: 2, unitsSold: 0, variantName: "DATABASE", description: "New models emerge from the primordial dataset." }); _variantData[2] = v2; // Variant 3 VariantData memory v3 = VariantData({ isSet: true, price: 0.001 ether, variantId: 3, unitsSold: 0, variantName: "FAST", description: "Time to accelerate." }); _variantData[3] = v3; // Variant 4 VariantData memory v4 = VariantData({ isSet: true, price: 0.001 ether, variantId: 4, unitsSold: 0, variantName: "HYBRID", description: "Hybrid intelligence, crossbreed creation." }); _variantData[4] = v4; // Variant 5 VariantData memory v5 = VariantData({ isSet: true, price: 0.001 ether, variantId: 5, unitsSold: 0, variantName: "LEARN", description: "Deep learn, deep curiosity." }); _variantData[5] = v5; // Variant 6 VariantData memory v6 = VariantData({ isSet: true, price: 0.001 ether, variantId: 6, unitsSold: 0, variantName: "COPYCOPYCOPY", description: "A copy of a copy of copy creates something new." }); _variantData[6] = v6; // Variant 7 VariantData memory v7 = VariantData({ isSet: true, price: 0.001 ether, variantId: 7, unitsSold: 0, variantName: "MACHINE", description: "Parallel processes infinitely expanding." }); _variantData[7] = v7; // Set SaleConfig SaleConfig memory saleConf = SaleConfig({isOpen: false, devMintIsOpen: false, maxBatchSize: 5}); saleConfig = saleConf; // Set marketplace royalty _setDefaultRoyalty(0xf5f916a3E4C449Ac8Ae39fDAEF7ac3D169faa87A, uint96(_royaltyBasisPoints)); // Set mint royalty receiver mintRoyaltyReceiver = 0x21F52C84A6f9D858b7B93dB0D88e592196b1c384; // Set collection name and baseURI _setCollectionName("TheFabricantDEEP"); setBaseURI(_baseURIString); } /*////////////////////////////////////////////////////////////// INTERNAL FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice Internal function that returns the baseURI function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } /*////////////////////////////////////////////////////////////// EXTERNAL/PUBLIC STATE-CHANGING FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice External function to mint tokens /// @param _to Address to mint tokens to /// @param _quantity Number of tokens to mint /// @param _variantId Variant ID of the token to mint /// @dev Users can only mint if the sale is open, the batchSize (quantity) is less than 5 but not 0, and the variantId is between 1 and 7. They must also send the correct payment amount. function mint(address _to, uint256 _quantity, uint32 _variantId) external payable nonReentrant whenNotPaused { SaleConfig memory saleC = saleConfig; VariantData storage variant = _variantData[_variantId]; require(_to != address(0), "DEEP::mint:Cannot mint to 0 address"); require(saleC.isOpen, "DEEP::mint:Mint closed"); require(_quantity <= saleC.maxBatchSize && _quantity != 0, "DEEP::mint:Unsupported quantity"); require(variant.isSet, "DEEP::mint:Variant ID not set"); require(msg.value >= _quantity * variant.price, ("DEEP::mint:Ether value sent is incorrect")); // totalSupply gives the next tokenId uint32 index = uint32(totalSupply()); // Set variantId for tokenId for (uint32 i = index; i < (_quantity + index); i++) { _tokenIdToVariantId[i] = _variantId; emit NftMinted(i, _variantId, _to); } // Increment the number of units sold of the variant in storage variant.unitsSold += uint16(_quantity); _safeMint(_to, _quantity); } /// @notice External function to mint tokens using the access list. Only address on the access list can mint /// @param _to Address to mint tokens to /// @param _quantity Number of tokens to mint /// @param _variantId Variant ID of the token to mint /// @dev Users can only mint if the dev mint sale is open, the batchSize (quantity) is less than 5 but not 0, and the variantId is between 1 and 7. Used for treasury minting, so there is no associated payment fee. function accessListMint(address _to, uint256 _quantity, uint32 _variantId) external payable nonReentrant whenNotPaused { require(accessList[msg.sender], "DEEP::accessListMint:Sender not on access list"); SaleConfig memory saleC = saleConfig; VariantData storage variant = _variantData[_variantId]; require(_to != address(0), "DEEP::accessListMint:Cannot mint to 0 address"); require(saleC.devMintIsOpen, "DEEP::accessListMint:Dev mint closed"); require(_quantity <= saleC.maxBatchSize && _quantity != 0, "DEEP::accessListMint:Unsupported quantity"); require(variant.isSet, "DEEP::accessListMint:Variant ID not set"); // totalSupply gives the next tokenId uint32 index = uint32(totalSupply()); // Set variantId for tokenId for (uint32 i = index; i < (_quantity + index); i++) { _tokenIdToVariantId[i] = _variantId; emit NftMinted(i, _variantId, _to); } // Increment the number of units sold of the variant in storage variant.unitsSold += uint16(_quantity); _safeMint(_to, _quantity); } /// @notice External function to set the default royalty receiver and fee /// @param _receiver Address to receive royalties /// @param _feeNumerator Numerator of the royalty fee function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner whenNotPaused { _setDefaultRoyalty(_receiver, _feeNumerator); emit DefaultRoyaltyUpdated(_receiver, _feeNumerator); } /// @notice External function to set the mint royalty receiver /// @param _receiver Address to receive royalties function setMintRoyaltyReceiver(address _receiver) external onlyOwner whenNotPaused { require(_receiver != address(0), "DEEP::setMintRoyaltyReceiver:Receiver cannot be 0 address"); mintRoyaltyReceiver = _receiver; } /// @notice External function to set the sale to open or closed /// @param _isOpen Boolean indicating if the sale is open or closed function setIsOpen(bool _isOpen) external onlyOwner whenNotPaused { saleConfig.isOpen = _isOpen; emit SaleIsOpenUpdated(_isOpen); } /// @notice External function to set the dev minting to open or closed /// @param _isOpen Boolean indicating if the dev minting is open or closed function setDevMintIsOpen(bool _isOpen) external onlyOwner whenNotPaused { saleConfig.devMintIsOpen = _isOpen; emit DevMintIsOpenUpdated(_isOpen); } /// @notice External function to set the price of a single variant /// @param _variantId Variant ID of the variant to set the price for /// @param _price Price to set for the variant function setVariantPrice(uint32 _variantId, uint256 _price) external onlyOwner whenNotPaused { require(_variantData[_variantId].isSet, "DEEP::setVariantPrice:Variant ID not set"); _variantData[_variantId].price = _price; emit VariantPriceUpdated(_variantId, _price); } /// @notice External function to update the access list /// @param _addresses Array of addresses to update /// @param _allowed Array of booleans indicating if the address is allowed to mint /// @dev Access list for dev/treasury minting should be small to keep gas costs low when calling. 5 addresses or less is ideal function updateAccessList(address[] memory _addresses, bool[] memory _allowed) external onlyOwner whenNotPaused { require(_addresses.length == _allowed.length, "DEEP::updateAccessList:Array lengths do not match"); for (uint256 i = 0; i < _addresses.length; i++) { accessList[_addresses[i]] = _allowed[i]; } emit AccessListUpdated(_addresses, _allowed); } /// @notice External function to update the base URI /// @param _uri New base URI function setBaseURI(string memory _uri) public onlyOwner whenNotPaused { _baseTokenURI = _uri; emit BaseURIUpdated(_uri); } /// @notice External function to pause the contract function pause() external onlyOwner { _pause(); } /// @notice External function to unpause the contract function unpause() external onlyOwner { _unpause(); } /// @notice External function to withdraw payments function withdrawPayment() external onlyOwner nonReentrant whenNotPaused { uint contractBalance = address(this).balance; (bool success,) = mintRoyaltyReceiver.call{value: address(this).balance}(""); require(success, "DEEP::withdrawPayment:Transfer failed."); emit PaymentWithdrawn(mintRoyaltyReceiver, contractBalance); } /*////////////////////////////////////////////////////////////// EXTERNAL/PUBLIC VIEW FUNCTIONS //////////////////////////////////////////////////////////////*/ /// @notice External function to get the base URI function baseURI() external view returns (string memory) { return _baseURI(); } /// @notice External function to get the current saleData /// @dev Returns a SaleData struct /// @dev Number of variants is 7 function saleData() external view returns (SaleData memory) { // Calculate variantData mapping length // i = 1: variantIds always start from 1 // .isSet indicates if variantData is set for that variantId. Break if it isn't. uint32 variantDataLength; for (uint8 i = 1; i < type(uint8).max; i++) { if (_variantData[i].isSet) { variantDataLength++; } else { break; } } SaleData memory _saleData; _saleData.isOpen = saleConfig.isOpen; _saleData.maxBatchSize = maxBatchSize(); _saleData.totalSupply = uint32(totalSupply()); // Set array lengths for _saleData _saleData.allowedVariants = new uint32[](variantDataLength); _saleData.variantPrices = new uint256[](variantDataLength); _saleData.unitsSold = new uint16[](variantDataLength); for (uint8 i = 0; i < variantDataLength; i++) { // variantData starts at index 1 as the variantId matches the key in the mapping uint8 variantKey = i + 1; VariantData memory variant = _variantData[variantKey]; if (!variant.isSet) break; _saleData.allowedVariants[i] = variant.variantId; _saleData.variantPrices[i] = variant.price; _saleData.unitsSold[i] = variant.unitsSold; } return _saleData; } /// @notice External function to get the tokenURI for a given variantId /// @param _tokenId Token ID to get the uri for /// @dev returns a JSON string function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), "DEEP::tokeURI:ERC721Metadata:URI query for nonexistent token"); uint32 variantId = _tokenIdToVariantId[uint32(_tokenId)]; require(_variantData[variantId].isSet, "DEEP::tokenURI: Variant ID not set"); string memory variantName = _variantData[variantId].variantName; string memory variantDescription = _variantData[variantId].description; return _createMetadataString(uint32(_tokenId).toString(), variantId.toString(), variantName, variantDescription); } /// @notice External function to get the number of tokens minted for a given address /// @param _owner Address to get the number of tokens minted for function numberMinted(address _owner) public view returns (uint256) { return _numberMinted(_owner); } /// @notice External function to get the maxBatchSize function maxBatchSize() public view returns (uint16) { return saleConfig.maxBatchSize; } /// @notice External function to get the variantId for a given tokenId /// @param _tokenId Token ID to get the variantId for function tokenIdToVariantId(uint32 _tokenId) public view returns (uint32) { require(_exists(_tokenId), "DEEP::tokenIdToVariantId:ERC721Metadata:URI query for nonexistent token"); uint32 variantId = _tokenIdToVariantId[_tokenId]; require(variantId != 0, "DEEP::tokenIdToVariantId:No variantId set for tokenId"); return variantId; } /// @notice External function to get the variantData for a given variantId /// @param _variantId Variant ID to get the variantData for function variantData(uint32 _variantId) public view returns (VariantData memory) { require(_variantData[_variantId].isSet, "DEEP::variantData:Variant ID not set"); return _variantData[_variantId]; } /// @notice External function to indicate which interfaces are supported /// @param interfaceId Interface ID to check if supported function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { // Supports the following `interfaceId`s: // - IERC165: 0x01ffc9a7 // - IERC721: 0x80ac58cd // - IERC721Metadata: 0x5b5e139f // - IERC2981: 0x2a55205a return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import "../interfaces/IERC721A.sol"; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) _revert(BalanceQueryForZeroAddress.selector); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 // ERC165 interface ID for ERC165. || interfaceId == 0x80ac58cd // ERC165 interface ID for ERC721. || interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return _packedOwnerships[index] != 0; } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) _revert(ApprovalQueryForNonexistentToken.selector); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool result) { if (_startTokenId() <= tokenId) { if (tokenId < _currentIndex) { uint256 packed; while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner(address approvedAddress, address owner, address msgSender) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) { if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData(to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) { if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { _revert(TransferToNonERC721ReceiverImplementer.selector); } assembly { revert(add(32, reason), mload(reason)) } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) _revert(MintZeroQuantity.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData(to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; do { assembly { // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) _revert(MintToZeroAddress.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData(to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint(address to, uint256 quantity, bytes memory _data) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) _revert(bytes4(0)); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ""); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId, bool approvalCheck) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) { if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) { if (!isApprovedForAll(from, _msgSenderERC721A())) _revert(TransferCallerNotOwnerNorApproved.selector); } } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData(address from, address to, uint24 previousExtraData) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData(address from, address to, uint256 prevOwnershipPacked) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
pragma solidity ^0.8.13; abstract contract TFMetadata { /// @notice Base URI for computing {tokenURI}. string internal _baseTokenURI; /// @notice Name of the collection string internal _collectionName; /// @notice Internal function that sets the collection name for computing {tokenURI}. /// @param _collectionNameString The collection name to set. function _setCollectionName(string memory _collectionNameString) internal { _collectionName = _collectionNameString; } /// @notice Internal function used to create media strings /// @param _variantId The variant id to use in the media string /// @param _fileExtension The file extension to use in the media string function _createMediaString(string memory _variantId, string memory _fileExtension) internal view returns (string memory) { return string.concat(_baseTokenURI, _variantId, _fileExtension); } /// @notice Internal function used to create metadata strings. /// @param _tokenId The token id to use in the metadata string /// @param _variantId The variant id to use in the metadata string /// @param _variantName The variant name to use in the metadata string /// @param _variantDescription The variant description to use in the metadata string function _createMetadataString( string memory _tokenId, string memory _variantId, string memory _variantName, string memory _variantDescription ) internal view returns (string memory) { string memory pngString = _createMediaString(_variantId, ".png"); string memory mp4String = _createMediaString(_variantId, ".mp4"); return string.concat( '{"id":"', _tokenId, '","name":"', _variantName, " #", _tokenId, '","variantId":"', _variantId, '","collection":"', _collectionName, '","description":"', _variantDescription, '","image":"', pngString, '","animation_url":"', mp4String, '", "creator": "The Fabricant', '"}' ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 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 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom(address from, address to, uint256 tokenId) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// 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); }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": true, "runs": 500000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_baseURIString","type":"string"},{"internalType":"uint96","name":"_royaltyBasisPoints","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"addresses","type":"address[]"},{"indexed":false,"internalType":"bool[]","name":"allowed","type":"bool[]"}],"name":"AccessListUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"DefaultRoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isOpen","type":"bool"}],"name":"DevMintIsOpenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint32","name":"variantId","type":"uint32"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"}],"name":"NftMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isOpen","type":"bool"}],"name":"SaleIsOpenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"variantId","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"VariantPriceUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accessList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"accessListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchSize","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintRoyaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleConfig","outputs":[{"internalType":"bool","name":"isOpen","type":"bool"},{"internalType":"bool","name":"devMintIsOpen","type":"bool"},{"internalType":"uint16","name":"maxBatchSize","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleData","outputs":[{"components":[{"internalType":"bool","name":"isOpen","type":"bool"},{"internalType":"uint16","name":"maxBatchSize","type":"uint16"},{"internalType":"uint32","name":"totalSupply","type":"uint32"},{"internalType":"uint32[]","name":"allowedVariants","type":"uint32[]"},{"internalType":"uint16[]","name":"unitsSold","type":"uint16[]"},{"internalType":"uint256[]","name":"variantPrices","type":"uint256[]"}],"internalType":"struct TheFabricantDEEP.SaleData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpen","type":"bool"}],"name":"setDevMintIsOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOpen","type":"bool"}],"name":"setIsOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setMintRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_variantId","type":"uint32"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setVariantPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_tokenId","type":"uint32"}],"name":"tokenIdToVariantId","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"bool[]","name":"_allowed","type":"bool[]"}],"name":"updateAccessList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_variantId","type":"uint32"}],"name":"variantData","outputs":[{"components":[{"internalType":"bool","name":"isSet","type":"bool"},{"internalType":"uint32","name":"variantId","type":"uint32"},{"internalType":"uint16","name":"unitsSold","type":"uint16"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"variantName","type":"string"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct TheFabricantDEEP.VariantData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200598738038062005987833981016040819052620000349162000eb7565b6040518060400160405280601081526020016f0546865466162726963616e74444545560841b8152506040518060400160405280600681526020016505446444545560d41b815250620000966200009062000be060201b60201c565b62000be4565b6000805460ff60a01b191690556003620000b1838262001013565b506004620000c0828262001013565b50600060018190555050506001600b8190555060006040518060c00160405280600115158152602001600163ffffffff168152602001600061ffff16815260200166038d7ea4c680008152602001604051806040016040528060078152602001662aa725a727aba760c91b8152508152602001604051806060016040528060248152602001620059636024913990526001600052600f602090815281517f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f88f805492840151604085015161ffff16650100000000000261ffff60281b1963ffffffff929092166101000264ffffffff00199415159490941664ffffffffff1990951694909417929092179190911691909117815560608201517f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f89055608082015191925082917f169f97de0d9a84d840042b17d3c6b9638b3d6fd9024c9eb0c7a306a17b49f8919062000232908262001013565b5060a0820151600382019062000249908262001013565b5090505060006040518060c00160405280600115158152602001600263ffffffff168152602001600061ffff16815260200166038d7ea4c68000815260200160405180604001604052806008815260200167444154414241534560c01b81525081526020016040518060600160405280602e8152602001620058b5602e913990526002600052600f602090815281517fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeead805492840151604085015161ffff16650100000000000261ffff60281b1963ffffffff929092166101000264ffffffff00199415159490941664ffffffffff1990951694909417929092179190911691909117815560608201517fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeeae55608082015191925082917fa74ba3945261e09fde15ba3db55005b205e61eeb4ad811ac0faa2b315bffeeaf90620003ad908262001013565b5060a08201516003820190620003c4908262001013565b50506040805160c0810182526001815260036020808301828152600084860181815266038d7ea4c6800060608701908152875180890189526004815263119054d560e21b81870152608088019081528851808a01909952601389527f54696d6520746f20616363656c65726174652e000000000000000000000000008987015260a088019890985294909152600f90925283517f45f76dafbbad695564362934e24d72eedc57f9fc1a65f39bca62176cc829682880549251935161ffff16650100000000000261ffff60281b1963ffffffff959095166101000264ffffffff00199315159390931664ffffffffff1990941693909317919091179290921617815590517f45f76dafbbad695564362934e24d72eedc57f9fc1a65f39bca62176cc82968295591519092508291907f45f76dafbbad695564362934e24d72eedc57f9fc1a65f39bca62176cc829682a906200051f908262001013565b5060a0820151600382019062000536908262001013565b5090505060006040518060c00160405280600115158152602001600463ffffffff168152602001600061ffff16815260200166038d7ea4c6800081526020016040518060400160405280600681526020016512165094925160d21b81525081526020016040518060600160405280602981526020016200590b6029913990526004600052600f602090815281517f367ccd2d0ac16bf7110a5dffe0801fdc9452a95a1adb7e1a12fe97dd3e9a4edd805492840151604085015161ffff16650100000000000261ffff60281b1963ffffffff929092166101000264ffffffff00199415159490941664ffffffffff1990951694909417929092179190911691909117815560608201517f367ccd2d0ac16bf7110a5dffe0801fdc9452a95a1adb7e1a12fe97dd3e9a4ede55608082015191925082917f367ccd2d0ac16bf7110a5dffe0801fdc9452a95a1adb7e1a12fe97dd3e9a4edf9062000698908262001013565b5060a08201516003820190620006af908262001013565b50506040805160c0810182526001815260056020808301828152600084860181815266038d7ea4c680006060870190815287518089018952868152642622a0a92760d91b81870152608088019081528851808a01909952601b89527f44656570206c6561726e2c206465657020637572696f736974792e00000000008987015260a088019890985294909152600f90925283517f6bda57492eba051cb4a12a1e19df47c9755d78165341d4009b1d09b3f361620480549251935161ffff16650100000000000261ffff60281b1963ffffffff959095166101000264ffffffff00199315159390931664ffffffffff1990941693909317919091179290921617815590517f6bda57492eba051cb4a12a1e19df47c9755d78165341d4009b1d09b3f36162055591519092508291907f6bda57492eba051cb4a12a1e19df47c9755d78165341d4009b1d09b3f3616206906200080a908262001013565b5060a0820151600382019062000821908262001013565b5090505060006040518060c00160405280600115158152602001600663ffffffff168152602001600061ffff16815260200166038d7ea4c6800081526020016040518060400160405280600c81526020016b434f5059434f5059434f505960a01b81525081526020016040518060600160405280602f815260200162005934602f913990526006600052600f602090815281517fb5a1e7cda73b1608e93d4d50ab796c3d35aa6216cb006a1f920df154d13ff618805492840151604085015161ffff16650100000000000261ffff60281b1963ffffffff929092166101000264ffffffff00199415159490941664ffffffffff1990951694909417929092179190911691909117815560608201517fb5a1e7cda73b1608e93d4d50ab796c3d35aa6216cb006a1f920df154d13ff61955608082015191925082917fb5a1e7cda73b1608e93d4d50ab796c3d35aa6216cb006a1f920df154d13ff61a9062000989908262001013565b5060a08201516003820190620009a0908262001013565b5090505060006040518060c00160405280600115158152602001600763ffffffff168152602001600061ffff16815260200166038d7ea4c680008152602001604051806040016040528060078152602001664d414348494e4560c81b8152508152602001604051806060016040528060288152602001620058e36028913990526007600052600f602090815281517f73dfc495eb54bd6713ffc079b9f5e40f2fecd3793d143759ba0128fbedb40254805492840151604085015161ffff16650100000000000261ffff60281b1963ffffffff929092166101000264ffffffff00199415159490941664ffffffffff1990951694909417929092179190911691909117815560608201517f73dfc495eb54bd6713ffc079b9f5e40f2fecd3793d143759ba0128fbedb4025555608082015191925082917f73dfc495eb54bd6713ffc079b9f5e40f2fecd3793d143759ba0128fbedb402569062000b03908262001013565b5060a0820151600382019062000b1a908262001013565b50506040805160608101825260008082526020820152600591810191909152600e805463ffffffff191662050000179055905062000b6d73f5f916a3e4c449ac8ae39fdaef7ac3d169faa87a8a62000c34565b601280546001600160a01b0319167321f52c84a6f9d858b7b93db0d88e592196b1c38417905560408051808201909152601081526f0546865466162726963616e74444545560841b602082015262000bc59062000d39565b62000bd08a62000d4b565b5050505050505050505062001114565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6127106001600160601b038216111562000ca85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b03821662000d005760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000c9f565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b600d62000d47828262001013565b5050565b62000d5562000daa565b62000d5f62000e08565b600c62000d6d828262001013565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8160405162000d9f9190620010df565b60405180910390a150565b6000546001600160a01b0316331462000e065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000c9f565b565b62000e1c600054600160a01b900460ff1690565b1562000e065760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640162000c9f565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000e9157818101518382015260200162000e77565b50506000910152565b80516001600160601b038116811462000eb257600080fd5b919050565b6000806040838503121562000ecb57600080fd5b82516001600160401b038082111562000ee357600080fd5b818501915085601f83011262000ef857600080fd5b81518181111562000f0d5762000f0d62000e5e565b604051601f8201601f19908116603f0116810190838211818310171562000f385762000f3862000e5e565b8160405282815288602084870101111562000f5257600080fd5b62000f6583602083016020880162000e74565b809650505050505062000f7b6020840162000e9a565b90509250929050565b600181811c9082168062000f9957607f821691505b60208210810362000fba57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200100e57600081815260208120601f850160051c8101602086101562000fe95750805b601f850160051c820191505b818110156200100a5782815560010162000ff5565b5050505b505050565b81516001600160401b038111156200102f576200102f62000e5e565b620010478162001040845462000f84565b8462000fc0565b602080601f8311600181146200107f5760008415620010665750858301515b600019600386901b1c1916600185901b1785556200100a565b600085815260208120601f198616915b82811015620010b0578886015182559484019460019091019084016200108f565b5085821015620010cf5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600082518060208401526200110081604085016020870162000e74565b601f01601f19169190910160400192915050565b61479180620011246000396000f3fe6080604052600436106102bb5760003560e01c80636d35bfb91161016e578063a118babd116100cb578063d0047acf1161007f578063dc33e68111610064578063dc33e681146107d7578063e985e9c5146107f7578063f2fde38b1461084d57600080fd5b8063d0047acf146107a4578063d3c6f6c7146107b757600080fd5b8063ad5b882c116100b0578063ad5b882c14610744578063b88d4fde14610771578063c87b56dd1461078457600080fd5b8063a118babd1461070f578063a22cb4651461072457600080fd5b806387a5b67c116101225780638da5cb5b116101075780638da5cb5b1461067e57806390aa0b0f146106a957806395d89b41146106fa57600080fd5b806387a5b67c146106215780638d784d5e1461065157600080fd5b8063715018a611610153578063715018a6146105e45780638127d864146105f95780638456cb591461060c57600080fd5b80636d35bfb9146105a457806370a08231146105c457600080fd5b80632913daa01161021c57806355f804b3116101d05780635c975abb116101b55780635c975abb1461053f5780636352211e1461056f5780636c0360eb1461058f57600080fd5b806355f804b3146104ff578063597d10071461051f57600080fd5b80633f4ba83a116102015780633f4ba83a146104b757806342842e0e146104cc57806353b2a7d0146104df57600080fd5b80632913daa01461043e5780632a55205a1461046b57600080fd5b8063095ea7b3116102735780630e87c673116102585780630e87c673146103d357806318160ddd1461040857806323b872dd1461042b57600080fd5b8063095ea7b31461039e5780630b6d18de146103b157600080fd5b806306fdde03116102a457806306fdde0314610317578063081812fc14610339578063085a10cf1461037e57600080fd5b806301ffc9a7146102c057806304634d8d146102f5575b600080fd5b3480156102cc57600080fd5b506102e06102db36600461385c565b61086d565b60405190151581526020015b60405180910390f35b34801561030157600080fd5b506103156103103660046138a4565b61088d565b005b34801561032357600080fd5b5061032c610908565b6040516102ec919061395a565b34801561034557600080fd5b5061035961035436600461396d565b61099a565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b34801561038a57600080fd5b50610315610399366004613996565b6109fb565b6103156103ac3660046139b1565b610a71565b3480156103bd57600080fd5b506103c6610a81565b6040516102ec9190613a4a565b3480156103df57600080fd5b506103f36103ee366004613b3e565b610eae565b60405163ffffffff90911681526020016102ec565b34801561041457600080fd5b50600254600154035b6040519081526020016102ec565b610315610439366004613b59565b611020565b34801561044a57600080fd5b50600e5462010000900461ffff1660405161ffff90911681526020016102ec565b34801561047757600080fd5b5061048b610486366004613b95565b61127f565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016102ec565b3480156104c357600080fd5b50610315611376565b6103156104da366004613b59565b611388565b3480156104eb57600080fd5b506103156104fa366004613996565b6113a8565b34801561050b57600080fd5b5061031561051a366004613cab565b61141e565b34801561052b57600080fd5b5061031561053a366004613cf4565b61146a565b34801561054b57600080fd5b5060005474010000000000000000000000000000000000000000900460ff166102e0565b34801561057b57600080fd5b5061035961058a36600461396d565b611578565b34801561059b57600080fd5b5061032c611583565b3480156105b057600080fd5b506103156105bf366004613d10565b611592565b3480156105d057600080fd5b5061041d6105df366004613d10565b61168c565b3480156105f057600080fd5b50610315611705565b610315610607366004613d2b565b611717565b34801561061857600080fd5b50610315611b8e565b34801561062d57600080fd5b506102e061063c366004613d10565b60116020526000908152604090205460ff1681565b34801561065d57600080fd5b5061067161066c366004613b3e565b611b9e565b6040516102ec9190613d67565b34801561068a57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610359565b3480156106b557600080fd5b50600e546106d99060ff8082169161010081049091169062010000900461ffff1683565b604080519315158452911515602084015261ffff16908201526060016102ec565b34801561070657600080fd5b5061032c611e14565b34801561071b57600080fd5b50610315611e23565b34801561073057600080fd5b5061031561073f366004613df2565b611f8e565b34801561075057600080fd5b506012546103599073ffffffffffffffffffffffffffffffffffffffff1681565b61031561077f366004613e25565b612025565b34801561079057600080fd5b5061032c61079f36600461396d565b61208c565b6103156107b2366004613d2b565b612357565b3480156107c357600080fd5b506103156107d2366004613f37565b612706565b3480156107e357600080fd5b5061041d6107f2366004613d10565b612884565b34801561080357600080fd5b506102e0610812366004613ff7565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561085957600080fd5b50610315610868366004613d10565b6128bc565b600061087882612973565b80610887575061088782612a54565b92915050565b610895612aeb565b61089d612b6c565b6108a78282612bf1565b6040805173ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201527fe12d7d5bdb8218a22277dca8f854dd4573a1cea3d3e4808dc567df9eb1c14bf491015b60405180910390a15050565b60606003805461091790614021565b80601f016020809104026020016040519081016040528092919081815260200182805461094390614021565b80156109905780601f1061096557610100808354040283529160200191610990565b820191906000526020600020905b81548152906001019060200180831161097357829003601f168201915b5050505050905090565b60006109a582612d6a565b6109d2576109d27fcf4700e400000000000000000000000000000000000000000000000000000000612dc9565b5060009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b610a03612aeb565b610a0b612b6c565b600e80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527fe2bc7c34ea2bc57664d5a8700a7476e09714d671ef6a2ef218add7c058e8b2f3906020015b60405180910390a150565b610a7d82826001612dd3565b5050565b6040805160c08101825260008082526020820181905291810182905260608082018190526080820181905260a08201529060015b60ff8181161015610b035760ff8082166000908152600f60205260409020541615610aec5781610ae4816140a3565b925050610af1565b610b03565b80610afb816140c6565b915050610ab5565b506040805160c08101825260009181019190915260608082018190526080820181905260a0820152600e5460ff81161515825262010000900461ffff166020820152610b526002546001540390565b63ffffffff9081166040830152821667ffffffffffffffff811115610b7957610b79613bb7565b604051908082528060200260200182016040528015610ba2578160200160208202803683370190505b50606082015263ffffffff821667ffffffffffffffff811115610bc757610bc7613bb7565b604051908082528060200260200182016040528015610bf0578160200160208202803683370190505b5060a082015263ffffffff821667ffffffffffffffff811115610c1557610c15613bb7565b604051908082528060200260200182016040528015610c3e578160200160208202803683370190505b50608082015260005b8263ffffffff168160ff161015610ea7576000610c658260016140e5565b60ff8181166000908152600f60209081526040808320815160c08101835281549586161515815263ffffffff610100870416938101939093526501000000000090940461ffff16908201526001830154606082015260028301805494955091939092916080840191610cd690614021565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0290614021565b8015610d4f5780601f10610d2457610100808354040283529160200191610d4f565b820191906000526020600020905b815481529060010190602001808311610d3257829003601f168201915b50505050508152602001600382018054610d6890614021565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9490614021565b8015610de15780601f10610db657610100808354040283529160200191610de1565b820191906000526020600020905b815481529060010190602001808311610dc457829003601f168201915b50505050508152505090508060000151610dfc575050610ea7565b806020015184606001518460ff1681518110610e1a57610e1a6140fe565b602002602001019063ffffffff16908163ffffffff168152505080606001518460a001518460ff1681518110610e5257610e526140fe565b602002602001018181525050806040015184608001518460ff1681518110610e7c57610e7c6140fe565b602002602001019061ffff16908161ffff168152505050508080610e9f906140c6565b915050610c47565b5092915050565b6000610ebf8263ffffffff16612d6a565b610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604760248201527f444545503a3a746f6b656e4964546f56617269616e7449643a4552433732314d60448201527f657461646174613a55524920717565727920666f72206e6f6e6578697374656e60648201527f7420746f6b656e00000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b63ffffffff80831660009081526010602052604081205490911690819003610887576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f444545503a3a746f6b656e4964546f56617269616e7449643a4e6f207661726960448201527f616e7449642073657420666f7220746f6b656e496400000000000000000000006064820152608401610f6d565b600061102b82612eeb565b73ffffffffffffffffffffffffffffffffffffffff9485169490915081168414611078576110787fa114810000000000000000000000000000000000000000000000000000000000612dc9565b600082815260076020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff88169091141761110c5773ffffffffffffffffffffffffffffffffffffffff8616600090815260086020908152604080832033845290915290205460ff1661110c5761110c7f59c896be00000000000000000000000000000000000000000000000000000000612dc9565b801561111757600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600560205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003611206576001840160008181526005602052604081205490036112045760015481146112045760008181526005602052604090208490555b505b73ffffffffffffffffffffffffffffffffffffffff85168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003611276576112767fea553b3400000000000000000000000000000000000000000000000000000000612dc9565b50505050505050565b6000828152600a6020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692820192909252829161133a57506040805180820190915260095473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b60208101516000906127109061135e906bffffffffffffffffffffffff168761412d565b6113689190614144565b915196919550909350505050565b61137e612aeb565b61138661301c565b565b6113a383838360405180602001604052806000815250612025565b505050565b6113b0612aeb565b6113b8612b6c565b600e8054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790556040517f936953bf8d0bde80d770cbcdc11a11bb7543ea7d6810004d3824146d7347b12790610a6690831515815260200190565b611426612aeb565b61142e612b6c565b600c61143a82826141cd565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610a66919061395a565b611472612aeb565b61147a612b6c565b63ffffffff82166000908152600f602052604090205460ff1661151f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f444545503a3a73657456617269616e7450726963653a56617269616e7420494460448201527f206e6f74207365740000000000000000000000000000000000000000000000006064820152608401610f6d565b63ffffffff82166000818152600f602052604090819020600101839055517f0b8732d6cc69b09c8eb3f9d4389f842490f8a8c16194ea6d0d9b034ca11cf2289061156c9084815260200190565b60405180910390a25050565b600061088782612eeb565b606061158d613099565b905090565b61159a612aeb565b6115a2612b6c565b73ffffffffffffffffffffffffffffffffffffffff8116611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f444545503a3a7365744d696e74526f79616c747952656365697665723a52656360448201527f65697665722063616e6e6f7420626520302061646472657373000000000000006064820152608401610f6d565b601280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff82166116d2576116d27f8f4eb60400000000000000000000000000000000000000000000000000000000612dc9565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205467ffffffffffffffff1690565b61170d612aeb565b61138660006130a8565b61171f61311d565b611727612b6c565b3360009081526011602052604090205460ff166117c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f444545503a3a6163636573734c6973744d696e743a53656e646572206e6f742060448201527f6f6e20616363657373206c6973740000000000000000000000000000000000006064820152608401610f6d565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f9091529190912073ffffffffffffffffffffffffffffffffffffffff85166118b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f444545503a3a6163636573734c6973744d696e743a43616e6e6f74206d696e7460448201527f20746f20302061646472657373000000000000000000000000000000000000006064820152608401610f6d565b8160200151611944576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f444545503a3a6163636573734c6973744d696e743a446576206d696e7420636c60448201527f6f736564000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b816040015161ffff16841115801561195b57508315155b6119e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f444545503a3a6163636573734c6973744d696e743a556e737570706f7274656460448201527f207175616e7469747900000000000000000000000000000000000000000000006064820152608401610f6d565b805460ff16611a78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f444545503a3a6163636573734c6973744d696e743a56617269616e742049442060448201527f6e6f7420736574000000000000000000000000000000000000000000000000006064820152608401610f6d565b6000611a876002546001540390565b9050805b611a9b63ffffffff8316876142e7565b8163ffffffff161015611b3b5763ffffffff81811660008181526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000016948a1694851790555173ffffffffffffffffffffffffffffffffffffffff8b169392917fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd91a480611b33816140a3565b915050611a8b565b50815485908390600590611b5d90849065010000000000900461ffff166142fa565b92506101000a81548161ffff021916908361ffff160217905550611b818686613190565b5050506113a36001600b55565b611b96612aeb565b6113866131aa565b611be36040518060c00160405280600015158152602001600063ffffffff168152602001600061ffff1681526020016000815260200160608152602001606081525090565b63ffffffff82166000908152600f602052604090205460ff16611c87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f444545503a3a76617269616e74446174613a56617269616e74204944206e6f7460448201527f20736574000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b63ffffffff8281166000908152600f6020908152604091829020825160c081018452815460ff8116151582526101008104909516928101929092526501000000000090930461ffff169181019190915260018201546060820152600282018054919291608084019190611cf990614021565b80601f0160208091040260200160405190810160405280929190818152602001828054611d2590614021565b8015611d725780601f10611d4757610100808354040283529160200191611d72565b820191906000526020600020905b815481529060010190602001808311611d5557829003601f168201915b50505050508152602001600382018054611d8b90614021565b80601f0160208091040260200160405190810160405280929190818152602001828054611db790614021565b8015611e045780601f10611dd957610100808354040283529160200191611e04565b820191906000526020600020905b815481529060010190602001808311611de757829003601f168201915b5050505050815250509050919050565b60606004805461091790614021565b611e2b612aeb565b611e3361311d565b611e3b612b6c565b601254604051479160009173ffffffffffffffffffffffffffffffffffffffff9091169047908381818185875af1925050503d8060008114611e99576040519150601f19603f3d011682016040523d82523d6000602084013e611e9e565b606091505b5050905080611f2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f444545503a3a77697468647261775061796d656e743a5472616e73666572206660448201527f61696c65642e00000000000000000000000000000000000000000000000000006064820152608401610f6d565b6012546040805173ffffffffffffffffffffffffffffffffffffffff9092168252602082018490527f84511ecc081974f18e7f3e0dcc19db078b55bbd3852ddd0dd85b3aebb7bf94c2910160405180910390a150506113866001600b55565b33600081815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612030848484611020565b73ffffffffffffffffffffffffffffffffffffffff83163b156120865761205984848484613219565b612086576120867fd1a57ed600000000000000000000000000000000000000000000000000000000612dc9565b50505050565b606061209782612d6a565b612123576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f444545503a3a746f6b655552493a4552433732314d657461646174613a55524960448201527f20717565727920666f72206e6f6e6578697374656e7420746f6b656e000000006064820152608401610f6d565b63ffffffff808316600090815260106020908152604080832054909316808352600f9091529190205460ff166121db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f444545503a3a746f6b656e5552493a2056617269616e74204944206e6f74207360448201527f65740000000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b63ffffffff81166000908152600f6020526040812060020180546121fe90614021565b80601f016020809104026020016040519081016040528092919081815260200182805461222a90614021565b80156122775780601f1061224c57610100808354040283529160200191612277565b820191906000526020600020905b81548152906001019060200180831161225a57829003601f168201915b50505063ffffffff85166000908152600f60205260408120600301805494955090939092506122a69150614021565b80601f01602080910402602001604051908101604052809291908181526020018280546122d290614021565b801561231f5780601f106122f45761010080835404028352916020019161231f565b820191906000526020600020905b81548152906001019060200180831161230257829003601f168201915b5050505050905061234e6123388663ffffffff1661338a565b6123478563ffffffff1661338a565b8484613448565b95945050505050565b61235f61311d565b612367612b6c565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f9091529190912073ffffffffffffffffffffffffffffffffffffffff8516612455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f444545503a3a6d696e743a43616e6e6f74206d696e7420746f2030206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b81516124bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f444545503a3a6d696e743a4d696e7420636c6f736564000000000000000000006044820152606401610f6d565b816040015161ffff1684111580156124d457508315155b61253a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f444545503a3a6d696e743a556e737570706f72746564207175616e74697479006044820152606401610f6d565b805460ff166125a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f444545503a3a6d696e743a56617269616e74204944206e6f74207365740000006044820152606401610f6d565b60018101546125b4908561412d565b341015612643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f444545503a3a6d696e743a45746865722076616c75652073656e74206973206960448201527f6e636f72726563740000000000000000000000000000000000000000000000006064820152608401610f6d565b60006126526002546001540390565b9050805b61266663ffffffff8316876142e7565b8163ffffffff161015611b3b5763ffffffff81811660008181526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000016948a1694851790555173ffffffffffffffffffffffffffffffffffffffff8b169392917fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd91a4806126fe816140a3565b915050612656565b61270e612aeb565b612716612b6c565b80518251146127a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f444545503a3a7570646174654163636573734c6973743a4172726179206c656e60448201527f6774687320646f206e6f74206d617463680000000000000000000000000000006064820152608401610f6d565b60005b8251811015612852578181815181106127c5576127c56140fe565b6020026020010151601160008584815181106127e3576127e36140fe565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061284a81614315565b9150506127aa565b507fdb4cad279a893422aa79c49ff874a7db86281bf1d23b51050c37733516f4229182826040516108fc92919061434d565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600660205260408082205467ffffffffffffffff911c16610887565b6128c4612aeb565b73ffffffffffffffffffffffffffffffffffffffff8116612967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f6d565b612970816130a8565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480612a0657507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806108875750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061088757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610887565b60005473ffffffffffffffffffffffffffffffffffffffff163314611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f6d565b60005474010000000000000000000000000000000000000000900460ff1615611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f6d565b6127106bffffffffffffffffffffffff82161115612c91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610f6d565b73ffffffffffffffffffffffffffffffffffffffff8216612d0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f6d565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600955565b6000600154821015612dc45760005b5060008281526005602052604081205490819003612da157612d9a836143e0565b9250612d79565b7c0100000000000000000000000000000000000000000000000000000000161590505b919050565b8060005260046000fd5b6000612dde83611578565b9050818015612e0357503373ffffffffffffffffffffffffffffffffffffffff821614155b15612e695773ffffffffffffffffffffffffffffffffffffffff8116600090815260086020908152604080832033845290915290205460ff16612e6957612e697fcfb3b94200000000000000000000000000000000000000000000000000000000612dc9565b60008381526007602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b60008181526005602052604081205490819003612fc7576001548210612f3457612f347fdf2d9b4200000000000000000000000000000000000000000000000000000000612dc9565b5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600560205260409020548015612f35577c01000000000000000000000000000000000000000000000000000000008116600003612f9957919050565b612fc27fdf2d9b4200000000000000000000000000000000000000000000000000000000612dc9565b612f35565b7c01000000000000000000000000000000000000000000000000000000008116600003612ff357919050565b612dc47fdf2d9b4200000000000000000000000000000000000000000000000000000000612dc9565b61302461350b565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6060600c805461091790614021565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002600b5403613189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f6d565b6002600b55565b610a7d82826040518060200160405280600081525061358f565b6131b2612b6c565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861306f3390565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613274903390899088908890600401614415565b6020604051808303816000875af19250505080156132cd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526132ca91810190614454565b60015b61333b573d8080156132fb576040519150601f19603f3d011682016040523d82523d6000602084013e613300565b606091505b508051600003613333576133337fd1a57ed600000000000000000000000000000000000000000000000000000000612dc9565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b606060006133978361361e565b600101905060008167ffffffffffffffff8111156133b7576133b7613bb7565b6040519080825280601f01601f1916602001820160405280156133e1576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846133eb57509392505050565b6060600061348b856040518060400160405280600481526020017f2e706e6700000000000000000000000000000000000000000000000000000000815250613700565b905060006134ce866040518060400160405280600481526020017f2e6d703400000000000000000000000000000000000000000000000000000000815250613700565b905086858888600d8887876040516020016134f098979695949392919061451e565b60405160208183030381529060405292505050949350505050565b60005474010000000000000000000000000000000000000000900460ff16611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f6d565b613599838361372f565b73ffffffffffffffffffffffffffffffffffffffff83163b156113a3576001548281035b6135d06000868380600101945086613219565b6135fd576135fd7fd1a57ed600000000000000000000000000000000000000000000000000000000612dc9565b8181106135bd578160015414613617576136176000612dc9565b5050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613667577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613693576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106136b157662386f26fc10000830492506010015b6305f5e10083106136c9576305f5e100830492506008015b61271083106136dd57612710830492506004015b606483106136ef576064830492506002015b600a83106108875760010192915050565b6060600c838360405160200161371893929190614722565b604051602081830303815290604052905092915050565b6001546000829003613764576137647fb562e8dd00000000000000000000000000000000000000000000000000000000612dc9565b600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87164260a01b6001881460e11b178117909155808452600690925282208054680100000000000000018602019055908190036137e9576137e97f2e07630000000000000000000000000000000000000000000000000000000000612dc9565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a48181600101915081036137ee575060015550505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461297057600080fd5b60006020828403121561386e57600080fd5b81356138798161382e565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612dc457600080fd5b600080604083850312156138b757600080fd5b6138c083613880565b915060208301356bffffffffffffffffffffffff811681146138e157600080fd5b809150509250929050565b60005b838110156139075781810151838201526020016138ef565b50506000910152565b600081518084526139288160208601602086016138ec565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006138796020830184613910565b60006020828403121561397f57600080fd5b5035919050565b80358015158114612dc457600080fd5b6000602082840312156139a857600080fd5b61387982613986565b600080604083850312156139c457600080fd5b6139cd83613880565b946020939093013593505050565b600081518084526020808501945080840160005b83811015613a0f57815161ffff16875295820195908201906001016139ef565b509495945050505050565b600081518084526020808501945080840160005b83811015613a0f57815187529582019590820190600101613a2e565b6000602080835260e08301845115158285015261ffff82860151166040850152604085015163ffffffff80821660608701526060870151915060c06080870152828251808552610100880191508584019450600093505b80841015613ac357845183168252938501936001939093019290850190613aa1565b50608088015194507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09350838782030160a0880152613b0281866139db565b945050505060a0850151818584030160c0860152613b208382613a1a565b9695505050505050565b803563ffffffff81168114612dc457600080fd5b600060208284031215613b5057600080fd5b61387982613b2a565b600080600060608486031215613b6e57600080fd5b613b7784613880565b9250613b8560208501613880565b9150604084013590509250925092565b60008060408385031215613ba857600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613c2d57613c2d613bb7565b604052919050565b600067ffffffffffffffff831115613c4f57613c4f613bb7565b613c8060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613be6565b9050828152838383011115613c9457600080fd5b828260208301376000602084830101529392505050565b600060208284031215613cbd57600080fd5b813567ffffffffffffffff811115613cd457600080fd5b8201601f81018413613ce557600080fd5b61338284823560208401613c35565b60008060408385031215613d0757600080fd5b6139cd83613b2a565b600060208284031215613d2257600080fd5b61387982613880565b600080600060608486031215613d4057600080fd5b613d4984613880565b925060208401359150613d5e60408501613b2a565b90509250925092565b6020815281511515602082015263ffffffff602083015116604082015261ffff6040830151166060820152606082015160808201526000608083015160c060a0840152613db760e0840182613910565b905060a08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160c085015261234e8282613910565b60008060408385031215613e0557600080fd5b613e0e83613880565b9150613e1c60208401613986565b90509250929050565b60008060008060808587031215613e3b57600080fd5b613e4485613880565b9350613e5260208601613880565b925060408501359150606085013567ffffffffffffffff811115613e7557600080fd5b8501601f81018713613e8657600080fd5b613e9587823560208401613c35565b91505092959194509250565b600067ffffffffffffffff821115613ebb57613ebb613bb7565b5060051b60200190565b600082601f830112613ed657600080fd5b81356020613eeb613ee683613ea1565b613be6565b82815260059290921b84018101918181019086841115613f0a57600080fd5b8286015b84811015613f2c57613f1f81613986565b8352918301918301613f0e565b509695505050505050565b60008060408385031215613f4a57600080fd5b823567ffffffffffffffff80821115613f6257600080fd5b818501915085601f830112613f7657600080fd5b81356020613f86613ee683613ea1565b82815260059290921b84018101918181019089841115613fa557600080fd5b948201945b83861015613fca57613fbb86613880565b82529482019490820190613faa565b96505086013592505080821115613fe057600080fd5b50613fed85828601613ec5565b9150509250929050565b6000806040838503121561400a57600080fd5b61401383613880565b9150613e1c60208401613880565b600181811c9082168061403557607f821691505b60208210810361406e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168181036140bc576140bc614074565b6001019392505050565b600060ff821660ff81036140dc576140dc614074565b60010192915050565b60ff818116838216019081111561088757610887614074565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808202811582820484141761088757610887614074565b60008261417a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b601f8211156113a357600081815260208120601f850160051c810160208610156141a65750805b601f850160051c820191505b818110156141c5578281556001016141b2565b505050505050565b815167ffffffffffffffff8111156141e7576141e7613bb7565b6141fb816141f58454614021565b8461417f565b602080601f83116001811461424e57600084156142185750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556141c5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561429b5788860151825594840194600190910190840161427c565b50858210156142d757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561088757610887614074565b61ffff818116838216019080821115610ea757610ea7614074565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361434657614346614074565b5060010190565b604080825283519082018190526000906020906060840190828701845b8281101561439c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161436a565b5050508381038285015284518082528583019183019060005b818110156143d35783511515835292840192918401916001016143b5565b5090979650505050505050565b6000816143ef576143ef614074565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613b206080830184613910565b60006020828403121561446657600080fd5b81516138798161382e565b600081516144838185602086016138ec565b9290920192915050565b6000815461449a81614021565b600182811680156144b257600181146144e557614514565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450614514565b8560005260208060002060005b8581101561450b5781548a8201529084019082016144f2565b50505082870194505b5050505092915050565b7f7b226964223a2200000000000000000000000000000000000000000000000000815260008951614556816007850160208e016138ec565b7f222c226e616d65223a22000000000000000000000000000000000000000000006007918401918201528951614593816011840160208e016138ec565b016145c0601182017f20230000000000000000000000000000000000000000000000000000000000009052565b6145cd601382018a614471565b7f222c2276617269616e744964223a220000000000000000000000000000000000815290506145ff600f820189614471565b7f222c22636f6c6c656374696f6e223a220000000000000000000000000000000081529050614631601082018861448d565b7f222c226465736372697074696f6e223a22000000000000000000000000000000815290506146636011820187614471565b7f222c22696d616765223a2200000000000000000000000000000000000000000081529050614695600b820186614471565b7f222c22616e696d6174696f6e5f75726c223a2200000000000000000000000000815290506146c76013820185614471565b7f222c202263726561746f72223a202254686520466162726963616e740000000081527f227d000000000000000000000000000000000000000000000000000000000000601c820152601e019b9a5050505050505050505050565b600061472e828661448d565b845161473e8183602089016138ec565b84519101906147518183602088016138ec565b019594505050505056fea2646970667358221220c68531962f79813dfca7620802ce6ce23ba44cd0ded49072f99cdfdc0ff8ea4764736f6c634300081200334e6577206d6f64656c7320656d657267652066726f6d20746865207072696d6f726469616c20646174617365742e506172616c6c656c2070726f63657373657320696e66696e6974656c7920657870616e64696e672e48796272696420696e74656c6c6967656e63652c2063726f73736272656564206372656174696f6e2e4120636f7079206f66206120636f7079206f6620636f7079206372656174657320736f6d657468696e67206e65772e5374796c6520756e6b6e6f776e2c2063726561746976697479207265646566696e65642e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f6c65656c612e6d7970696e6174612e636c6f75642f697066732f516d515935774633416d42546b506265564348375135426d35485a416374654b5278484370706d723364736b76432f000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102bb5760003560e01c80636d35bfb91161016e578063a118babd116100cb578063d0047acf1161007f578063dc33e68111610064578063dc33e681146107d7578063e985e9c5146107f7578063f2fde38b1461084d57600080fd5b8063d0047acf146107a4578063d3c6f6c7146107b757600080fd5b8063ad5b882c116100b0578063ad5b882c14610744578063b88d4fde14610771578063c87b56dd1461078457600080fd5b8063a118babd1461070f578063a22cb4651461072457600080fd5b806387a5b67c116101225780638da5cb5b116101075780638da5cb5b1461067e57806390aa0b0f146106a957806395d89b41146106fa57600080fd5b806387a5b67c146106215780638d784d5e1461065157600080fd5b8063715018a611610153578063715018a6146105e45780638127d864146105f95780638456cb591461060c57600080fd5b80636d35bfb9146105a457806370a08231146105c457600080fd5b80632913daa01161021c57806355f804b3116101d05780635c975abb116101b55780635c975abb1461053f5780636352211e1461056f5780636c0360eb1461058f57600080fd5b806355f804b3146104ff578063597d10071461051f57600080fd5b80633f4ba83a116102015780633f4ba83a146104b757806342842e0e146104cc57806353b2a7d0146104df57600080fd5b80632913daa01461043e5780632a55205a1461046b57600080fd5b8063095ea7b3116102735780630e87c673116102585780630e87c673146103d357806318160ddd1461040857806323b872dd1461042b57600080fd5b8063095ea7b31461039e5780630b6d18de146103b157600080fd5b806306fdde03116102a457806306fdde0314610317578063081812fc14610339578063085a10cf1461037e57600080fd5b806301ffc9a7146102c057806304634d8d146102f5575b600080fd5b3480156102cc57600080fd5b506102e06102db36600461385c565b61086d565b60405190151581526020015b60405180910390f35b34801561030157600080fd5b506103156103103660046138a4565b61088d565b005b34801561032357600080fd5b5061032c610908565b6040516102ec919061395a565b34801561034557600080fd5b5061035961035436600461396d565b61099a565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b34801561038a57600080fd5b50610315610399366004613996565b6109fb565b6103156103ac3660046139b1565b610a71565b3480156103bd57600080fd5b506103c6610a81565b6040516102ec9190613a4a565b3480156103df57600080fd5b506103f36103ee366004613b3e565b610eae565b60405163ffffffff90911681526020016102ec565b34801561041457600080fd5b50600254600154035b6040519081526020016102ec565b610315610439366004613b59565b611020565b34801561044a57600080fd5b50600e5462010000900461ffff1660405161ffff90911681526020016102ec565b34801561047757600080fd5b5061048b610486366004613b95565b61127f565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016102ec565b3480156104c357600080fd5b50610315611376565b6103156104da366004613b59565b611388565b3480156104eb57600080fd5b506103156104fa366004613996565b6113a8565b34801561050b57600080fd5b5061031561051a366004613cab565b61141e565b34801561052b57600080fd5b5061031561053a366004613cf4565b61146a565b34801561054b57600080fd5b5060005474010000000000000000000000000000000000000000900460ff166102e0565b34801561057b57600080fd5b5061035961058a36600461396d565b611578565b34801561059b57600080fd5b5061032c611583565b3480156105b057600080fd5b506103156105bf366004613d10565b611592565b3480156105d057600080fd5b5061041d6105df366004613d10565b61168c565b3480156105f057600080fd5b50610315611705565b610315610607366004613d2b565b611717565b34801561061857600080fd5b50610315611b8e565b34801561062d57600080fd5b506102e061063c366004613d10565b60116020526000908152604090205460ff1681565b34801561065d57600080fd5b5061067161066c366004613b3e565b611b9e565b6040516102ec9190613d67565b34801561068a57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610359565b3480156106b557600080fd5b50600e546106d99060ff8082169161010081049091169062010000900461ffff1683565b604080519315158452911515602084015261ffff16908201526060016102ec565b34801561070657600080fd5b5061032c611e14565b34801561071b57600080fd5b50610315611e23565b34801561073057600080fd5b5061031561073f366004613df2565b611f8e565b34801561075057600080fd5b506012546103599073ffffffffffffffffffffffffffffffffffffffff1681565b61031561077f366004613e25565b612025565b34801561079057600080fd5b5061032c61079f36600461396d565b61208c565b6103156107b2366004613d2b565b612357565b3480156107c357600080fd5b506103156107d2366004613f37565b612706565b3480156107e357600080fd5b5061041d6107f2366004613d10565b612884565b34801561080357600080fd5b506102e0610812366004613ff7565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561085957600080fd5b50610315610868366004613d10565b6128bc565b600061087882612973565b80610887575061088782612a54565b92915050565b610895612aeb565b61089d612b6c565b6108a78282612bf1565b6040805173ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201527fe12d7d5bdb8218a22277dca8f854dd4573a1cea3d3e4808dc567df9eb1c14bf491015b60405180910390a15050565b60606003805461091790614021565b80601f016020809104026020016040519081016040528092919081815260200182805461094390614021565b80156109905780601f1061096557610100808354040283529160200191610990565b820191906000526020600020905b81548152906001019060200180831161097357829003601f168201915b5050505050905090565b60006109a582612d6a565b6109d2576109d27fcf4700e400000000000000000000000000000000000000000000000000000000612dc9565b5060009081526007602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b610a03612aeb565b610a0b612b6c565b600e80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527fe2bc7c34ea2bc57664d5a8700a7476e09714d671ef6a2ef218add7c058e8b2f3906020015b60405180910390a150565b610a7d82826001612dd3565b5050565b6040805160c08101825260008082526020820181905291810182905260608082018190526080820181905260a08201529060015b60ff8181161015610b035760ff8082166000908152600f60205260409020541615610aec5781610ae4816140a3565b925050610af1565b610b03565b80610afb816140c6565b915050610ab5565b506040805160c08101825260009181019190915260608082018190526080820181905260a0820152600e5460ff81161515825262010000900461ffff166020820152610b526002546001540390565b63ffffffff9081166040830152821667ffffffffffffffff811115610b7957610b79613bb7565b604051908082528060200260200182016040528015610ba2578160200160208202803683370190505b50606082015263ffffffff821667ffffffffffffffff811115610bc757610bc7613bb7565b604051908082528060200260200182016040528015610bf0578160200160208202803683370190505b5060a082015263ffffffff821667ffffffffffffffff811115610c1557610c15613bb7565b604051908082528060200260200182016040528015610c3e578160200160208202803683370190505b50608082015260005b8263ffffffff168160ff161015610ea7576000610c658260016140e5565b60ff8181166000908152600f60209081526040808320815160c08101835281549586161515815263ffffffff610100870416938101939093526501000000000090940461ffff16908201526001830154606082015260028301805494955091939092916080840191610cd690614021565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0290614021565b8015610d4f5780601f10610d2457610100808354040283529160200191610d4f565b820191906000526020600020905b815481529060010190602001808311610d3257829003601f168201915b50505050508152602001600382018054610d6890614021565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9490614021565b8015610de15780601f10610db657610100808354040283529160200191610de1565b820191906000526020600020905b815481529060010190602001808311610dc457829003601f168201915b50505050508152505090508060000151610dfc575050610ea7565b806020015184606001518460ff1681518110610e1a57610e1a6140fe565b602002602001019063ffffffff16908163ffffffff168152505080606001518460a001518460ff1681518110610e5257610e526140fe565b602002602001018181525050806040015184608001518460ff1681518110610e7c57610e7c6140fe565b602002602001019061ffff16908161ffff168152505050508080610e9f906140c6565b915050610c47565b5092915050565b6000610ebf8263ffffffff16612d6a565b610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604760248201527f444545503a3a746f6b656e4964546f56617269616e7449643a4552433732314d60448201527f657461646174613a55524920717565727920666f72206e6f6e6578697374656e60648201527f7420746f6b656e00000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b63ffffffff80831660009081526010602052604081205490911690819003610887576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f444545503a3a746f6b656e4964546f56617269616e7449643a4e6f207661726960448201527f616e7449642073657420666f7220746f6b656e496400000000000000000000006064820152608401610f6d565b600061102b82612eeb565b73ffffffffffffffffffffffffffffffffffffffff9485169490915081168414611078576110787fa114810000000000000000000000000000000000000000000000000000000000612dc9565b600082815260076020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff88169091141761110c5773ffffffffffffffffffffffffffffffffffffffff8616600090815260086020908152604080832033845290915290205460ff1661110c5761110c7f59c896be00000000000000000000000000000000000000000000000000000000612dc9565b801561111757600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526006602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600560205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003611206576001840160008181526005602052604081205490036112045760015481146112045760008181526005602052604090208490555b505b73ffffffffffffffffffffffffffffffffffffffff85168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003611276576112767fea553b3400000000000000000000000000000000000000000000000000000000612dc9565b50505050505050565b6000828152600a6020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692820192909252829161133a57506040805180820190915260095473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b60208101516000906127109061135e906bffffffffffffffffffffffff168761412d565b6113689190614144565b915196919550909350505050565b61137e612aeb565b61138661301c565b565b6113a383838360405180602001604052806000815250612025565b505050565b6113b0612aeb565b6113b8612b6c565b600e8054821515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9091161790556040517f936953bf8d0bde80d770cbcdc11a11bb7543ea7d6810004d3824146d7347b12790610a6690831515815260200190565b611426612aeb565b61142e612b6c565b600c61143a82826141cd565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad81604051610a66919061395a565b611472612aeb565b61147a612b6c565b63ffffffff82166000908152600f602052604090205460ff1661151f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f444545503a3a73657456617269616e7450726963653a56617269616e7420494460448201527f206e6f74207365740000000000000000000000000000000000000000000000006064820152608401610f6d565b63ffffffff82166000818152600f602052604090819020600101839055517f0b8732d6cc69b09c8eb3f9d4389f842490f8a8c16194ea6d0d9b034ca11cf2289061156c9084815260200190565b60405180910390a25050565b600061088782612eeb565b606061158d613099565b905090565b61159a612aeb565b6115a2612b6c565b73ffffffffffffffffffffffffffffffffffffffff8116611645576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f444545503a3a7365744d696e74526f79616c747952656365697665723a52656360448201527f65697665722063616e6e6f7420626520302061646472657373000000000000006064820152608401610f6d565b601280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff82166116d2576116d27f8f4eb60400000000000000000000000000000000000000000000000000000000612dc9565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526006602052604090205467ffffffffffffffff1690565b61170d612aeb565b61138660006130a8565b61171f61311d565b611727612b6c565b3360009081526011602052604090205460ff166117c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f444545503a3a6163636573734c6973744d696e743a53656e646572206e6f742060448201527f6f6e20616363657373206c6973740000000000000000000000000000000000006064820152608401610f6d565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f9091529190912073ffffffffffffffffffffffffffffffffffffffff85166118b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f444545503a3a6163636573734c6973744d696e743a43616e6e6f74206d696e7460448201527f20746f20302061646472657373000000000000000000000000000000000000006064820152608401610f6d565b8160200151611944576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f444545503a3a6163636573734c6973744d696e743a446576206d696e7420636c60448201527f6f736564000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b816040015161ffff16841115801561195b57508315155b6119e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f444545503a3a6163636573734c6973744d696e743a556e737570706f7274656460448201527f207175616e7469747900000000000000000000000000000000000000000000006064820152608401610f6d565b805460ff16611a78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f444545503a3a6163636573734c6973744d696e743a56617269616e742049442060448201527f6e6f7420736574000000000000000000000000000000000000000000000000006064820152608401610f6d565b6000611a876002546001540390565b9050805b611a9b63ffffffff8316876142e7565b8163ffffffff161015611b3b5763ffffffff81811660008181526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000016948a1694851790555173ffffffffffffffffffffffffffffffffffffffff8b169392917fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd91a480611b33816140a3565b915050611a8b565b50815485908390600590611b5d90849065010000000000900461ffff166142fa565b92506101000a81548161ffff021916908361ffff160217905550611b818686613190565b5050506113a36001600b55565b611b96612aeb565b6113866131aa565b611be36040518060c00160405280600015158152602001600063ffffffff168152602001600061ffff1681526020016000815260200160608152602001606081525090565b63ffffffff82166000908152600f602052604090205460ff16611c87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f444545503a3a76617269616e74446174613a56617269616e74204944206e6f7460448201527f20736574000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b63ffffffff8281166000908152600f6020908152604091829020825160c081018452815460ff8116151582526101008104909516928101929092526501000000000090930461ffff169181019190915260018201546060820152600282018054919291608084019190611cf990614021565b80601f0160208091040260200160405190810160405280929190818152602001828054611d2590614021565b8015611d725780601f10611d4757610100808354040283529160200191611d72565b820191906000526020600020905b815481529060010190602001808311611d5557829003601f168201915b50505050508152602001600382018054611d8b90614021565b80601f0160208091040260200160405190810160405280929190818152602001828054611db790614021565b8015611e045780601f10611dd957610100808354040283529160200191611e04565b820191906000526020600020905b815481529060010190602001808311611de757829003601f168201915b5050505050815250509050919050565b60606004805461091790614021565b611e2b612aeb565b611e3361311d565b611e3b612b6c565b601254604051479160009173ffffffffffffffffffffffffffffffffffffffff9091169047908381818185875af1925050503d8060008114611e99576040519150601f19603f3d011682016040523d82523d6000602084013e611e9e565b606091505b5050905080611f2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f444545503a3a77697468647261775061796d656e743a5472616e73666572206660448201527f61696c65642e00000000000000000000000000000000000000000000000000006064820152608401610f6d565b6012546040805173ffffffffffffffffffffffffffffffffffffffff9092168252602082018490527f84511ecc081974f18e7f3e0dcc19db078b55bbd3852ddd0dd85b3aebb7bf94c2910160405180910390a150506113866001600b55565b33600081815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612030848484611020565b73ffffffffffffffffffffffffffffffffffffffff83163b156120865761205984848484613219565b612086576120867fd1a57ed600000000000000000000000000000000000000000000000000000000612dc9565b50505050565b606061209782612d6a565b612123576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f444545503a3a746f6b655552493a4552433732314d657461646174613a55524960448201527f20717565727920666f72206e6f6e6578697374656e7420746f6b656e000000006064820152608401610f6d565b63ffffffff808316600090815260106020908152604080832054909316808352600f9091529190205460ff166121db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f444545503a3a746f6b656e5552493a2056617269616e74204944206e6f74207360448201527f65740000000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b63ffffffff81166000908152600f6020526040812060020180546121fe90614021565b80601f016020809104026020016040519081016040528092919081815260200182805461222a90614021565b80156122775780601f1061224c57610100808354040283529160200191612277565b820191906000526020600020905b81548152906001019060200180831161225a57829003601f168201915b50505063ffffffff85166000908152600f60205260408120600301805494955090939092506122a69150614021565b80601f01602080910402602001604051908101604052809291908181526020018280546122d290614021565b801561231f5780601f106122f45761010080835404028352916020019161231f565b820191906000526020600020905b81548152906001019060200180831161230257829003601f168201915b5050505050905061234e6123388663ffffffff1661338a565b6123478563ffffffff1661338a565b8484613448565b95945050505050565b61235f61311d565b612367612b6c565b60408051606081018252600e5460ff8082161515835261010082041615156020808401919091526201000090910461ffff168284015263ffffffff84166000908152600f9091529190912073ffffffffffffffffffffffffffffffffffffffff8516612455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f444545503a3a6d696e743a43616e6e6f74206d696e7420746f2030206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610f6d565b81516124bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f444545503a3a6d696e743a4d696e7420636c6f736564000000000000000000006044820152606401610f6d565b816040015161ffff1684111580156124d457508315155b61253a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f444545503a3a6d696e743a556e737570706f72746564207175616e74697479006044820152606401610f6d565b805460ff166125a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f444545503a3a6d696e743a56617269616e74204944206e6f74207365740000006044820152606401610f6d565b60018101546125b4908561412d565b341015612643576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f444545503a3a6d696e743a45746865722076616c75652073656e74206973206960448201527f6e636f72726563740000000000000000000000000000000000000000000000006064820152608401610f6d565b60006126526002546001540390565b9050805b61266663ffffffff8316876142e7565b8163ffffffff161015611b3b5763ffffffff81811660008181526010602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000016948a1694851790555173ffffffffffffffffffffffffffffffffffffffff8b169392917fc5d74e3546027ffb88c35b9482cc5709820a3ca00985c5301614f1af680888fd91a4806126fe816140a3565b915050612656565b61270e612aeb565b612716612b6c565b80518251146127a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f444545503a3a7570646174654163636573734c6973743a4172726179206c656e60448201527f6774687320646f206e6f74206d617463680000000000000000000000000000006064820152608401610f6d565b60005b8251811015612852578181815181106127c5576127c56140fe565b6020026020010151601160008584815181106127e3576127e36140fe565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061284a81614315565b9150506127aa565b507fdb4cad279a893422aa79c49ff874a7db86281bf1d23b51050c37733516f4229182826040516108fc92919061434d565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600660205260408082205467ffffffffffffffff911c16610887565b6128c4612aeb565b73ffffffffffffffffffffffffffffffffffffffff8116612967576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610f6d565b612970816130a8565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480612a0657507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806108875750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a00000000000000000000000000000000000000000000000000000000148061088757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610887565b60005473ffffffffffffffffffffffffffffffffffffffff163314611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f6d565b60005474010000000000000000000000000000000000000000900460ff1615611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f6d565b6127106bffffffffffffffffffffffff82161115612c91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610f6d565b73ffffffffffffffffffffffffffffffffffffffff8216612d0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610f6d565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600955565b6000600154821015612dc45760005b5060008281526005602052604081205490819003612da157612d9a836143e0565b9250612d79565b7c0100000000000000000000000000000000000000000000000000000000161590505b919050565b8060005260046000fd5b6000612dde83611578565b9050818015612e0357503373ffffffffffffffffffffffffffffffffffffffff821614155b15612e695773ffffffffffffffffffffffffffffffffffffffff8116600090815260086020908152604080832033845290915290205460ff16612e6957612e697fcfb3b94200000000000000000000000000000000000000000000000000000000612dc9565b60008381526007602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b60008181526005602052604081205490819003612fc7576001548210612f3457612f347fdf2d9b4200000000000000000000000000000000000000000000000000000000612dc9565b5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600560205260409020548015612f35577c01000000000000000000000000000000000000000000000000000000008116600003612f9957919050565b612fc27fdf2d9b4200000000000000000000000000000000000000000000000000000000612dc9565b612f35565b7c01000000000000000000000000000000000000000000000000000000008116600003612ff357919050565b612dc47fdf2d9b4200000000000000000000000000000000000000000000000000000000612dc9565b61302461350b565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6060600c805461091790614021565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002600b5403613189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f6d565b6002600b55565b610a7d82826040518060200160405280600081525061358f565b6131b2612b6c565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861306f3390565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613274903390899088908890600401614415565b6020604051808303816000875af19250505080156132cd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526132ca91810190614454565b60015b61333b573d8080156132fb576040519150601f19603f3d011682016040523d82523d6000602084013e613300565b606091505b508051600003613333576133337fd1a57ed600000000000000000000000000000000000000000000000000000000612dc9565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b606060006133978361361e565b600101905060008167ffffffffffffffff8111156133b7576133b7613bb7565b6040519080825280601f01601f1916602001820160405280156133e1576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846133eb57509392505050565b6060600061348b856040518060400160405280600481526020017f2e706e6700000000000000000000000000000000000000000000000000000000815250613700565b905060006134ce866040518060400160405280600481526020017f2e6d703400000000000000000000000000000000000000000000000000000000815250613700565b905086858888600d8887876040516020016134f098979695949392919061451e565b60405160208183030381529060405292505050949350505050565b60005474010000000000000000000000000000000000000000900460ff16611386576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f6d565b613599838361372f565b73ffffffffffffffffffffffffffffffffffffffff83163b156113a3576001548281035b6135d06000868380600101945086613219565b6135fd576135fd7fd1a57ed600000000000000000000000000000000000000000000000000000000612dc9565b8181106135bd578160015414613617576136176000612dc9565b5050505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613667577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613693576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106136b157662386f26fc10000830492506010015b6305f5e10083106136c9576305f5e100830492506008015b61271083106136dd57612710830492506004015b606483106136ef576064830492506002015b600a83106108875760010192915050565b6060600c838360405160200161371893929190614722565b604051602081830303815290604052905092915050565b6001546000829003613764576137647fb562e8dd00000000000000000000000000000000000000000000000000000000612dc9565b600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87164260a01b6001881460e11b178117909155808452600690925282208054680100000000000000018602019055908190036137e9576137e97f2e07630000000000000000000000000000000000000000000000000000000000612dc9565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a48181600101915081036137ee575060015550505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461297057600080fd5b60006020828403121561386e57600080fd5b81356138798161382e565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114612dc457600080fd5b600080604083850312156138b757600080fd5b6138c083613880565b915060208301356bffffffffffffffffffffffff811681146138e157600080fd5b809150509250929050565b60005b838110156139075781810151838201526020016138ef565b50506000910152565b600081518084526139288160208601602086016138ec565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006138796020830184613910565b60006020828403121561397f57600080fd5b5035919050565b80358015158114612dc457600080fd5b6000602082840312156139a857600080fd5b61387982613986565b600080604083850312156139c457600080fd5b6139cd83613880565b946020939093013593505050565b600081518084526020808501945080840160005b83811015613a0f57815161ffff16875295820195908201906001016139ef565b509495945050505050565b600081518084526020808501945080840160005b83811015613a0f57815187529582019590820190600101613a2e565b6000602080835260e08301845115158285015261ffff82860151166040850152604085015163ffffffff80821660608701526060870151915060c06080870152828251808552610100880191508584019450600093505b80841015613ac357845183168252938501936001939093019290850190613aa1565b50608088015194507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09350838782030160a0880152613b0281866139db565b945050505060a0850151818584030160c0860152613b208382613a1a565b9695505050505050565b803563ffffffff81168114612dc457600080fd5b600060208284031215613b5057600080fd5b61387982613b2a565b600080600060608486031215613b6e57600080fd5b613b7784613880565b9250613b8560208501613880565b9150604084013590509250925092565b60008060408385031215613ba857600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613c2d57613c2d613bb7565b604052919050565b600067ffffffffffffffff831115613c4f57613c4f613bb7565b613c8060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613be6565b9050828152838383011115613c9457600080fd5b828260208301376000602084830101529392505050565b600060208284031215613cbd57600080fd5b813567ffffffffffffffff811115613cd457600080fd5b8201601f81018413613ce557600080fd5b61338284823560208401613c35565b60008060408385031215613d0757600080fd5b6139cd83613b2a565b600060208284031215613d2257600080fd5b61387982613880565b600080600060608486031215613d4057600080fd5b613d4984613880565b925060208401359150613d5e60408501613b2a565b90509250925092565b6020815281511515602082015263ffffffff602083015116604082015261ffff6040830151166060820152606082015160808201526000608083015160c060a0840152613db760e0840182613910565b905060a08401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160c085015261234e8282613910565b60008060408385031215613e0557600080fd5b613e0e83613880565b9150613e1c60208401613986565b90509250929050565b60008060008060808587031215613e3b57600080fd5b613e4485613880565b9350613e5260208601613880565b925060408501359150606085013567ffffffffffffffff811115613e7557600080fd5b8501601f81018713613e8657600080fd5b613e9587823560208401613c35565b91505092959194509250565b600067ffffffffffffffff821115613ebb57613ebb613bb7565b5060051b60200190565b600082601f830112613ed657600080fd5b81356020613eeb613ee683613ea1565b613be6565b82815260059290921b84018101918181019086841115613f0a57600080fd5b8286015b84811015613f2c57613f1f81613986565b8352918301918301613f0e565b509695505050505050565b60008060408385031215613f4a57600080fd5b823567ffffffffffffffff80821115613f6257600080fd5b818501915085601f830112613f7657600080fd5b81356020613f86613ee683613ea1565b82815260059290921b84018101918181019089841115613fa557600080fd5b948201945b83861015613fca57613fbb86613880565b82529482019490820190613faa565b96505086013592505080821115613fe057600080fd5b50613fed85828601613ec5565b9150509250929050565b6000806040838503121561400a57600080fd5b61401383613880565b9150613e1c60208401613880565b600181811c9082168061403557607f821691505b60208210810361406e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600063ffffffff8083168181036140bc576140bc614074565b6001019392505050565b600060ff821660ff81036140dc576140dc614074565b60010192915050565b60ff818116838216019081111561088757610887614074565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808202811582820484141761088757610887614074565b60008261417a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b601f8211156113a357600081815260208120601f850160051c810160208610156141a65750805b601f850160051c820191505b818110156141c5578281556001016141b2565b505050505050565b815167ffffffffffffffff8111156141e7576141e7613bb7565b6141fb816141f58454614021565b8461417f565b602080601f83116001811461424e57600084156142185750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556141c5565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561429b5788860151825594840194600190910190840161427c565b50858210156142d757878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561088757610887614074565b61ffff818116838216019080821115610ea757610ea7614074565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361434657614346614074565b5060010190565b604080825283519082018190526000906020906060840190828701845b8281101561439c57815173ffffffffffffffffffffffffffffffffffffffff168452928401929084019060010161436a565b5050508381038285015284518082528583019183019060005b818110156143d35783511515835292840192918401916001016143b5565b5090979650505050505050565b6000816143ef576143ef614074565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152613b206080830184613910565b60006020828403121561446657600080fd5b81516138798161382e565b600081516144838185602086016138ec565b9290920192915050565b6000815461449a81614021565b600182811680156144b257600181146144e557614514565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450614514565b8560005260208060002060005b8581101561450b5781548a8201529084019082016144f2565b50505082870194505b5050505092915050565b7f7b226964223a2200000000000000000000000000000000000000000000000000815260008951614556816007850160208e016138ec565b7f222c226e616d65223a22000000000000000000000000000000000000000000006007918401918201528951614593816011840160208e016138ec565b016145c0601182017f20230000000000000000000000000000000000000000000000000000000000009052565b6145cd601382018a614471565b7f222c2276617269616e744964223a220000000000000000000000000000000000815290506145ff600f820189614471565b7f222c22636f6c6c656374696f6e223a220000000000000000000000000000000081529050614631601082018861448d565b7f222c226465736372697074696f6e223a22000000000000000000000000000000815290506146636011820187614471565b7f222c22696d616765223a2200000000000000000000000000000000000000000081529050614695600b820186614471565b7f222c22616e696d6174696f6e5f75726c223a2200000000000000000000000000815290506146c76013820185614471565b7f222c202263726561746f72223a202254686520466162726963616e740000000081527f227d000000000000000000000000000000000000000000000000000000000000601c820152601e019b9a5050505050505050505050565b600061472e828661448d565b845161473e8183602089016138ec565b84519101906147518183602088016138ec565b019594505050505056fea2646970667358221220c68531962f79813dfca7620802ce6ce23ba44cd0ded49072f99cdfdc0ff8ea4764736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f6c65656c612e6d7970696e6174612e636c6f75642f697066732f516d515935774633416d42546b506265564348375135426d35485a416374654b5278484370706d723364736b76432f000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _baseURIString (string): https://leela.mypinata.cloud/ipfs/QmQY5wF3AmBTkPbeVCH7Q5Bm5HZActeKRxHCppmr3dskvC/
Arg [1] : _royaltyBasisPoints (uint96): 500
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [3] : 68747470733a2f2f6c65656c612e6d7970696e6174612e636c6f75642f697066
Arg [4] : 732f516d515935774633416d42546b506265564348375135426d35485a416374
Arg [5] : 654b5278484370706d723364736b76432f000000000000000000000000000000
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.