diff --git a/packages/deploy/deployments/amoy/NFTCollection_Implementation.json b/packages/deploy/deployments/amoy/NFTCollection_Implementation.json new file mode 100644 index 0000000000..ee51986798 --- /dev/null +++ b/packages/deploy/deployments/amoy/NFTCollection_Implementation.json @@ -0,0 +1,3541 @@ +{ + "address": "0x01b2D89Ab4252f0245970730c7B3768764C64716", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "AlreadyRegistered", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "CannotMint", + "type": "error" + }, + { + "inputs": [], + "name": "ContractNotConfigured", + "type": "error" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidDefaultRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidDefaultRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numerator", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "denominator", + "type": "uint256" + } + ], + "name": "ERC2981InvalidTokenRoyalty", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC2981InvalidTokenRoyaltyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedBurn", + "type": "error" + }, + { + "inputs": [], + "name": "EnforcedPause", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedBurn", + "type": "error" + }, + { + "inputs": [], + "name": "ExpectedPause", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Metadata", + "name": "allowedToExecuteMint", + "type": "address" + } + ], + "name": "InvalidAllowedToExecuteMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "baseURI", + "type": "string" + } + ], + "name": "InvalidBaseTokenURI", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBatchData", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "InvalidName", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "signAddress", + "type": "address" + } + ], + "name": "InvalidSignAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "signatureId", + "type": "uint256" + } + ], + "name": "InvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "InvalidSymbol", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "mintTreasury", + "type": "address" + } + ], + "name": "InvalidTreasury", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveMaxTokensOverall", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "waveMaxTokensPerWallet", + "type": "uint256" + } + ], + "name": "InvalidWaveData", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "LowMaxSupply", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "OperatorNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "RegistryNotSet", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20", + "name": "oldToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IERC20", + "name": "newToken", + "type": "address" + } + ], + "name": "AllowedExecuteMintSet", + "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": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "oldBaseURI", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "newBaseURI", + "type": "string" + } + ], + "name": "BaseURISet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + } + ], + "name": "BatchMetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "string", + "name": "baseURI", + "type": "string" + }, + { + "indexed": true, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": true, + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "mintTreasury", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "signAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract IERC20Metadata", + "name": "allowedToExecuteMint", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "maxSupply", + "type": "uint256" + } + ], + "name": "ContractInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IOperatorFilterRegistry", + "name": "registry", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "subscriptionOrRegistrant", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "subscribe", + "type": "bool" + } + ], + "name": "ContractRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "DefaultRoyaltyReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "feeNumerator", + "type": "uint96" + } + ], + "name": "DefaultRoyaltySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxSupply", + "type": "uint256" + } + ], + "name": "MaxSupplySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "MetadataUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IOperatorFilterRegistry", + "name": "oldRegistry", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newRegistry", + "type": "address" + } + ], + "name": "OperatorRegistrySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "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": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "personalizationMask", + "type": "uint256" + } + ], + "name": "Personalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldSignAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newSignAddress", + "type": "address" + } + ], + "name": "SignAddressSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "burner", + "type": "address" + } + ], + "name": "TokenBurned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "TokenBurningDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "TokenBurningEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "TokenRoyaltyReset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "feeNumerator", + "type": "uint96" + } + ], + "name": "TokenRoyaltySet", + "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": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldTreasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasury", + "type": "address" + } + ], + "name": "TreasurySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldForwarder", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newForwarder", + "type": "address" + } + ], + "name": "TrustedForwarderSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "waveMaxTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "waveMaxTokensToBuy", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "waveSingleTokenPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + } + ], + "name": "WaveSetup", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "allowedToExecuteMint", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseTokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct NFTCollection.BatchMintingData[]", + "name": "wallets", + "type": "tuple[]" + } + ], + "name": "batchMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "batchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "burnedTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previousOwner", + "type": "address" + } + ], + "name": "burnedTokensCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burnerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + } + ], + "name": "cancelWave", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "chain", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "previousOwner", + "type": "address" + } + ], + "name": "didBurnTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disableBurning", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "enableBurning", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "feeDenominator", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "signatureId", + "type": "uint256" + } + ], + "name": "getSignatureType", + "outputs": [ + { + "internalType": "enum NFTCollectionSignature.SignatureType", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collectionOwner", + "type": "address" + }, + { + "internalType": "string", + "name": "_initialBaseURI", + "type": "string" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "address payable", + "name": "_mintTreasury", + "type": "address" + }, + { + "internalType": "address", + "name": "_signAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_initialTrustedForwarder", + "type": "address" + }, + { + "internalType": "contract IERC20Metadata", + "name": "_allowedToExecuteMint", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxSupply", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "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": "isBurnEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "isMintAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "isTrustedForwarder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signatureId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "mintTreasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operatorFilterRegistry", + "outputs": [ + { + "internalType": "contract IOperatorFilterRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "personalizationMask", + "type": "uint256" + } + ], + "name": "operatorPersonalize", + "outputs": [], + "stateMutability": "nonpayable", + "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": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "personalizationOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "personalizationMask", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signatureId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "personalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "subscriptionOrRegistrantToCopy", + "type": "address" + }, + { + "internalType": "bool", + "name": "subscribe", + "type": "bool" + } + ], + "name": "register", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resetDefaultRoyalty", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "resetTokenRoyalty", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signatureId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "reveal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Metadata", + "name": "minterToken", + "type": "address" + } + ], + "name": "setAllowedExecuteMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "baseURI", + "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": "uint256", + "name": "_maxSupply", + "type": "uint256" + } + ], + "name": "setMaxSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "registry", + "type": "address" + } + ], + "name": "setOperatorRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_signAddress", + "type": "address" + } + ], + "name": "setSignAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint96", + "name": "feeNumerator", + "type": "uint96" + } + ], + "name": "setTokenRoyalty", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "treasury", + "type": "address" + } + ], + "name": "setTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "forwarder", + "type": "address" + } + ], + "name": "setTrustedForwarder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_waveMaxTokensOverall", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_waveMaxTokensPerWallet", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_waveSingleTokenPrice", + "type": "uint256" + } + ], + "name": "setupWave", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "signAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "trustedForwarder", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "waveCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + } + ], + "name": "waveMaxTokensOverall", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + } + ], + "name": "waveMaxTokensPerWallet", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "wallet", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "signatureId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "waveMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "waveOwnerToClaimedCounts", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + } + ], + "name": "waveSingleTokenPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "waveIndex", + "type": "uint256" + } + ], + "name": "waveTotalMinted", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xfce61558f76bd4c5ab3e7c8accbf98752acc7d6f2b0d3a918c8803e82e4be8f3", + "receipt": { + "to": null, + "from": "0x5F890c9522dCE5670d741D4277BFCC2d9cA8Af02", + "contractAddress": "0x01b2D89Ab4252f0245970730c7B3768764C64716", + "transactionIndex": 0, + "gasUsed": "5236300", + "logsBloom": "0x00000000000000000000000000000000000000002000000000000000000000000002000000000000000000000000000000008000000000000000000040000000000000000000000000200000000000800000000000000000000100000000000000000000000000100000000000000000000000000000000080000000000000000000000000000000000800000000000000000000000080000000000000200000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000004000000108000000000000000080000000000001000000000000000000000000000000000000000100000", + "blockHash": "0xde0e8c8cfa4894adf5fbc04e6b353c085f6f96de3fee182212df87693b2db5a2", + "transactionHash": "0xfce61558f76bd4c5ab3e7c8accbf98752acc7d6f2b0d3a918c8803e82e4be8f3", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 15438945, + "transactionHash": "0xfce61558f76bd4c5ab3e7c8accbf98752acc7d6f2b0d3a918c8803e82e4be8f3", + "address": "0x01b2D89Ab4252f0245970730c7B3768764C64716", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "logIndex": 0, + "blockHash": "0xde0e8c8cfa4894adf5fbc04e6b353c085f6f96de3fee182212df87693b2db5a2" + }, + { + "transactionIndex": 0, + "blockNumber": 15438945, + "transactionHash": "0xfce61558f76bd4c5ab3e7c8accbf98752acc7d6f2b0d3a918c8803e82e4be8f3", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x0000000000000000000000005f890c9522dce5670d741d4277bfcc2d9ca8af02", + "0x0000000000000000000000004631753190f2f5a15a7ba172bbac102b7d95fa22" + ], + "data": "0x000000000000000000000000000000000000000000000000028b1b8c75a0698c0000000000000000000000000000000000000000000000012d8cd0b63fe1e9c0000000000000000000000000000000000000000000000374161709df09ee85fe0000000000000000000000000000000000000000000000012b01b529ca41803400000000000000000000000000000000000000000000037418a2256b7f8eef8a", + "logIndex": 1, + "blockHash": "0xde0e8c8cfa4894adf5fbc04e6b353c085f6f96de3fee182212df87693b2db5a2" + } + ], + "blockNumber": 15438945, + "cumulativeGasUsed": "5236300", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "d4df534bdfed54cd2444d6da84f0b936", + "metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"AlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CannotMint\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ContractNotConfigured\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"}],\"name\":\"ERC2981InvalidDefaultRoyalty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC2981InvalidDefaultRoyaltyReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numerator\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"denominator\",\"type\":\"uint256\"}],\"name\":\"ERC2981InvalidTokenRoyalty\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC2981InvalidTokenRoyaltyReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721IncorrectOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721InsufficientApproval\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOperator\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC721InvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC721InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC721InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ERC721NonexistentToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EnforcedBurn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EnforcedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpectedBurn\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpectedPause\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"allowedToExecuteMint\",\"type\":\"address\"}],\"name\":\"InvalidAllowedToExecuteMint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"baseURI\",\"type\":\"string\"}],\"name\":\"InvalidBaseTokenURI\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBatchData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"InvalidName\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signAddress\",\"type\":\"address\"}],\"name\":\"InvalidSignAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureId\",\"type\":\"uint256\"}],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"InvalidSymbol\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"mintTreasury\",\"type\":\"address\"}],\"name\":\"InvalidTreasury\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveMaxTokensOverall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"waveMaxTokensPerWallet\",\"type\":\"uint256\"}],\"name\":\"InvalidWaveData\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"LowMaxSupply\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"OperatorNotAllowed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrancyGuardReentrantCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"RegistryNotSet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"oldToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IERC20\",\"name\":\"newToken\",\"type\":\"address\"}],\"name\":\"AllowedExecuteMintSet\",\"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\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"oldBaseURI\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newBaseURI\",\"type\":\"string\"}],\"name\":\"BaseURISet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_fromTokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_toTokenId\",\"type\":\"uint256\"}],\"name\":\"BatchMetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"baseURI\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"mintTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"signAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract IERC20Metadata\",\"name\":\"allowedToExecuteMint\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSupply\",\"type\":\"uint256\"}],\"name\":\"ContractInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IOperatorFilterRegistry\",\"name\":\"registry\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriptionOrRegistrant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"subscribe\",\"type\":\"bool\"}],\"name\":\"ContractRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"DefaultRoyaltyReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"feeNumerator\",\"type\":\"uint96\"}],\"name\":\"DefaultRoyaltySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxSupply\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMaxSupply\",\"type\":\"uint256\"}],\"name\":\"MaxSupplySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"MetadataUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IOperatorFilterRegistry\",\"name\":\"oldRegistry\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRegistry\",\"type\":\"address\"}],\"name\":\"OperatorRegistrySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferStarted\",\"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\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"personalizationMask\",\"type\":\"uint256\"}],\"name\":\"Personalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldSignAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newSignAddress\",\"type\":\"address\"}],\"name\":\"SignAddressSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"burner\",\"type\":\"address\"}],\"name\":\"TokenBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"TokenBurningDisabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"TokenBurningEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"TokenRoyaltyReset\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"feeNumerator\",\"type\":\"uint96\"}],\"name\":\"TokenRoyaltySet\",\"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\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldTreasury\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newTreasury\",\"type\":\"address\"}],\"name\":\"TreasurySet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldForwarder\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newForwarder\",\"type\":\"address\"}],\"name\":\"TrustedForwarderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"waveMaxTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"waveMaxTokensToBuy\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"waveSingleTokenPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"}],\"name\":\"WaveSetup\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowedToExecuteMint\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseTokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct NFTCollection.BatchMintingData[]\",\"name\":\"wallets\",\"type\":\"tuple[]\"}],\"name\":\"batchMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"batchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"burnedTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"burnedTokensCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burnerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"}],\"name\":\"cancelWave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chain\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"didBurnTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableBurning\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enableBurning\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"feeDenominator\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"signatureId\",\"type\":\"uint256\"}],\"name\":\"getSignatureType\",\"outputs\":[{\"internalType\":\"enum NFTCollectionSignature.SignatureType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_collectionOwner\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_initialBaseURI\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address payable\",\"name\":\"_mintTreasury\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_signAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_initialTrustedForwarder\",\"type\":\"address\"},{\"internalType\":\"contract IERC20Metadata\",\"name\":\"_allowedToExecuteMint\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxSupply\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"isBurnEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"isMintAllowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"isTrustedForwarder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"operatorFilterRegistry\",\"outputs\":[{\"internalType\":\"contract IOperatorFilterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"personalizationMask\",\"type\":\"uint256\"}],\"name\":\"operatorPersonalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"personalizationOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"personalizationMask\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"personalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"subscriptionOrRegistrantToCopy\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"subscribe\",\"type\":\"bool\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetDefaultRoyalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"resetTokenRoyalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"reveal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"salePrice\",\"type\":\"uint256\"}],\"name\":\"royaltyInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Metadata\",\"name\":\"minterToken\",\"type\":\"address\"}],\"name\":\"setAllowedExecuteMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"baseURI\",\"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\":\"uint256\",\"name\":\"_maxSupply\",\"type\":\"uint256\"}],\"name\":\"setMaxSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"setOperatorRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_signAddress\",\"type\":\"address\"}],\"name\":\"setSignAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"feeNumerator\",\"type\":\"uint96\"}],\"name\":\"setTokenRoyalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"treasury\",\"type\":\"address\"}],\"name\":\"setTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"forwarder\",\"type\":\"address\"}],\"name\":\"setTrustedForwarder\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_waveMaxTokensOverall\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_waveMaxTokensPerWallet\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_waveSingleTokenPrice\",\"type\":\"uint256\"}],\"name\":\"setupWave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"signAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedForwarder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"waveCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"}],\"name\":\"waveMaxTokensOverall\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"}],\"name\":\"waveMaxTokensPerWallet\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wallet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"waveMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"waveOwnerToClaimedCounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"}],\"name\":\"waveSingleTokenPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"waveIndex\",\"type\":\"uint256\"}],\"name\":\"waveTotalMinted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Sandbox\",\"custom:security-contact\":\"contact-blockchain@sandbox.game\",\"details\":\"Some features: - upgradable - ownable (2 step transfer) - OpenSea royalty compliant - ERC2981 compliant - ERC4906 compliant - ERC165 compliant - supports ERC2771 for services like Biconomy - supports \\\"burn memory\\\" - keeping track of who burned what token for faster in-game gating checks - minting is supported via an ERC20 token contract that supports approveAndCall as mint price is in non-native tokens - custom batch operations for minting and transfer\",\"errors\":{\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"AddressInsufficientBalance(address)\":[{\"details\":\"The ETH balance of the account is not enough to perform the operation.\"}],\"AlreadyRegistered(address)\":[{\"params\":{\"operator\":\"that does the call\"}}],\"CannotMint(address,uint256)\":[{\"params\":{\"amount\":\"amount to be checked if can be minted\",\"wallet\":\"wallet to be checked if it can mint\"}}],\"ECDSAInvalidSignature()\":[{\"details\":\"The signature derives the `address(0)`.\"}],\"ECDSAInvalidSignatureLength(uint256)\":[{\"details\":\"The signature has an invalid length.\"}],\"ECDSAInvalidSignatureS(bytes32)\":[{\"details\":\"The signature has an S value that is in the upper half order.\"}],\"ERC2981InvalidDefaultRoyalty(uint256,uint256)\":[{\"details\":\"The default royalty set is invalid (eg. (numerator / denominator) >= 1).\"}],\"ERC2981InvalidDefaultRoyaltyReceiver(address)\":[{\"details\":\"The default royalty receiver is invalid.\"}],\"ERC2981InvalidTokenRoyalty(uint256,uint256,uint256)\":[{\"details\":\"The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).\"}],\"ERC2981InvalidTokenRoyaltyReceiver(uint256,address)\":[{\"details\":\"The royalty receiver for `tokenId` is invalid.\"}],\"ERC721IncorrectOwner(address,uint256,address)\":[{\"details\":\"Indicates an error related to the ownership over a particular token. Used in transfers.\",\"params\":{\"owner\":\"Address of the current owner of a token.\",\"sender\":\"Address whose tokens are being transferred.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InsufficientApproval(address,uint256)\":[{\"details\":\"Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\",\"tokenId\":\"Identifier number of a token.\"}}],\"ERC721InvalidApprover(address)\":[{\"details\":\"Indicates a failure with the `approver` of a token to be approved. Used in approvals.\",\"params\":{\"approver\":\"Address initiating an approval operation.\"}}],\"ERC721InvalidOperator(address)\":[{\"details\":\"Indicates a failure with the `operator` to be approved. Used in approvals.\",\"params\":{\"operator\":\"Address that may be allowed to operate on tokens without being their owner.\"}}],\"ERC721InvalidOwner(address)\":[{\"details\":\"Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.\",\"params\":{\"owner\":\"Address of the current owner of a token.\"}}],\"ERC721InvalidReceiver(address)\":[{\"details\":\"Indicates a failure with the token `receiver`. Used in transfers.\",\"params\":{\"receiver\":\"Address to which tokens are being transferred.\"}}],\"ERC721InvalidSender(address)\":[{\"details\":\"Indicates a failure with the token `sender`. Used in transfers.\",\"params\":{\"sender\":\"Address whose tokens are being transferred.\"}}],\"ERC721NonexistentToken(uint256)\":[{\"details\":\"Indicates a `tokenId` whose `owner` is the zero address.\",\"params\":{\"tokenId\":\"Identifier number of a token.\"}}],\"EnforcedPause()\":[{\"details\":\"The operation failed because the contract is paused.\"}],\"ExpectedPause()\":[{\"details\":\"The operation failed because the contract is not paused.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}],\"InvalidAllowedToExecuteMint(address)\":[{\"params\":{\"allowedToExecuteMint\":\"token address that is used for payments and that is allowed to execute mint\"}}],\"InvalidBaseTokenURI(string)\":[{\"params\":{\"baseURI\":\"an URI that will be used as the base for token URI\"}}],\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"InvalidName(string)\":[{\"params\":{\"name\":\"name of the ERC721 token\"}}],\"InvalidSignAddress(address)\":[{\"params\":{\"signAddress\":\"signer address that is allowed to create mint signatures\"}}],\"InvalidSignature(uint256)\":[{\"params\":{\"signatureId\":\"the ID of the provided signature\"}}],\"InvalidSymbol(string)\":[{\"params\":{\"symbol\":\"token symbol of the ERC721 token\"}}],\"InvalidTreasury(address)\":[{\"params\":{\"mintTreasury\":\"collection treasury address (where the payments are sent)\"}}],\"InvalidWaveData(uint256,uint256)\":[{\"params\":{\"waveMaxTokensOverall\":\"the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\",\"waveMaxTokensPerWallet\":\"max tokens to buy, per wallet in a given wave\"}}],\"LowMaxSupply(uint256,uint256)\":[{\"params\":{\"maxSupply\":\"max supply of tokens to be allowed to be minted per contract\",\"totalSupply\":\"amount of tokens minted till now\"}}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OperatorNotAllowed(address)\":[{\"params\":{\"operator\":\"that does the call\"}}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}],\"ReentrancyGuardReentrantCall()\":[{\"details\":\"Unauthorized reentrant call.\"}],\"RegistryNotSet(address)\":[{\"params\":{\"operator\":\"that does the call\"}}],\"SafeERC20FailedOperation(address)\":[{\"details\":\"An operation with an ERC20 token failed.\"}]},\"events\":{\"AllowedExecuteMintSet(address,address,address)\":{\"details\":\"emitted when setAllowedExecuteMint is called\",\"params\":{\"newToken\":\"new address that is used for payments and that is allowed to execute mint\",\"oldToken\":\"old address that is used for payments and that is allowed to execute mint\",\"operator\":\"the sender of the transaction\"}},\"Approval(address,address,uint256)\":{\"details\":\"Emitted when `owner` enables `approved` to manage the `tokenId` token.\"},\"ApprovalForAll(address,address,bool)\":{\"details\":\"Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\"},\"BaseURISet(address,string,string)\":{\"details\":\"emitted when setBaseURI is called\",\"params\":{\"newBaseURI\":\"new URI that will be used as the base for token metadata URI\",\"oldBaseURI\":\"old URI that will be used as the base for token metadata URI\",\"operator\":\"the sender of the transaction\"}},\"BatchMetadataUpdate(uint256,uint256)\":{\"details\":\"This event emits when the metadata of a range of tokens is changed. So that the third-party platforms such as NFT market could timely update the images and related attributes of the NFTs.\"},\"ContractInitialized(string,string,string,address,address,address,uint256)\":{\"details\":\"emitted at proxy startup, only once\",\"params\":{\"allowedToExecuteMint\":\"token address that is used for payments and that is allowed to execute mint\",\"baseURI\":\"an URI that will be used as the base for token URI\",\"maxSupply\":\"max supply of tokens to be allowed to be minted per contract\",\"mintTreasury\":\"collection treasury address (where the payments are sent)\",\"name\":\"name of the ERC721 token\",\"signAddress\":\"signer address that is allowed to create mint signatures\",\"symbol\":\"token symbol of the ERC721 token\"}},\"ContractRegistered(address,address,address,bool)\":{\"params\":{\"operator\":\"the sender of the transaction\",\"registry\":\"address of the registry to set\",\"subscribe\":\"should it subscribe\",\"subscriptionOrRegistrant\":\"address to subscribe or copy entries from\"}},\"DefaultRoyaltyReset(address)\":{\"params\":{\"operator\":\"the sender of the transaction\"}},\"DefaultRoyaltySet(address,address,uint96)\":{\"params\":{\"feeNumerator\":\"percentage of the royalties in feeDenominator units\",\"operator\":\"the sender of the transaction\",\"receiver\":\"the receiver of the royalties\"}},\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"MaxSupplySet(address,uint256,uint256)\":{\"details\":\"emitted when setSignAddress is called\",\"params\":{\"newMaxSupply\":\"new maximum amount of tokens that can be minted\",\"oldMaxSupply\":\"old maximum amount of tokens that can be minted\",\"operator\":\"the sender of the transaction\"}},\"MetadataUpdate(uint256)\":{\"details\":\"This event emits when the metadata of a token is changed. So that the third-party platforms such as NFT market could timely update the images and related attributes of the NFT.\"},\"OperatorRegistrySet(address,address,address)\":{\"params\":{\"newRegistry\":\"address of the new registry to set\",\"oldRegistry\":\"address of the old registry\",\"operator\":\"the sender of the transaction\"}},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Personalized(address,uint256,uint256)\":{\"details\":\"emitted when personalize is called\",\"params\":{\"operator\":\"the sender of the transaction\",\"personalizationMask\":\"the exact personalization that was done, as a custom meaning bit-mask\",\"tokenId\":\"id of the token which had the personalization done\"}},\"SignAddressSet(address,address,address)\":{\"details\":\"emitted when setSignAddress is called\",\"params\":{\"newSignAddress\":\"new signer address that is allowed to create mint signatures\",\"oldSignAddress\":\"old signer address that is allowed to create mint signatures\",\"operator\":\"the sender of the transaction\"}},\"TokenBurned(address,uint256,address)\":{\"params\":{\"burner\":\"the owner that burned the token\",\"operator\":\"the sender of the transaction\",\"tokenId\":\"the id of the token that was burned\"}},\"TokenBurningDisabled(address)\":{\"params\":{\"operator\":\"the sender of the transaction\"}},\"TokenBurningEnabled(address)\":{\"params\":{\"operator\":\"the sender of the transaction\"}},\"TokenRoyaltyReset(address,uint256)\":{\"params\":{\"operator\":\"the sender of the transaction\"}},\"TokenRoyaltySet(address,uint256,address,uint96)\":{\"params\":{\"feeNumerator\":\"percentage of the royalties in feeDenominator units\",\"operator\":\"the sender of the transaction\",\"receiver\":\"the receiver of the royalties\",\"tokenId\":\"the token id\"}},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `tokenId` token is transferred from `from` to `to`.\"},\"TreasurySet(address,address,address)\":{\"details\":\"emitted when setTreasury is called\",\"params\":{\"newTreasury\":\"new collection treasury address (where the payments are sent)\",\"oldTreasury\":\"old collection treasury address (where the payments are sent)\",\"operator\":\"the sender of the transaction\"}},\"TrustedForwarderSet(address,address,address)\":{\"params\":{\"newForwarder\":\"the new trusted forwarder address\",\"oldForwarder\":\"the old trusted forwarder address\",\"operator\":\"the sender of the transaction\"}},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WaveSetup(address,uint256,uint256,uint256,uint256)\":{\"details\":\"emitted when setupWave is called\",\"params\":{\"operator\":\"the sender of the transaction\",\"waveIndex\":\"the current wave index\",\"waveMaxTokens\":\"the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\",\"waveMaxTokensToBuy\":\"max tokens to buy, per wallet in a given wave\",\"waveSingleTokenPrice\":\"the price to mint a token in a given wave, in wei\"}}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"approve(address,uint256)\":{\"details\":\"See OpenZeppelin {IERC721-approve}\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"batchMint(uint256,(address,uint256)[])\":{\"details\":\"this methods takes a list of destination wallets and can only be used by the owner of the contract\",\"params\":{\"wallets\":\"list of destination wallets and amounts\",\"waveIndex\":\"the index of the wave used to mint\"}},\"batchTransferFrom(address,address,uint256[])\":{\"params\":{\"from\":\"The sender of the token.\",\"ids\":\"The ids of the tokens.\",\"to\":\"The recipient of the token.\"}},\"burn(uint256)\":{\"details\":\"See {ERC721BurnMemoryEnumerableUpgradeable.burn}.\",\"params\":{\"tokenId\":\"the token id to be burned\"}},\"burnedTokens(address,uint256)\":{\"params\":{\"index\":\"of the burnedTokens array\",\"previousOwner\":\"the owner to check for burned tokens\"},\"returns\":{\"_0\":\"the list of burned tokens by the indicated owner indexed by index\"}},\"burnedTokensCount(address)\":{\"params\":{\"previousOwner\":\"the owner to check for burned tokens\"},\"returns\":{\"_0\":\"number of burned tokens by the indicated owner\"}},\"burner(uint256)\":{\"details\":\"same as burnerOf, kept here to be backward compatible\",\"params\":{\"tokenId\":\"the tokenId to be checked who burned it\"},\"returns\":{\"_0\":\"the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet.\"}},\"burnerOf(uint256)\":{\"params\":{\"tokenId\":\"the tokenId to be checked who burned it\"},\"returns\":{\"_0\":\"the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet.\"}},\"cancelWave(uint256)\":{\"params\":{\"waveIndex\":\"the index of the wave to be canceled\"}},\"chain()\":{\"returns\":{\"_0\":\"current chainID for the blockchain\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"didBurnTokens(address)\":{\"params\":{\"previousOwner\":\"the owner to check for burned tokens\"},\"returns\":{\"_0\":\"true if the address burned any tokens\"}},\"disableBurning()\":{\"details\":\"reverts if burning already disabled.\"},\"enableBurning()\":{\"details\":\"reverts if burning already enabled.\"},\"feeDenominator()\":{\"details\":\"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.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getSignatureType(uint256)\":{\"params\":{\"signatureId\":\"signing signature ID\"}},\"initialize(address,string,string,string,address,address,address,address,uint256)\":{\"details\":\"calls all the init functions from the base classes. Emits {ContractInitialized} event\",\"params\":{\"_allowedToExecuteMint\":\"token address that is used for payments and that is allowed to execute mint\",\"_collectionOwner\":\"the address that will be set as the owner of the collection\",\"_initialBaseURI\":\"an URI that will be used as the base for token URI\",\"_initialTrustedForwarder\":\"trusted forwarder address\",\"_maxSupply\":\"max supply of tokens to be allowed to be minted per contract\",\"_mintTreasury\":\"collection treasury address (where the payments are sent)\",\"_name\":\"name of the ERC721 token\",\"_signAddress\":\"signer address that is allowed to create mint signatures\",\"_symbol\":\"token symbol of the ERC721 token\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"isMintAllowed(uint256,address,uint256)\":{\"params\":{\"amount\":\"amount to be checked if can be minted\",\"wallet\":\"wallet to be checked if it can mint\",\"waveIndex\":\"the index of the wave used to mint\"},\"returns\":{\"_0\":\"if can mint or not\"}},\"isTrustedForwarder(address)\":{\"params\":{\"forwarder\":\"the address ot the trusted forwarder to check\"},\"returns\":{\"_0\":\"true if forwarder is the trusted forwarder address\"}},\"mint(address,uint256,uint256,bytes)\":{\"details\":\"this method is backward compatible with the previous contract, so, it uses last configured wave\",\"params\":{\"amount\":\"number of token to mint\",\"signature\":\"signing signature value\",\"signatureId\":\"signing signature ID\",\"wallet\":\"minting wallet\"}},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"operatorPersonalize(uint256,uint256)\":{\"details\":\"reverts if token does not exist or if not authorized\",\"params\":{\"personalizationMask\":\"a mask where each bit has a custom meaning in-game\",\"tokenId\":\"what token to personalize\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"pause()\":{\"details\":\"reverts if not owner of the collection or if not un-paused\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"personalizationOf(uint256)\":{\"params\":{\"tokenId\":\"the token ID to check\"},\"returns\":{\"_0\":\"the personalization data as uint256\"}},\"personalize(uint256,uint256,uint256,bytes)\":{\"details\":\"after checks, it is reduced to personalizationTraits[_tokenId] = _personalizationMask\",\"params\":{\"personalizationMask\":\"a mask where each bit has a custom meaning in-game\",\"signature\":\"signing signature\",\"signatureId\":\"the ID of the provided signature\",\"tokenId\":\"what token to personalize\"}},\"register(address,bool)\":{\"details\":\"subscriptionOrRegistrantToCopy == address(0), just register\",\"params\":{\"subscribe\":\"bool to signify subscription 'true' or to copy the list 'false'.\",\"subscriptionOrRegistrantToCopy\":\"registration address of the list to subscribe.\"}},\"renounceOwnership()\":{\"details\":\"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.\"},\"reveal(uint256,uint256,bytes)\":{\"details\":\"will revert if owner of token is not caller or if signature is not valid\",\"params\":{\"signature\":\"validation signature\",\"signatureId\":\"validation signature ID\",\"tokenId\":\"the ID belonging to the NFT token for which to emit the event\"}},\"royaltyInfo(uint256,uint256)\":{\"details\":\"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.\"},\"safeBatchTransferFrom(address,address,uint256[],bytes)\":{\"params\":{\"data\":\"Additional data.\",\"from\":\"The sender of the token.\",\"ids\":\"The ids of the tokens.\",\"to\":\"The recipient of the token.\"}},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See OpenZeppelin {IERC721-safeTransferFrom}\"},\"setAllowedExecuteMint(address)\":{\"details\":\"also resets default mint price\",\"params\":{\"minterToken\":\"the address that will be allowed to execute the mint function\"}},\"setApprovalForAll(address,bool)\":{\"details\":\"See OpenZeppelin {IERC721-setApprovalForAll}\"},\"setBaseURI(string)\":{\"params\":{\"baseURI\":\"an URI that will be used as the base for token URI\"}},\"setDefaultRoyalty(address,uint96)\":{\"params\":{\"feeNumerator\":\"percentage of the royalties in feeDenominator units\",\"receiver\":\"the receiver of the royalties\"}},\"setMaxSupply(uint256)\":{\"params\":{\"_maxSupply\":\"maximum amount of tokens that can be minted\"}},\"setOperatorRegistry(address)\":{\"params\":{\"registry\":\"the address of the registry\"}},\"setSignAddress(address)\":{\"params\":{\"_signAddress\":\"new signer address to be set\"}},\"setTokenRoyalty(uint256,address,uint96)\":{\"params\":{\"feeNumerator\":\"percentage of the royalties in feeDenominator units\",\"receiver\":\"the receiver of the royalties\",\"tokenId\":\"the tokenId for\"}},\"setTreasury(address)\":{\"params\":{\"treasury\":\"new treasury address to be saved\"}},\"setTrustedForwarder(address)\":{\"details\":\"address(0) disables the forwarder\",\"params\":{\"forwarder\":\"the new trusted forwarder address\"}},\"setupWave(uint256,uint256,uint256)\":{\"params\":{\"_waveMaxTokensOverall\":\"the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\",\"_waveMaxTokensPerWallet\":\"max tokens to buy, per wallet in a given wave\",\"_waveSingleTokenPrice\":\"the price to mint a token in a given wave, in wei denoted by the allowedToExecuteMint contract\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See OpenZeppelin {IERC721-transferFrom}\"},\"transferOwnership(address)\":{\"details\":\"Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.\"},\"trustedForwarder()\":{\"returns\":{\"_0\":\"the trusted forwarder address\"}},\"unpause()\":{\"details\":\"reverts if not owner of the collection or if not paused\"},\"waveMaxTokensOverall(uint256)\":{\"params\":{\"waveIndex\":\"the index of the wave used to mint\"}},\"waveMaxTokensPerWallet(uint256)\":{\"params\":{\"waveIndex\":\"the index of the wave used to mint\"}},\"waveMint(address,uint256,uint256,uint256,bytes)\":{\"params\":{\"amount\":\"number of token to mint\",\"signature\":\"signing signature value\",\"signatureId\":\"signing signature ID\",\"wallet\":\"minting wallet\",\"waveIndex\":\"the index of the wave used to mint\"}},\"waveOwnerToClaimedCounts(uint256,address)\":{\"params\":{\"owner\":\"the owner for which the count is returned\",\"waveIndex\":\"the index of the wave used to mint\"}},\"waveSingleTokenPrice(uint256)\":{\"params\":{\"waveIndex\":\"the index of the wave used to mint\"}},\"waveTotalMinted(uint256)\":{\"params\":{\"waveIndex\":\"the index of the wave used to mint\"}}},\"stateVariables\":{\"NFT_COLLECTION_STORAGE_LOCATION\":{\"custom:storage-location\":\"erc7201:thesandbox.storage.avatar.nft-collection.NFTCollection\"}},\"title\":\"NFTCollection\",\"version\":1},\"userdoc\":{\"errors\":{\"AlreadyRegistered(address)\":[{\"notice\":\"this contract is already registered\"}],\"CannotMint(address,uint256)\":[{\"notice\":\"The operation failed because the wave is completed\"}],\"ContractNotConfigured()\":[{\"notice\":\"The operation failed the wave index is zero, no wave was ever configured\"}],\"EnforcedBurn()\":[{\"notice\":\"The operation failed because burning is enabled.\"}],\"ExpectedBurn()\":[{\"notice\":\"The operation failed because burning is disabled.\"}],\"InvalidAllowedToExecuteMint(address)\":[{\"notice\":\"The operation failed because the allowedToExecuteMint is not a contract or wrong\"}],\"InvalidBaseTokenURI(string)\":[{\"notice\":\"The operation failed because the base token uri is empty.\"}],\"InvalidBatchData()\":[{\"notice\":\"The operation failed because the batch data len is zero\"}],\"InvalidName(string)\":[{\"notice\":\"The operation failed because the token name is invalid\"}],\"InvalidSignAddress(address)\":[{\"notice\":\"The operation failed because the signAddress is wrong\"}],\"InvalidSignature(uint256)\":[{\"notice\":\"The operation failed because signature is invalid or it was already used\"}],\"InvalidSymbol(string)\":[{\"notice\":\"The operation failed because the token symbol is invalid\"}],\"InvalidTreasury(address)\":[{\"notice\":\"The operation failed because the treasury is wrong\"}],\"InvalidWaveData(uint256,uint256)\":[{\"notice\":\"The operation failed because the wave arguments are wrong\"}],\"LowMaxSupply(uint256,uint256)\":[{\"notice\":\"The operation failed because the maxSupply is lower than totalSupply\"}],\"OperatorNotAllowed(address)\":[{\"notice\":\"the caller is not the operator\"}],\"RegistryNotSet(address)\":[{\"notice\":\"the registry is not configured\"}]},\"events\":{\"AllowedExecuteMintSet(address,address,address)\":{\"notice\":\"Event emitted when an address was set as allowed to mint\"},\"BaseURISet(address,string,string)\":{\"notice\":\"Event emitted when the base token URI for the contract was set or changed\"},\"ContractInitialized(string,string,string,address,address,address,uint256)\":{\"notice\":\"Event emitted when the contract was initialized.\"},\"ContractRegistered(address,address,address,bool)\":{\"notice\":\"emitted when the contract is registered into the registry\"},\"DefaultRoyaltyReset(address)\":{\"notice\":\"Event emitted when default royalties are reset\"},\"DefaultRoyaltySet(address,address,uint96)\":{\"notice\":\"Event emitted when a token personalization was made.\"},\"MaxSupplySet(address,uint256,uint256)\":{\"notice\":\"Event emitted when the max supply is set or changed\"},\"OperatorRegistrySet(address,address,address)\":{\"notice\":\"emitted when a registry is set\"},\"Personalized(address,uint256,uint256)\":{\"notice\":\"Event emitted when a token personalization was made.\"},\"SignAddressSet(address,address,address)\":{\"notice\":\"Event emitted when the signer address was set or changed\"},\"TokenBurned(address,uint256,address)\":{\"notice\":\"event emitted when a token was burned\"},\"TokenBurningDisabled(address)\":{\"notice\":\"event emitted when token burning was disabled\"},\"TokenBurningEnabled(address)\":{\"notice\":\"event emitted when token burning was enabled\"},\"TokenRoyaltyReset(address,uint256)\":{\"notice\":\"Event emitted when default royalties are reset\"},\"TokenRoyaltySet(address,uint256,address,uint96)\":{\"notice\":\"Event emitted when a token personalization was made.\"},\"TreasurySet(address,address,address)\":{\"notice\":\"Event emitted when the treasury address was saved\"},\"TrustedForwarderSet(address,address,address)\":{\"notice\":\"emitted when the trusted forwarder is set\"},\"WaveSetup(address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when a wave was set up\"}},\"kind\":\"user\",\"methods\":{\"allowedToExecuteMint()\":{\"notice\":\"return ERC20 contract through which the minting will be done (approveAndCall)\"},\"baseTokenURI()\":{\"notice\":\"return standard base token URL for ERC721 metadata\"},\"batchMint(uint256,(address,uint256)[])\":{\"notice\":\"batch minting function, used by owner to airdrop directly to users.\"},\"batchTransferFrom(address,address,uint256[])\":{\"notice\":\"Transfer many tokens between 2 addresses.\"},\"burn(uint256)\":{\"notice\":\"Burns `tokenId`. The caller must own `tokenId` or be an approved operator.\"},\"burnedTokens(address,uint256)\":{\"notice\":\"Gets the list of burned tokens by the indicated owner\"},\"burnedTokensCount(address)\":{\"notice\":\"Gets the number of burned tokens by the indicated owner\"},\"burner(uint256)\":{\"notice\":\"Returns the burner of the `tokenId`\"},\"burnerOf(uint256)\":{\"notice\":\"Returns the burner of the `tokenId`\"},\"cancelWave(uint256)\":{\"notice\":\"function to setup wave parameters. A wave is defined as a combination of allowed number tokens to be minted in total, per wallet and minting price\"},\"chain()\":{\"notice\":\"helper automation function\"},\"didBurnTokens(address)\":{\"notice\":\"Checks if the indicated owner had burned tokens\"},\"disableBurning()\":{\"notice\":\"disables burning of tokens\"},\"enableBurning()\":{\"notice\":\"enables burning of tokens\"},\"getSignatureType(uint256)\":{\"notice\":\"return true if the signature id was used\"},\"initialize(address,string,string,string,address,address,address,address,uint256)\":{\"notice\":\"external entry point initialization function in accordance with the upgradable pattern\"},\"isBurnEnabled()\":{\"notice\":\"Return true if burning is enabled\"},\"isMintAllowed(uint256,address,uint256)\":{\"notice\":\"check if the indicated wallet can mint the indicated amount\"},\"isTrustedForwarder(address)\":{\"notice\":\"Indicates whether any particular address is the trusted forwarder.\"},\"maxSupply()\":{\"notice\":\"return maximum amount of tokens that can be minted\"},\"mint(address,uint256,uint256,bytes)\":{\"notice\":\"token minting function on the last wave. Price is set by wave and is paid in tokens denoted by the allowedToExecuteMint contract\"},\"mintTreasury()\":{\"notice\":\"return treasury address where the payment for minting are sent\"},\"operatorFilterRegistry()\":{\"notice\":\"return the operatorFilterRegistry address\"},\"operatorPersonalize(uint256,uint256)\":{\"notice\":\"personalize token traits but can be called by owner or special roles address Used to change the traits of a token based on an in-game action\"},\"pause()\":{\"notice\":\"pauses the contract\"},\"personalizationOf(uint256)\":{\"notice\":\"get the personalization of the indicated tokenID\"},\"personalize(uint256,uint256,uint256,bytes)\":{\"notice\":\"personalize token traits according to the provided personalization bit-mask\"},\"register(address,bool)\":{\"notice\":\"This function is used to register Land contract on the Operator Filterer Registry of Opensea.\"},\"resetDefaultRoyalty()\":{\"notice\":\"Removes default royalty information.\"},\"resetTokenRoyalty(uint256)\":{\"notice\":\"Resets royalty information for the token id back to the global default.\"},\"reveal(uint256,uint256,bytes)\":{\"notice\":\"helper function to emit the {MetadataUpdate} event in order for marketplaces to, on demand, refresh metadata, for the provided token ID. Off-chain, gaming mechanics are done and this function is ultimately called to signal the end of a reveal.\"},\"safeBatchTransferFrom(address,address,uint256[],bytes)\":{\"notice\":\"Transfer many tokens between 2 addresses, while ensuring the receiving contract has a receiver method.\"},\"setAllowedExecuteMint(address)\":{\"notice\":\"updates which address is allowed to execute the mint function.\"},\"setBaseURI(string)\":{\"notice\":\"updates the base token URI for the contract\"},\"setDefaultRoyalty(address,uint96)\":{\"notice\":\"Sets the royalty information that all ids in this contract will default to.\"},\"setMaxSupply(uint256)\":{\"notice\":\"updates the sign address.\"},\"setOperatorRegistry(address)\":{\"notice\":\"sets filter registry address deployed in test\"},\"setSignAddress(address)\":{\"notice\":\"updates the sign address.\"},\"setTokenRoyalty(uint256,address,uint96)\":{\"notice\":\"Sets the royalty information for a specific token id, overriding the global default.\"},\"setTreasury(address)\":{\"notice\":\"update the treasury address\"},\"setTrustedForwarder(address)\":{\"notice\":\"set the trusted forwarder\"},\"setupWave(uint256,uint256,uint256)\":{\"notice\":\"function to setup a new wave. A wave is defined as a combination of allowed number tokens to be minted in total, per wallet and minting price\"},\"signAddress()\":{\"notice\":\"return the address from which all signatures must come from this specific address, otherwise they are invalid\"},\"totalSupply()\":{\"notice\":\"return the total amount of tokens minted till now\"},\"trustedForwarder()\":{\"notice\":\"Returns the address of the trusted forwarder.\"},\"unpause()\":{\"notice\":\"unpauses the contract\"},\"waveCount()\":{\"notice\":\"the total amount of waves configured till now\"},\"waveMaxTokensOverall(uint256)\":{\"notice\":\"return max tokens to buy per wave, cumulating all addresses\"},\"waveMaxTokensPerWallet(uint256)\":{\"notice\":\"return max tokens to buy, per wallet in a given wave\"},\"waveMint(address,uint256,uint256,uint256,bytes)\":{\"notice\":\"token minting function on a certain wave. Price is set by wave and is paid in tokens denoted by the allowedToExecuteMint contract\"},\"waveOwnerToClaimedCounts(uint256,address)\":{\"notice\":\"return mapping of [owner -> wave index -> minted count]\"},\"waveSingleTokenPrice(uint256)\":{\"notice\":\"return price of one token mint (in the token denoted by the allowedToExecuteMint contract)\"},\"waveTotalMinted(uint256)\":{\"notice\":\"return number of total minted tokens in the current running wave\"}},\"notice\":\"ERC721 contract for Avatar collections. May be initialized via {CollectionFactory} or other similar factories\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sandbox-smart-contracts/avatar/contracts/nft-collection/NFTCollection.sol\":\"NFTCollection\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":2000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-5.0.2/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\"},\"@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x6008dabfe393240d73d7dd7688033f72740d570aa422254d29a7dce8568f3aff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-5.0.2/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev An operation with an ERC20 token failed.\\n */\\n error SafeERC20FailedOperation(address token);\\n\\n /**\\n * @dev Indicates a failed `decreaseAllowance` request.\\n */\\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n forceApprove(token, spender, oldAllowance + value);\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\\n * value, non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\\n unchecked {\\n uint256 currentAllowance = token.allowance(address(this), spender);\\n if (currentAllowance < requestedDecrease) {\\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\\n }\\n forceApprove(token, spender, currentAllowance - requestedDecrease);\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data);\\n if (returndata.length != 0 && !abi.decode(returndata, (bool))) {\\n revert SafeERC20FailedOperation(address(token));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;\\n }\\n}\\n\",\"keccak256\":\"0x37bb49513c49c87c4642a891b13b63571bc87013dde806617aa1efb54605f386\",\"license\":\"MIT\"},\"@openzeppelin/contracts-5.0.2/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev The ETH balance of the account is not enough to perform the operation.\\n */\\n error AddressInsufficientBalance(address account);\\n\\n /**\\n * @dev There's no code at `target` (it is not a contract).\\n */\\n error AddressEmptyCode(address target);\\n\\n /**\\n * @dev A call to an address target failed. The target may have reverted.\\n */\\n error FailedInnerCall();\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n if (address(this).balance < amount) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n if (!success) {\\n revert FailedInnerCall();\\n }\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason or custom error, it is bubbled\\n * up by this function (like regular Solidity function calls). However, if\\n * the call reverted with no returned reason, this function reverts with a\\n * {FailedInnerCall} error.\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n if (address(this).balance < value) {\\n revert AddressInsufficientBalance(address(this));\\n }\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\\n * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\\n * unsuccessful call.\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata\\n ) internal view returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n // only check if target is a contract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n if (returndata.length == 0 && target.code.length == 0) {\\n revert AddressEmptyCode(target);\\n }\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\\n * revert reason or with a default {FailedInnerCall} error.\\n */\\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\\n if (!success) {\\n _revert(returndata);\\n } else {\\n return returndata;\\n }\\n }\\n\\n /**\\n * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\\n */\\n function _revert(bytes memory returndata) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert FailedInnerCall();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\"},\"@openzeppelin/contracts-5.0.2/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS\\n }\\n\\n /**\\n * @dev The signature derives the `address(0)`.\\n */\\n error ECDSAInvalidSignature();\\n\\n /**\\n * @dev The signature has an invalid length.\\n */\\n error ECDSAInvalidSignatureLength(uint256 length);\\n\\n /**\\n * @dev The signature has an S value that is in the upper half order.\\n */\\n error ECDSAInvalidSignatureS(bytes32 s);\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\\n * and a bytes32 providing additional information about the error.\\n *\\n * If no error is returned, then the address can be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n */\\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\\n unchecked {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n // We do not check for an overflow here since the shift operation results in 0 or 1.\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n */\\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError, bytes32) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS, s);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\\n }\\n\\n return (signer, RecoverError.NoError, bytes32(0));\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\\n _throwError(error, errorArg);\\n return recovered;\\n }\\n\\n /**\\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\\n */\\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert ECDSAInvalidSignature();\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert ECDSAInvalidSignatureS(errorArg);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xeed0a08b0b091f528356cbc7245891a4c748682d4f6a18055e8e6ca77d12a6cf\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/access/Ownable2StepUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {OwnableUpgradeable} from \\\"./OwnableUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is specified at deployment time in the constructor for `Ownable`. This\\n * can later be changed with {transferOwnership} and {acceptOwnership}.\\n *\\n * This module is used through inheritance. It will make available all functions\\n * from parent (Ownable).\\n */\\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step\\n struct Ownable2StepStorage {\\n address _pendingOwner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable2Step\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;\\n\\n function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) {\\n assembly {\\n $.slot := Ownable2StepStorageLocation\\n }\\n }\\n\\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\\n\\n function __Ownable2Step_init() internal onlyInitializing {\\n }\\n\\n function __Ownable2Step_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Returns the address of the pending owner.\\n */\\n function pendingOwner() public view virtual returns (address) {\\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\\n return $._pendingOwner;\\n }\\n\\n /**\\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual override onlyOwner {\\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\\n $._pendingOwner = newOwner;\\n emit OwnershipTransferStarted(owner(), newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual override {\\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\\n delete $._pendingOwner;\\n super._transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev The new owner accepts the ownership transfer.\\n */\\n function acceptOwnership() public virtual {\\n address sender = _msgSender();\\n if (pendingOwner() != sender) {\\n revert OwnableUnauthorizedAccount(sender);\\n }\\n _transferOwnership(sender);\\n }\\n}\\n\",\"keccak256\":\"0xbca4a4f66d98028293dba695851d1b20d3e0ba2fff7453fb241f192fa3fc6b6f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\\n struct OwnableStorage {\\n address _owner;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Ownable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\\n\\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\\n assembly {\\n $.slot := OwnableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n function __Ownable_init(address initialOwner) internal onlyInitializing {\\n __Ownable_init_unchained(initialOwner);\\n }\\n\\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n OwnableStorage storage $ = _getOwnableStorage();\\n return $._owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n OwnableStorage storage $ = _getOwnableStorage();\\n address oldOwner = $._owner;\\n $._owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Storage of the initializable contract.\\n *\\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\\n * when using with upgradeable contracts.\\n *\\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\\n */\\n struct InitializableStorage {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n uint64 _initialized;\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool _initializing;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Initializable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\\n\\n /**\\n * @dev The contract is already initialized.\\n */\\n error InvalidInitialization();\\n\\n /**\\n * @dev The contract is not initializing.\\n */\\n error NotInitializing();\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint64 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\\n * production.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n // Cache values to avoid duplicated sloads\\n bool isTopLevelCall = !$._initializing;\\n uint64 initialized = $._initialized;\\n\\n // Allowed calls:\\n // - initialSetup: the contract is not in the initializing state and no previous version was\\n // initialized\\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\\n // current contract is just being deployed\\n bool initialSetup = initialized == 0 && isTopLevelCall;\\n bool construction = initialized == 1 && address(this).code.length == 0;\\n\\n if (!initialSetup && !construction) {\\n revert InvalidInitialization();\\n }\\n $._initialized = 1;\\n if (isTopLevelCall) {\\n $._initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n $._initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint64 version) {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing || $._initialized >= version) {\\n revert InvalidInitialization();\\n }\\n $._initialized = version;\\n $._initializing = true;\\n _;\\n $._initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n _checkInitializing();\\n _;\\n }\\n\\n /**\\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\\n */\\n function _checkInitializing() internal view virtual {\\n if (!_isInitializing()) {\\n revert NotInitializing();\\n }\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n // solhint-disable-next-line var-name-mixedcase\\n InitializableStorage storage $ = _getInitializableStorage();\\n\\n if ($._initializing) {\\n revert InvalidInitialization();\\n }\\n if ($._initialized != type(uint64).max) {\\n $._initialized = type(uint64).max;\\n emit Initialized(type(uint64).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint64) {\\n return _getInitializableStorage()._initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _getInitializableStorage()._initializing;\\n }\\n\\n /**\\n * @dev Returns a pointer to the storage namespace.\\n */\\n // solhint-disable-next-line var-name-mixedcase\\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\\n assembly {\\n $.slot := INITIALIZABLE_STORAGE\\n }\\n }\\n}\\n\",\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC721} from \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport {IERC721Receiver} from \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport {IERC721Metadata} from \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport {ContextUpgradeable} from \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport {Strings} from \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {ERC165Upgradeable} from \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {IERC721Errors} from \\\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\nabstract contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721, IERC721Metadata, IERC721Errors {\\n using Strings for uint256;\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC721\\n struct ERC721Storage {\\n // Token name\\n string _name;\\n\\n // Token symbol\\n string _symbol;\\n\\n mapping(uint256 tokenId => address) _owners;\\n\\n mapping(address owner => uint256) _balances;\\n\\n mapping(uint256 tokenId => address) _tokenApprovals;\\n\\n mapping(address owner => mapping(address operator => bool)) _operatorApprovals;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ERC721\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ERC721StorageLocation = 0x80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300;\\n\\n function _getERC721Storage() private pure returns (ERC721Storage storage $) {\\n assembly {\\n $.slot := ERC721StorageLocation\\n }\\n }\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n ERC721Storage storage $ = _getERC721Storage();\\n $._name = name_;\\n $._symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual returns (uint256) {\\n ERC721Storage storage $ = _getERC721Storage();\\n if (owner == address(0)) {\\n revert ERC721InvalidOwner(address(0));\\n }\\n return $._balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual returns (address) {\\n return _requireOwned(tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual returns (string memory) {\\n ERC721Storage storage $ = _getERC721Storage();\\n return $._name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual returns (string memory) {\\n ERC721Storage storage $ = _getERC721Storage();\\n return $._symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual returns (string memory) {\\n _requireOwned(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual {\\n _approve(to, tokenId, _msgSender());\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual returns (address) {\\n _requireOwned(tokenId);\\n\\n return _getApproved(tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {\\n ERC721Storage storage $ = _getERC721Storage();\\n return $._operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) public virtual {\\n if (to == address(0)) {\\n revert ERC721InvalidReceiver(address(0));\\n }\\n // Setting an \\\"auth\\\" arguments enables the `_isAuthorized` check which verifies that the token exists\\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\\n address previousOwner = _update(to, tokenId, _msgSender());\\n if (previousOwner != from) {\\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\\n }\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {\\n transferFrom(from, to, tokenId);\\n _checkOnERC721Received(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n *\\n * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the\\n * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances\\n * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by\\n * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n ERC721Storage storage $ = _getERC721Storage();\\n return $._owners[tokenId];\\n }\\n\\n /**\\n * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.\\n */\\n function _getApproved(uint256 tokenId) internal view virtual returns (address) {\\n ERC721Storage storage $ = _getERC721Storage();\\n return $._tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in\\n * particular (ignoring whether it is owned by `owner`).\\n *\\n * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this\\n * assumption.\\n */\\n function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {\\n return\\n spender != address(0) &&\\n (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.\\n * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets\\n * the `spender` for the specific `tokenId`.\\n *\\n * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this\\n * assumption.\\n */\\n function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {\\n if (!_isAuthorized(owner, spender, tokenId)) {\\n if (owner == address(0)) {\\n revert ERC721NonexistentToken(tokenId);\\n } else {\\n revert ERC721InsufficientApproval(spender, tokenId);\\n }\\n }\\n }\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that\\n * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.\\n *\\n * WARNING: Increasing an account's balance using this function tends to be paired with an override of the\\n * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership\\n * remain consistent with one another.\\n */\\n function _increaseBalance(address account, uint128 value) internal virtual {\\n ERC721Storage storage $ = _getERC721Storage();\\n unchecked {\\n $._balances[account] += value;\\n }\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner\\n * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.\\n *\\n * The `auth` argument is optional. If the value passed is non 0, then this function will check that\\n * `auth` is either the owner of the token, or approved to operate on the token (by the owner).\\n *\\n * Emits a {Transfer} event.\\n *\\n * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.\\n */\\n function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {\\n ERC721Storage storage $ = _getERC721Storage();\\n address from = _ownerOf(tokenId);\\n\\n // Perform (optional) operator check\\n if (auth != address(0)) {\\n _checkAuthorized(from, auth, tokenId);\\n }\\n\\n // Execute the update\\n if (from != address(0)) {\\n // Clear approval. No need to re-authorize or emit the Approval event\\n _approve(address(0), tokenId, address(0), false);\\n\\n unchecked {\\n $._balances[from] -= 1;\\n }\\n }\\n\\n if (to != address(0)) {\\n unchecked {\\n $._balances[to] += 1;\\n }\\n }\\n\\n $._owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n return from;\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal {\\n if (to == address(0)) {\\n revert ERC721InvalidReceiver(address(0));\\n }\\n address previousOwner = _update(to, tokenId, address(0));\\n if (previousOwner != address(0)) {\\n revert ERC721InvalidSender(address(0));\\n }\\n }\\n\\n /**\\n * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\\n _mint(to, tokenId);\\n _checkOnERC721Received(address(0), to, tokenId, data);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal {\\n address previousOwner = _update(address(0), tokenId, address(0));\\n if (previousOwner == address(0)) {\\n revert ERC721NonexistentToken(tokenId);\\n }\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(address from, address to, uint256 tokenId) internal {\\n if (to == address(0)) {\\n revert ERC721InvalidReceiver(address(0));\\n }\\n address previousOwner = _update(to, tokenId, address(0));\\n if (previousOwner == address(0)) {\\n revert ERC721NonexistentToken(tokenId);\\n } else if (previousOwner != from) {\\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\\n }\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients\\n * are aware of the ERC721 standard to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is like {safeTransferFrom} in the sense that it invokes\\n * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `tokenId` token must exist and be owned by `from`.\\n * - `to` cannot be the zero address.\\n * - `from` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId) internal {\\n _safeTransfer(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\\n _transfer(from, to, tokenId);\\n _checkOnERC721Received(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is\\n * either the owner of the token, or approved to operate on all tokens held by this owner.\\n *\\n * Emits an {Approval} event.\\n *\\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\\n */\\n function _approve(address to, uint256 tokenId, address auth) internal {\\n _approve(to, tokenId, auth, true);\\n }\\n\\n /**\\n * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not\\n * emitted in the context of transfers.\\n */\\n function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {\\n ERC721Storage storage $ = _getERC721Storage();\\n // Avoid reading the owner unless necessary\\n if (emitEvent || auth != address(0)) {\\n address owner = _requireOwned(tokenId);\\n\\n // We do not use _isAuthorized because single-token approvals should not be able to call approve\\n if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {\\n revert ERC721InvalidApprover(auth);\\n }\\n\\n if (emitEvent) {\\n emit Approval(owner, to, tokenId);\\n }\\n }\\n\\n $._tokenApprovals[tokenId] = to;\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Requirements:\\n * - operator can't be the address zero.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n ERC721Storage storage $ = _getERC721Storage();\\n if (operator == address(0)) {\\n revert ERC721InvalidOperator(operator);\\n }\\n $._operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).\\n * Returns the owner.\\n *\\n * Overrides to ownership logic should be done to {_ownerOf}.\\n */\\n function _requireOwned(uint256 tokenId) internal view returns (address) {\\n address owner = _ownerOf(tokenId);\\n if (owner == address(0)) {\\n revert ERC721NonexistentToken(tokenId);\\n }\\n return owner;\\n }\\n\\n /**\\n * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the\\n * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n */\\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {\\n if (to.code.length > 0) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n if (retval != IERC721Receiver.onERC721Received.selector) {\\n revert ERC721InvalidReceiver(to);\\n }\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert ERC721InvalidReceiver(to);\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x48efca78ce4e1a9f74d3ca8539bb53d04b116e507c10cd9e0df6105b8a6ae420\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/token/common/ERC2981Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC2981} from \\\"@openzeppelin/contracts/interfaces/IERC2981.sol\\\";\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {ERC165Upgradeable} from \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.\\n *\\n * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for\\n * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.\\n *\\n * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the\\n * fee is specified in basis points by default.\\n *\\n * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See\\n * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to\\n * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.\\n */\\nabstract contract ERC2981Upgradeable is Initializable, IERC2981, ERC165Upgradeable {\\n struct RoyaltyInfo {\\n address receiver;\\n uint96 royaltyFraction;\\n }\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC2981\\n struct ERC2981Storage {\\n RoyaltyInfo _defaultRoyaltyInfo;\\n mapping(uint256 tokenId => RoyaltyInfo) _tokenRoyaltyInfo;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ERC2981\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ERC2981StorageLocation = 0xdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00;\\n\\n function _getERC2981Storage() private pure returns (ERC2981Storage storage $) {\\n assembly {\\n $.slot := ERC2981StorageLocation\\n }\\n }\\n\\n /**\\n * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).\\n */\\n error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);\\n\\n /**\\n * @dev The default royalty receiver is invalid.\\n */\\n error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);\\n\\n /**\\n * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).\\n */\\n error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);\\n\\n /**\\n * @dev The royalty receiver for `tokenId` is invalid.\\n */\\n error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);\\n\\n function __ERC2981_init() internal onlyInitializing {\\n }\\n\\n function __ERC2981_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165Upgradeable) returns (bool) {\\n return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @inheritdoc IERC2981\\n */\\n function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address, uint256) {\\n ERC2981Storage storage $ = _getERC2981Storage();\\n RoyaltyInfo memory royalty = $._tokenRoyaltyInfo[tokenId];\\n\\n if (royalty.receiver == address(0)) {\\n royalty = $._defaultRoyaltyInfo;\\n }\\n\\n uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();\\n\\n return (royalty.receiver, royaltyAmount);\\n }\\n\\n /**\\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\\n * override.\\n */\\n function _feeDenominator() internal pure virtual returns (uint96) {\\n return 10000;\\n }\\n\\n /**\\n * @dev Sets the royalty information that all ids in this contract will default to.\\n *\\n * Requirements:\\n *\\n * - `receiver` cannot be the zero address.\\n * - `feeNumerator` cannot be greater than the fee denominator.\\n */\\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\\n ERC2981Storage storage $ = _getERC2981Storage();\\n uint256 denominator = _feeDenominator();\\n if (feeNumerator > denominator) {\\n // Royalty fee will exceed the sale price\\n revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);\\n }\\n if (receiver == address(0)) {\\n revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));\\n }\\n\\n $._defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\\n }\\n\\n /**\\n * @dev Removes default royalty information.\\n */\\n function _deleteDefaultRoyalty() internal virtual {\\n ERC2981Storage storage $ = _getERC2981Storage();\\n delete $._defaultRoyaltyInfo;\\n }\\n\\n /**\\n * @dev Sets the royalty information for a specific token id, overriding the global default.\\n *\\n * Requirements:\\n *\\n * - `receiver` cannot be the zero address.\\n * - `feeNumerator` cannot be greater than the fee denominator.\\n */\\n function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {\\n ERC2981Storage storage $ = _getERC2981Storage();\\n uint256 denominator = _feeDenominator();\\n if (feeNumerator > denominator) {\\n // Royalty fee will exceed the sale price\\n revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);\\n }\\n if (receiver == address(0)) {\\n revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));\\n }\\n\\n $._tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\\n }\\n\\n /**\\n * @dev Resets royalty information for the token id back to the global default.\\n */\\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\\n ERC2981Storage storage $ = _getERC2981Storage();\\n delete $._tokenRoyaltyInfo[tokenId];\\n }\\n}\\n\",\"keccak256\":\"0xfe76de11ddbe79ce1483cf66bc821ad6c29c5dda215a5bffb36421bd943a90fb\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/utils/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {ContextUpgradeable} from \\\"../utils/ContextUpgradeable.sol\\\";\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /// @custom:storage-location erc7201:openzeppelin.storage.Pausable\\n struct PausableStorage {\\n bool _paused;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.Pausable\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;\\n\\n function _getPausableStorage() private pure returns (PausableStorage storage $) {\\n assembly {\\n $.slot := PausableStorageLocation\\n }\\n }\\n\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n /**\\n * @dev The operation failed because the contract is paused.\\n */\\n error EnforcedPause();\\n\\n /**\\n * @dev The operation failed because the contract is not paused.\\n */\\n error ExpectedPause();\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n PausableStorage storage $ = _getPausableStorage();\\n return $._paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n if (paused()) {\\n revert EnforcedPause();\\n }\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n if (!paused()) {\\n revert ExpectedPause();\\n }\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n PausableStorage storage $ = _getPausableStorage();\\n $._paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x92915b7f7f642c6be3f65bfd1522feb5d5b6ef25f755f4dbb51df32c868f2f97\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/utils/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.20;\\nimport {Initializable} from \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant NOT_ENTERED = 1;\\n uint256 private constant ENTERED = 2;\\n\\n /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\\n struct ReentrancyGuardStorage {\\n uint256 _status;\\n }\\n\\n // keccak256(abi.encode(uint256(keccak256(\\\"openzeppelin.storage.ReentrancyGuard\\\")) - 1)) & ~bytes32(uint256(0xff))\\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\\n\\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\\n assembly {\\n $.slot := ReentrancyGuardStorageLocation\\n }\\n }\\n\\n /**\\n * @dev Unauthorized reentrant call.\\n */\\n error ReentrancyGuardReentrantCall();\\n\\n function __ReentrancyGuard_init() internal onlyInitializing {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\\n $._status = NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\\n // On the first call to nonReentrant, _status will be NOT_ENTERED\\n if ($._status == ENTERED) {\\n revert ReentrancyGuardReentrantCall();\\n }\\n\\n // Any calls to nonReentrant after this point will fail\\n $._status = ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n $._status = NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\\n return $._status == ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xb44e086e941292cdc7f440de51478493894ef0b1aeccb0c4047445919f667f74\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable-5.0.2/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {Initializable} from \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n */\\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xdaba3f7c42c55b2896353f32bd27d4d5f8bae741b3b05d4c53f67abc4dc47ce8\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC2981.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface for the NFT Royalty Standard.\\n *\\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\\n */\\ninterface IERC2981 is IERC165 {\\n /**\\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\\n */\\n function royaltyInfo(\\n uint256 tokenId,\\n uint256 salePrice\\n ) external view returns (address receiver, uint256 royaltyAmount);\\n}\\n\",\"keccak256\":\"0x89b84f7b1b2d6c294cd6b9a9f661c1cfb1b9b10ca7bac5b3445850a8ce96dcf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard ERC20 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\\n */\\ninterface IERC20Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC20InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC20InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC20InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC20InvalidSpender(address spender);\\n}\\n\\n/**\\n * @dev Standard ERC721 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\\n */\\ninterface IERC721Errors {\\n /**\\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\\n * Used in balance queries.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721InvalidOwner(address owner);\\n\\n /**\\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721NonexistentToken(uint256 tokenId);\\n\\n /**\\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param tokenId Identifier number of a token.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC721InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC721InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC721InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC721InvalidOperator(address operator);\\n}\\n\\n/**\\n * @dev Standard ERC1155 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\\n */\\ninterface IERC1155Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC1155InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC1155InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC1155MissingApprovalForAll(address operator, address owner);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC1155InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC1155InvalidOperator(address operator);\\n\\n /**\\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\\n * Used in batch transfers.\\n * @param idsLength Length of the array of token identifiers\\n * @param valuesLength Length of the array of token amounts\\n */\\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\\n}\\n\",\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC165} from \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n * a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\\n * {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\\n * a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the address zero.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x5ef46daa3b58ef2702279d514780316efaa952915ee1aa3396f041ee2982b0b4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be\\n * reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0x7f7a26306c79a65fb8b3b6c757cd74660c532cd8a02e165488e30027dd34ca49\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC721} from \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x37d1aaaa5a2908a09e9dcf56a26ddf762ecf295afb5964695937344fc6802ce1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Math} from \\\"./math/Math.sol\\\";\\nimport {SignedMath} from \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant HEX_DIGITS = \\\"0123456789abcdef\\\";\\n uint8 private constant ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev The `value` string doesn't fit in the specified `length`.\\n */\\n error StringsInsufficientHexLength(uint256 value, uint256 length);\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toStringSigned(int256 value) internal pure returns (string memory) {\\n return string.concat(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value)));\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n uint256 localValue = value;\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = HEX_DIGITS[localValue & 0xf];\\n localValue >>= 4;\\n }\\n if (localValue != 0) {\\n revert StringsInsufficientHexLength(value, length);\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\\n * representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x55f102ea785d8399c0e58d1108e2d289506dde18abc6db1b7f68c1f9f9bc5792\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x4296879f55019b23e135000eb36896057e7101fb7fb859c5ef690cf14643757b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0 = x * y; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\\n // works in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\\n * towards zero.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5f7e4076e175393767754387c962926577f1660dd9b810187b9002407656be72\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/common/IERC4906.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/// @title EIP-721 Metadata Update Extension\\ninterface IERC4906 {\\n /// @dev This event emits when the metadata of a token is changed.\\n /// So that the third-party platforms such as NFT market could\\n /// timely update the images and related attributes of the NFT.\\n event MetadataUpdate(uint256 indexed _tokenId);\\n\\n /// @dev This event emits when the metadata of a range of tokens is changed.\\n /// So that the third-party platforms such as NFT market could\\n /// timely update the images and related attributes of the NFTs.\\n event BatchMetadataUpdate(uint256 indexed _fromTokenId, uint256 indexed _toTokenId);\\n}\\n\",\"keccak256\":\"0x5c1466be79926fdb22b403c0816ad503cb4995817ecfb287c283735580b35851\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/nft-collection/ERC2771HandlerUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.26;\\n\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/utils/ContextUpgradeable.sol\\\";\\n\\n/**\\n * @title ERC2771HandlerUpgradeable\\n * @author The Sandbox\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice minimal ERC2771 handler to keep bytecode-size down\\n * @dev based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.6.0/contracts/metatx/ERC2771Context.sol\\n * with an initializer for proxies and a mutable forwarder\\n */\\nabstract contract ERC2771HandlerUpgradeable is ContextUpgradeable {\\n struct ERC2771HandlerUpgradeableStorage {\\n address trustedForwarder;\\n }\\n\\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.ERC2771HandlerUpgradeable\\n bytes32 internal constant ERC2771_HANDLER_UPGRADABLE_STORAGE_LOCATION =\\n 0x269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000;\\n\\n function _getERC2771HandlerUpgradableStorage() private pure returns (ERC2771HandlerUpgradeableStorage storage $) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n $.slot := ERC2771_HANDLER_UPGRADABLE_STORAGE_LOCATION\\n }\\n }\\n\\n /**\\n * @notice emitted when the trusted forwarder is set\\n * @param operator the sender of the transaction\\n * @param oldForwarder the old trusted forwarder address\\n * @param newForwarder the new trusted forwarder address\\n */\\n event TrustedForwarderSet(address indexed operator, address indexed oldForwarder, address indexed newForwarder);\\n\\n\\n /**\\n * @notice set the trusted forwarder\\n * @param forwarder the new trusted forwarder address\\n * @dev address(0) disables the forwarder\\n */\\n function _setTrustedForwarder(address forwarder) internal {\\n ERC2771HandlerUpgradeableStorage storage $ = _getERC2771HandlerUpgradableStorage();\\n emit TrustedForwarderSet(_msgSender(), $.trustedForwarder, forwarder);\\n $.trustedForwarder = forwarder;\\n }\\n\\n /**\\n * @notice Returns the address of the trusted forwarder.\\n * @return the trusted forwarder address\\n */\\n function trustedForwarder() external view virtual returns (address) {\\n ERC2771HandlerUpgradeableStorage storage $ = _getERC2771HandlerUpgradableStorage();\\n return $.trustedForwarder;\\n }\\n\\n /**\\n * @notice Indicates whether any particular address is the trusted forwarder.\\n * @param forwarder the address ot the trusted forwarder to check\\n * @return true if forwarder is the trusted forwarder address\\n */\\n function isTrustedForwarder(address forwarder) external view virtual returns (bool) {\\n return _isTrustedForwarder(forwarder);\\n }\\n\\n /**\\n * @notice Override for `msg.sender`.\\n * @return the address of the sender\\n * @dev Defaults to the original `msg.sender` whenever a call is not performed by the trusted forwarder\\n * or the calldata length is less than 20 bytes (an address length).\\n */\\n function _msgSender() internal view override virtual returns (address) {\\n uint256 calldataLength = msg.data.length;\\n uint256 contextSuffixLength = _contextSuffixLength();\\n if (_isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) {\\n return address(bytes20(msg.data[calldataLength - contextSuffixLength :]));\\n } else {\\n return msg.sender;\\n }\\n }\\n\\n /**\\n * @notice Override for `msg.data`.\\n * @return the message data with the address of the sender removed\\n * @dev Defaults to the original `msg.data` whenever a call is not performed by the trusted forwarder\\n * or the calldata length is less than 20 bytes (an address length).\\n */\\n function _msgData() internal view override virtual returns (bytes calldata) {\\n uint256 calldataLength = msg.data.length;\\n uint256 contextSuffixLength = _contextSuffixLength();\\n if (_isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) {\\n return msg.data[: calldataLength - contextSuffixLength];\\n } else {\\n return msg.data;\\n }\\n }\\n\\n /**\\n * @notice Indicates whether any particular address is the trusted forwarder.\\n * @param forwarder the address ot the trusted forwarder to check\\n * @return true if forwarder is the trusted forwarder address\\n */\\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool) {\\n ERC2771HandlerUpgradeableStorage storage $ = _getERC2771HandlerUpgradableStorage();\\n return forwarder == $.trustedForwarder;\\n }\\n\\n /**\\n * @notice ERC-2771 specifies the context as being a single address (20 bytes).\\n */\\n function _contextSuffixLength() internal view override virtual returns (uint256) {\\n return 20;\\n }\\n}\\n\",\"keccak256\":\"0x78dceb8d6397ba95e2a278d5cfd0dc934f469168b1fab67942b904d5beca72ba\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/nft-collection/ERC721BurnMemoryUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.26;\\n\\nimport {ERC721Upgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC721BurnMemoryUpgradeable\\n * @author The Sandbox\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice Baseline ERC721 contract to be used by the NFTCollection contract\\n * @dev provides the \\\"burn memory\\\" functionality: keeping track of who burned what token\\n */\\nabstract contract ERC721BurnMemoryUpgradeable is ERC721Upgradeable {\\n struct ERC721BurnMemoryUpgradeableStorage {\\n /**\\n * @notice tokenId to burner mapping; saves who burned a specific token\\n */\\n mapping(uint256 => address) burner;\\n\\n /**\\n * @notice burner to list of burned tokens mapping; to see what tokens who burned\\n */\\n mapping(address => uint256[]) burnedTokens;\\n\\n /**\\n * @notice flag that gates burning (enabling/disabling burning)\\n */\\n bool isBurnEnabled;\\n }\\n\\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.ERC721BurnMemoryUpgradeable\\n bytes32 internal constant ERC721_BURN_MEMORY_UPGRADABLE_STORAGE_LOCATION =\\n 0x6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59400;\\n\\n function _getERC721BurnMemoryUpgradableStorage() private pure returns (ERC721BurnMemoryUpgradeableStorage storage $) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n $.slot := ERC721_BURN_MEMORY_UPGRADABLE_STORAGE_LOCATION\\n }\\n }\\n\\n /**\\n * @notice event emitted when a token was burned\\n * @param operator the sender of the transaction\\n * @param tokenId the id of the token that was burned\\n * @param burner the owner that burned the token\\n */\\n event TokenBurned(address indexed operator, uint256 indexed tokenId, address indexed burner);\\n\\n /**\\n * @notice event emitted when token burning was enabled\\n * @param operator the sender of the transaction\\n */\\n event TokenBurningEnabled(address indexed operator);\\n\\n /**\\n * @notice event emitted when token burning was disabled\\n * @param operator the sender of the transaction\\n */\\n event TokenBurningDisabled(address indexed operator);\\n\\n /**\\n * @notice The operation failed because burning is enabled.\\n */\\n error EnforcedBurn();\\n\\n /**\\n * @notice The operation failed because burning is disabled.\\n */\\n error ExpectedBurn();\\n\\n /**\\n * @notice enables burning of tokens\\n */\\n function _enableBurning() internal {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n if ($.isBurnEnabled) {\\n revert EnforcedBurn();\\n }\\n $.isBurnEnabled = true;\\n emit TokenBurningEnabled(_msgSender());\\n }\\n\\n /**\\n * @notice disables burning of tokens\\n */\\n function _disableBurning() internal {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n if (!$.isBurnEnabled) {\\n revert ExpectedBurn();\\n }\\n $.isBurnEnabled = false;\\n emit TokenBurningDisabled(_msgSender());\\n }\\n\\n /**\\n * @notice Burns `tokenId`. The caller must own `tokenId` or be an approved operator.\\n * @param tokenId the token id to be burned\\n */\\n function _burnWithCheck(uint256 tokenId) internal virtual {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n if (!$.isBurnEnabled) {\\n revert ExpectedBurn();\\n }\\n address sender = _msgSender();\\n // Setting an \\\"auth\\\" arguments enables the `_isAuthorized` check which verifies that the token exists\\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\\n address previousOwner = _update(address(0), tokenId, sender);\\n $.burner[tokenId] = sender;\\n // @dev TODO: if we don't remove this code, check if we want sender or owner.\\n $.burnedTokens[sender].push(tokenId);\\n emit TokenBurned(sender, tokenId, previousOwner);\\n }\\n\\n /**\\n * @notice Returns the burner of the `tokenId`\\n * @param tokenId the tokenId to be checked who burned it\\n * @return the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet.\\n */\\n function burnerOf(uint256 tokenId) external view returns (address) {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n return $.burner[tokenId];\\n }\\n\\n /**\\n * @notice Returns the burner of the `tokenId`\\n * @param tokenId the tokenId to be checked who burned it\\n * @return the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet.\\n * @dev same as burnerOf, kept here to be backward compatible\\n */\\n function burner(uint256 tokenId) external view returns (address) {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n return $.burner[tokenId];\\n }\\n\\n /**\\n * @notice Checks if the indicated owner had burned tokens\\n * @param previousOwner the owner to check for burned tokens\\n * @return true if the address burned any tokens\\n */\\n function didBurnTokens(address previousOwner) external view returns (bool) {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n return $.burnedTokens[previousOwner].length != 0;\\n }\\n\\n /**\\n * @notice Gets the number of burned tokens by the indicated owner\\n * @param previousOwner the owner to check for burned tokens\\n * @return number of burned tokens by the indicated owner\\n */\\n function burnedTokensCount(address previousOwner) external view returns (uint256) {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n return $.burnedTokens[previousOwner].length;\\n }\\n\\n\\n /**\\n * @notice Gets the list of burned tokens by the indicated owner\\n * @param previousOwner the owner to check for burned tokens\\n * @param index of the burnedTokens array\\n * @return the list of burned tokens by the indicated owner indexed by index\\n */\\n function burnedTokens(address previousOwner, uint256 index) external view returns (uint256) {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n return $.burnedTokens[previousOwner][index];\\n }\\n\\n /**\\n * @notice Return true if burning is enabled\\n */\\n function isBurnEnabled() external view returns (bool) {\\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\\n return $.isBurnEnabled;\\n }\\n\\n}\\n\",\"keccak256\":\"0x3d1a2bcb675c56341d92050c9174101cab5b54d2145117387109773c781472d2\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/nft-collection/INFTCollection.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.26;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts-5.0.2/token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n\\n/**\\n * @title INFTCollection\\n * @author The Sandbox\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice Events emitted and Error raised by the NFTCollection\\n */\\ninterface INFTCollection {\\n /**\\n * @notice Event emitted when the contract was initialized.\\n * @dev emitted at proxy startup, only once\\n * @param baseURI an URI that will be used as the base for token URI\\n * @param name name of the ERC721 token\\n * @param symbol token symbol of the ERC721 token\\n * @param mintTreasury collection treasury address (where the payments are sent)\\n * @param signAddress signer address that is allowed to create mint signatures\\n * @param allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\\n * @param maxSupply max supply of tokens to be allowed to be minted per contract\\n */\\n event ContractInitialized(\\n string indexed baseURI,\\n string indexed name,\\n string indexed symbol,\\n address mintTreasury,\\n address signAddress,\\n IERC20Metadata allowedToExecuteMint,\\n uint256 maxSupply\\n );\\n\\n /**\\n * @notice Event emitted when a wave was set up\\n * @dev emitted when setupWave is called\\n * @param operator the sender of the transaction\\n * @param waveMaxTokens the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\\n * @param waveMaxTokensToBuy max tokens to buy, per wallet in a given wave\\n * @param waveSingleTokenPrice the price to mint a token in a given wave, in wei\\n * @param waveIndex the current wave index\\n */\\n event WaveSetup(\\n address indexed operator,\\n uint256 waveMaxTokens,\\n uint256 waveMaxTokensToBuy,\\n uint256 waveSingleTokenPrice,\\n uint256 waveIndex\\n );\\n\\n /**\\n * @notice Event emitted when an address was set as allowed to mint\\n * @dev emitted when setAllowedExecuteMint is called\\n * @param operator the sender of the transaction\\n * @param oldToken old address that is used for payments and that is allowed to execute mint\\n * @param newToken new address that is used for payments and that is allowed to execute mint\\n */\\n event AllowedExecuteMintSet(address indexed operator, IERC20 indexed oldToken, IERC20 indexed newToken);\\n\\n /**\\n * @notice Event emitted when the treasury address was saved\\n * @dev emitted when setTreasury is called\\n * @param operator the sender of the transaction\\n * @param oldTreasury old collection treasury address (where the payments are sent)\\n * @param newTreasury new collection treasury address (where the payments are sent)\\n */\\n event TreasurySet(address indexed operator, address indexed oldTreasury, address indexed newTreasury);\\n\\n /**\\n * @notice Event emitted when the base token URI for the contract was set or changed\\n * @dev emitted when setBaseURI is called\\n * @param operator the sender of the transaction\\n * @param oldBaseURI old URI that will be used as the base for token metadata URI\\n * @param newBaseURI new URI that will be used as the base for token metadata URI\\n */\\n event BaseURISet(address indexed operator, string oldBaseURI, string newBaseURI);\\n\\n /**\\n * @notice Event emitted when the max supply is set or changed\\n * @dev emitted when setSignAddress is called\\n * @param operator the sender of the transaction\\n * @param oldMaxSupply old maximum amount of tokens that can be minted\\n * @param newMaxSupply new maximum amount of tokens that can be minted\\n */\\n event MaxSupplySet(address indexed operator, uint256 oldMaxSupply, uint256 newMaxSupply);\\n\\n /**\\n * @notice Event emitted when a token personalization was made.\\n * @dev emitted when personalize is called\\n * @param operator the sender of the transaction\\n * @param tokenId id of the token which had the personalization done\\n * @param personalizationMask the exact personalization that was done, as a custom meaning bit-mask\\n */\\n event Personalized(address indexed operator, uint256 indexed tokenId, uint256 indexed personalizationMask);\\n\\n\\n /**\\n * @notice Event emitted when a token personalization was made.\\n * @param operator the sender of the transaction\\n * @param receiver the receiver of the royalties\\n * @param feeNumerator percentage of the royalties in feeDenominator units\\n */\\n event DefaultRoyaltySet(address indexed operator, address indexed receiver, uint96 feeNumerator);\\n\\n\\n /**\\n * @notice Event emitted when default royalties are reset\\n * @param operator the sender of the transaction\\n */\\n event DefaultRoyaltyReset(address indexed operator);\\n\\n /**\\n * @notice Event emitted when a token personalization was made.\\n * @param operator the sender of the transaction\\n * @param tokenId the token id\\n * @param receiver the receiver of the royalties\\n * @param feeNumerator percentage of the royalties in feeDenominator units\\n */\\n event TokenRoyaltySet(address indexed operator, uint256 indexed tokenId, address indexed receiver, uint96 feeNumerator);\\n\\n\\n /**\\n * @notice Event emitted when default royalties are reset\\n * @param operator the sender of the transaction\\n */\\n event TokenRoyaltyReset(address indexed operator, uint256 indexed tokenId);\\n\\n /**\\n * @notice The operation failed because the base token uri is empty.\\n * @param baseURI an URI that will be used as the base for token URI\\n */\\n error InvalidBaseTokenURI(string baseURI);\\n\\n /**\\n * @notice The operation failed the wave index is zero, no wave was ever configured\\n */\\n error ContractNotConfigured();\\n\\n /**\\n * @notice The operation failed because the token name is invalid\\n * @param name name of the ERC721 token\\n */\\n error InvalidName(string name);\\n\\n /**\\n * @notice The operation failed because the token symbol is invalid\\n * @param symbol token symbol of the ERC721 token\\n */\\n error InvalidSymbol(string symbol);\\n\\n /**\\n * @notice The operation failed because the treasury is wrong\\n * @param mintTreasury collection treasury address (where the payments are sent)\\n */\\n error InvalidTreasury(address mintTreasury);\\n\\n /**\\n * @notice The operation failed because the allowedToExecuteMint is not a contract or wrong\\n * @param allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\\n */\\n error InvalidAllowedToExecuteMint(IERC20Metadata allowedToExecuteMint);\\n\\n /**\\n * @notice The operation failed because the maxSupply is lower than totalSupply\\n * @param maxSupply max supply of tokens to be allowed to be minted per contract\\n * @param totalSupply amount of tokens minted till now\\n */\\n error LowMaxSupply(uint256 maxSupply, uint256 totalSupply);\\n\\n /**\\n * @notice The operation failed because the batch data len is zero\\n */\\n error InvalidBatchData();\\n\\n /**\\n * @notice The operation failed because the wave arguments are wrong\\n * @param waveMaxTokensOverall the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\\n * @param waveMaxTokensPerWallet max tokens to buy, per wallet in a given wave\\n */\\n error InvalidWaveData(uint256 waveMaxTokensOverall, uint256 waveMaxTokensPerWallet);\\n\\n /**\\n * @notice The operation failed because the wave is completed\\n * @param wallet wallet to be checked if it can mint\\n * @param amount amount to be checked if can be minted\\n */\\n error CannotMint(address wallet, uint256 amount);\\n\\n}\\n\",\"keccak256\":\"0xc33a4786dd2737cd654b7af098abd750006feb63676ec4acf63d8d3943e273b5\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/nft-collection/NFTCollection.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.26;\\n\\nimport {ReentrancyGuardUpgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/utils/ReentrancyGuardUpgradeable.sol\\\";\\nimport {Ownable2StepUpgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/access/Ownable2StepUpgradeable.sol\\\";\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/utils/ContextUpgradeable.sol\\\";\\nimport {PausableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/utils/PausableUpgradeable.sol\\\";\\nimport {ERC2981Upgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/token/common/ERC2981Upgradeable.sol\\\";\\nimport {ERC721Upgradeable} from \\\"@openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts-5.0.2/token/ERC20/IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts-5.0.2/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IERC721Receiver} from \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport {IERC4906} from \\\"../common/IERC4906.sol\\\";\\nimport {UpdatableOperatorFiltererUpgradeable} from \\\"./UpdatableOperatorFiltererUpgradeable.sol\\\";\\nimport {ERC2771HandlerUpgradeable} from \\\"./ERC2771HandlerUpgradeable.sol\\\";\\nimport {ERC721BurnMemoryUpgradeable} from \\\"./ERC721BurnMemoryUpgradeable.sol\\\";\\nimport {NFTCollectionSignature} from \\\"./NFTCollectionSignature.sol\\\";\\nimport {INFTCollection} from \\\"./INFTCollection.sol\\\";\\n\\n/**\\n * @title NFTCollection\\n * @author The Sandbox\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice ERC721 contract for Avatar collections.\\n * May be initialized via {CollectionFactory} or other similar factories\\n * @dev Some features:\\n * - upgradable\\n * - ownable (2 step transfer)\\n * - OpenSea royalty compliant\\n * - ERC2981 compliant\\n * - ERC4906 compliant\\n * - ERC165 compliant\\n * - supports ERC2771 for services like Biconomy\\n * - supports \\\"burn memory\\\" - keeping track of who burned what token for faster in-game gating checks\\n * - minting is supported via an ERC20 token contract that supports approveAndCall\\n * as mint price is in non-native tokens\\n * - custom batch operations for minting and transfer\\n */\\ncontract NFTCollection is\\nReentrancyGuardUpgradeable,\\nOwnable2StepUpgradeable,\\nERC721BurnMemoryUpgradeable,\\nERC2981Upgradeable,\\nERC2771HandlerUpgradeable,\\nUpdatableOperatorFiltererUpgradeable,\\nPausableUpgradeable,\\nNFTCollectionSignature,\\nIERC4906,\\nINFTCollection\\n{\\n /**\\n * @notice Structure used to mint in batch\\n * @param wallet destination address that will receive the tokens\\n * @param amount of tokens to mint\\n */\\n struct BatchMintingData {\\n address wallet;\\n uint256 amount;\\n }\\n\\n /**\\n * @notice Structure used save minting wave information\\n * @param waveMaxTokensOverall max tokens to buy per wave, cumulating all addresses\\n * @param waveMaxTokensPerWallet max tokens to buy, per wallet in a given wave\\n * @param waveSingleTokenPrice price of one token mint (in the token denoted by the allowedToExecuteMint contract)\\n * @param waveTotalMinted number of total minted tokens in the current running wave\\n * @param waveOwnerToClaimedCounts mapping of [owner -> minted count]\\n */\\n struct WaveData {\\n uint256 waveMaxTokensOverall;\\n uint256 waveMaxTokensPerWallet;\\n uint256 waveSingleTokenPrice;\\n uint256 waveTotalMinted;\\n mapping(address => uint256) waveOwnerToClaimedCounts;\\n }\\n\\n struct NFTCollectionStorage {\\n /**\\n * @notice maximum amount of tokens that can be minted\\n */\\n uint256 maxSupply; // public\\n\\n /**\\n * @notice treasury address where the payment for minting are sent\\n */\\n address mintTreasury; // public\\n\\n /**\\n * @notice standard base token URL for ERC721 metadata\\n */\\n string baseTokenURI;\\n\\n /**\\n * @notice saved information of minting waves\\n */\\n WaveData[] waveData;\\n\\n /**\\n * @notice ERC20 contract through which the minting will be done (approveAndCall)\\n * When there is a price for the minting, the payment will be done using this token\\n */\\n IERC20 allowedToExecuteMint;\\n\\n /**\\n * @notice stores the personalization mask for a tokenId\\n */\\n mapping(uint256 => uint256) personalizationTraits;\\n\\n /**\\n * @notice total amount of tokens minted till now\\n */\\n uint256 totalSupply;\\n }\\n\\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.NFTCollection\\n bytes32 internal constant NFT_COLLECTION_STORAGE_LOCATION =\\n 0x54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00;\\n\\n function _getNFTCollectionStorage() private pure returns (NFTCollectionStorage storage $) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n $.slot := NFT_COLLECTION_STORAGE_LOCATION\\n }\\n }\\n\\n /**\\n * @notice mitigate a possible Implementation contract takeover, as indicate by\\n * https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract\\n */\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /**\\n * @notice external entry point initialization function in accordance with the upgradable pattern\\n * @dev calls all the init functions from the base classes. Emits {ContractInitialized} event\\n * @param _collectionOwner the address that will be set as the owner of the collection\\n * @param _initialBaseURI an URI that will be used as the base for token URI\\n * @param _name name of the ERC721 token\\n * @param _symbol token symbol of the ERC721 token\\n * @param _mintTreasury collection treasury address (where the payments are sent)\\n * @param _signAddress signer address that is allowed to create mint signatures\\n * @param _initialTrustedForwarder trusted forwarder address\\n * @param _allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\\n * @param _maxSupply max supply of tokens to be allowed to be minted per contract\\n */\\n function initialize(\\n address _collectionOwner,\\n string calldata _initialBaseURI,\\n string memory _name,\\n string memory _symbol,\\n address payable _mintTreasury,\\n address _signAddress,\\n address _initialTrustedForwarder,\\n IERC20Metadata _allowedToExecuteMint,\\n uint256 _maxSupply\\n ) external virtual initializer {\\n __NFTCollection_init(\\n _collectionOwner,\\n _initialBaseURI,\\n _name,\\n _symbol,\\n _mintTreasury,\\n _signAddress,\\n _initialTrustedForwarder,\\n _allowedToExecuteMint,\\n _maxSupply\\n );\\n }\\n\\n /**\\n * @notice initialization function in accordance with the upgradable pattern\\n * @dev calls all the init functions from the base classes. Emits {ContractInitialized} event\\n * @param _collectionOwner the address that will be set as the owner of the collection\\n * @param _initialBaseURI an URI that will be used as the base for token URI\\n * @param _name name of the ERC721 token\\n * @param _symbol token symbol of the ERC721 token\\n * @param _mintTreasury collection treasury address (where the payments are sent)\\n * @param _signAddress signer address that is allowed to create mint signatures\\n * @param _initialTrustedForwarder trusted forwarder address\\n * @param _allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\\n * @param _maxSupply max supply of tokens to be allowed to be minted per contract\\n */\\n function __NFTCollection_init(\\n address _collectionOwner,\\n string calldata _initialBaseURI,\\n string memory _name,\\n string memory _symbol,\\n address payable _mintTreasury,\\n address _signAddress,\\n address _initialTrustedForwarder,\\n IERC20Metadata _allowedToExecuteMint,\\n uint256 _maxSupply\\n ) internal onlyInitializing {\\n if (bytes(_name).length == 0) {\\n revert InvalidName(_name);\\n }\\n if (bytes(_symbol).length == 0) {\\n revert InvalidSymbol(_symbol);\\n }\\n __ReentrancyGuard_init();\\n // We don't want to set the owner to _msgSender, so, we call _transferOwnership instead of __Ownable_init\\n _transferOwnership(_collectionOwner);\\n __ERC2981_init();\\n _setTrustedForwarder(_initialTrustedForwarder);\\n __ERC721_init(_name, _symbol);\\n __Pausable_init();\\n _setBaseURI(_initialBaseURI);\\n _setTreasury(_mintTreasury);\\n _setSignAddress(_signAddress);\\n _setAllowedExecuteMint(_allowedToExecuteMint);\\n _setMaxSupply(_maxSupply);\\n\\n emit ContractInitialized(\\n _initialBaseURI,\\n _name,\\n _symbol,\\n _mintTreasury,\\n _signAddress,\\n _allowedToExecuteMint,\\n _maxSupply\\n );\\n }\\n\\n /**\\n * @notice function to setup a new wave. A wave is defined as a combination of allowed number tokens to be\\n * minted in total, per wallet and minting price\\n * @param _waveMaxTokensOverall the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\\n * @param _waveMaxTokensPerWallet max tokens to buy, per wallet in a given wave\\n * @param _waveSingleTokenPrice the price to mint a token in a given wave, in wei\\n * denoted by the allowedToExecuteMint contract\\n */\\n function setupWave(\\n uint256 _waveMaxTokensOverall,\\n uint256 _waveMaxTokensPerWallet,\\n uint256 _waveSingleTokenPrice\\n ) external onlyOwner {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (_waveMaxTokensOverall > $.maxSupply ||\\n _waveMaxTokensOverall == 0 ||\\n _waveMaxTokensPerWallet == 0 ||\\n _waveMaxTokensPerWallet > _waveMaxTokensOverall\\n ) {\\n revert InvalidWaveData(_waveMaxTokensOverall, _waveMaxTokensPerWallet);\\n }\\n uint256 waveIndex = $.waveData.length;\\n emit WaveSetup(_msgSender(), _waveMaxTokensOverall, _waveMaxTokensPerWallet, _waveSingleTokenPrice, waveIndex);\\n $.waveData.push();\\n $.waveData[waveIndex].waveMaxTokensOverall = _waveMaxTokensOverall;\\n $.waveData[waveIndex].waveMaxTokensPerWallet = _waveMaxTokensPerWallet;\\n $.waveData[waveIndex].waveSingleTokenPrice = _waveSingleTokenPrice;\\n }\\n\\n /**\\n * @notice token minting function on the last wave. Price is set by wave and is paid in tokens denoted\\n * by the allowedToExecuteMint contract\\n * @param wallet minting wallet\\n * @param amount number of token to mint\\n * @param signatureId signing signature ID\\n * @param signature signing signature value\\n * @dev this method is backward compatible with the previous contract, so, it uses last configured wave\\n */\\n function mint(\\n address wallet,\\n uint256 amount,\\n uint256 signatureId,\\n bytes calldata signature\\n ) external whenNotPaused nonReentrant {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n uint256 waveIndex = $.waveData.length;\\n if (waveIndex == 0) {\\n revert ContractNotConfigured();\\n }\\n if (_msgSender() != address($.allowedToExecuteMint)) {\\n revert ERC721InvalidSender(_msgSender());\\n }\\n _checkAndSetMintSignature(wallet, signatureId, signature);\\n WaveData storage waveData = $.waveData[waveIndex - 1];\\n _doMint(waveData, wallet, amount);\\n }\\n\\n /**\\n * @notice token minting function on a certain wave. Price is set by wave and is paid in tokens denoted\\n * by the allowedToExecuteMint contract\\n * @param wallet minting wallet\\n * @param amount number of token to mint\\n * @param waveIndex the index of the wave used to mint\\n * @param signatureId signing signature ID\\n * @param signature signing signature value\\n */\\n function waveMint(\\n address wallet,\\n uint256 amount,\\n uint256 waveIndex,\\n uint256 signatureId,\\n bytes calldata signature\\n ) external whenNotPaused nonReentrant {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if ($.waveData.length == 0) {\\n revert ContractNotConfigured();\\n }\\n if (_msgSender() != address($.allowedToExecuteMint)) {\\n revert ERC721InvalidSender(_msgSender());\\n }\\n _checkAndSetWaveMintSignature(wallet, amount, waveIndex, signatureId, signature);\\n WaveData storage waveData = _getWaveData(waveIndex);\\n _doMint(waveData, wallet, amount);\\n }\\n\\n /**\\n * @notice function to setup wave parameters. A wave is defined as a combination of allowed number tokens to be\\n * minted in total, per wallet and minting price\\n * @param waveIndex the index of the wave to be canceled\\n */\\n function cancelWave(uint256 waveIndex) external onlyOwner {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n /// @dev don't use _getWaveData, we don't want to cancel the last wave by mistake\\n if (waveIndex >= $.waveData.length) {\\n revert ContractNotConfigured();\\n }\\n $.waveData[waveIndex].waveMaxTokensOverall = 0;\\n }\\n\\n /**\\n * @notice batch minting function, used by owner to airdrop directly to users.\\n * @dev this methods takes a list of destination wallets and can only be used by the owner of the contract\\n * @param waveIndex the index of the wave used to mint\\n * @param wallets list of destination wallets and amounts\\n */\\n function batchMint(uint256 waveIndex, BatchMintingData[] calldata wallets) external whenNotPaused onlyOwner {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n uint256 len = wallets.length;\\n if (len == 0) {\\n revert InvalidBatchData();\\n }\\n if ($.waveData.length == 0) {\\n revert ContractNotConfigured();\\n }\\n WaveData storage waveData = _getWaveData(waveIndex);\\n for (uint256 i; i < len; i++) {\\n uint256 _totalSupply = $.totalSupply;\\n address wallet = wallets[i].wallet;\\n uint256 amount = wallets[i].amount;\\n if (!_isMintAllowed($, waveData, wallet, amount)) {\\n revert CannotMint(wallet, amount);\\n }\\n for (uint256 j; j < amount; j++) {\\n // @dev _mint already checks the destination wallet\\n // @dev start with tokenId = 1\\n _mint(wallet, _totalSupply + j + 1);\\n }\\n waveData.waveOwnerToClaimedCounts[wallet] += amount;\\n waveData.waveTotalMinted += amount;\\n $.totalSupply += amount;\\n }\\n }\\n\\n /**\\n * @notice helper function to emit the {MetadataUpdate} event in order for marketplaces to, on demand,\\n * refresh metadata, for the provided token ID. Off-chain, gaming mechanics are done and this\\n * function is ultimately called to signal the end of a reveal.\\n * @dev will revert if owner of token is not caller or if signature is not valid\\n * @param tokenId the ID belonging to the NFT token for which to emit the event\\n * @param signatureId validation signature ID\\n * @param signature validation signature\\n */\\n function reveal(\\n uint256 tokenId,\\n uint256 signatureId,\\n bytes calldata signature\\n ) external whenNotPaused {\\n address sender = _msgSender();\\n address owner = ownerOf(tokenId);\\n if (owner != sender) {\\n revert ERC721IncorrectOwner(sender, tokenId, owner);\\n }\\n _checkAndSetRevealSignature(sender, signatureId, signature);\\n emit MetadataUpdate(tokenId);\\n }\\n\\n /**\\n * @notice personalize token traits according to the provided personalization bit-mask\\n * @dev after checks, it is reduced to personalizationTraits[_tokenId] = _personalizationMask\\n * @param tokenId what token to personalize\\n * @param personalizationMask a mask where each bit has a custom meaning in-game\\n * @param signatureId the ID of the provided signature\\n * @param signature signing signature\\n */\\n function personalize(\\n uint256 tokenId,\\n uint256 personalizationMask,\\n uint256 signatureId,\\n bytes calldata signature\\n ) external whenNotPaused {\\n address sender = _msgSender();\\n address owner = ownerOf(tokenId);\\n if (owner != sender) {\\n revert ERC721IncorrectOwner(sender, tokenId, owner);\\n }\\n _checkAndSetPersonalizationSignature(sender, tokenId, personalizationMask, signatureId, signature);\\n _updateTokenTraits(tokenId, personalizationMask);\\n }\\n\\n /**\\n * @notice personalize token traits but can be called by owner or special roles address\\n * Used to change the traits of a token based on an in-game action\\n * @dev reverts if token does not exist or if not authorized\\n * @param tokenId what token to personalize\\n * @param personalizationMask a mask where each bit has a custom meaning in-game\\n */\\n function operatorPersonalize(uint256 tokenId, uint256 personalizationMask) external onlyOwner\\n {\\n address owner = _ownerOf(tokenId);\\n if (owner == address(0)) {\\n revert ERC721NonexistentToken(tokenId);\\n }\\n _updateTokenTraits(tokenId, personalizationMask);\\n }\\n\\n /**\\n * @notice Burns `tokenId`. The caller must own `tokenId` or be an approved operator.\\n * @dev See {ERC721BurnMemoryEnumerableUpgradeable.burn}.\\n * @param tokenId the token id to be burned\\n */\\n function burn(uint256 tokenId) external whenNotPaused {\\n _burnWithCheck(tokenId);\\n }\\n\\n /**\\n * @notice enables burning of tokens\\n * @dev reverts if burning already enabled.\\n */\\n function enableBurning() external onlyOwner {\\n _enableBurning();\\n }\\n\\n /**\\n * @notice disables burning of tokens\\n * @dev reverts if burning already disabled.\\n */\\n function disableBurning() external onlyOwner {\\n _disableBurning();\\n }\\n\\n /**\\n * @notice pauses the contract\\n * @dev reverts if not owner of the collection or if not un-paused\\n */\\n function pause() external onlyOwner {\\n _requireNotPaused();\\n _pause();\\n }\\n\\n /**\\n * @notice unpauses the contract\\n * @dev reverts if not owner of the collection or if not paused\\n */\\n function unpause() external onlyOwner {\\n _requirePaused();\\n _unpause();\\n }\\n\\n /**\\n * @notice update the treasury address\\n * @param treasury new treasury address to be saved\\n */\\n function setTreasury(address treasury) external onlyOwner {\\n _setTreasury(treasury);\\n }\\n\\n /**\\n * @notice updates the sign address.\\n * @param _signAddress new signer address to be set\\n */\\n function setSignAddress(address _signAddress) external onlyOwner {\\n _setSignAddress(_signAddress);\\n }\\n\\n /**\\n * @notice updates the sign address.\\n * @param _maxSupply maximum amount of tokens that can be minted\\n */\\n function setMaxSupply(uint256 _maxSupply) external onlyOwner {\\n _setMaxSupply(_maxSupply);\\n }\\n\\n /**\\n * @notice updates which address is allowed to execute the mint function.\\n * @dev also resets default mint price\\n * @param minterToken the address that will be allowed to execute the mint function\\n */\\n function setAllowedExecuteMint(IERC20Metadata minterToken) external onlyOwner {\\n _setAllowedExecuteMint(minterToken);\\n }\\n\\n /**\\n * @notice updates the base token URI for the contract\\n * @param baseURI an URI that will be used as the base for token URI\\n */\\n function setBaseURI(string calldata baseURI) external onlyOwner {\\n _setBaseURI(baseURI);\\n // Refreshes the whole collection (https://docs.opensea.io/docs/metadata-standards#metadata-updates)\\n emit BatchMetadataUpdate(0, type(uint256).max);\\n }\\n\\n /**\\n * @notice sets filter registry address deployed in test\\n * @param registry the address of the registry\\n */\\n function setOperatorRegistry(address registry) external virtual onlyOwner {\\n _setOperatorRegistry(registry);\\n }\\n\\n /**\\n * @notice set the trusted forwarder\\n * @param forwarder the new trusted forwarder address\\n * @dev address(0) disables the forwarder\\n */\\n function setTrustedForwarder(address forwarder) external virtual onlyOwner {\\n _setTrustedForwarder(forwarder);\\n }\\n\\n /**\\n * @notice This function is used to register Land contract on the Operator Filterer Registry of Opensea.\\n * @param subscriptionOrRegistrantToCopy registration address of the list to subscribe.\\n * @param subscribe bool to signify subscription 'true' or to copy the list 'false'.\\n * @dev subscriptionOrRegistrantToCopy == address(0), just register\\n */\\n function register(address subscriptionOrRegistrantToCopy, bool subscribe) external onlyOwner {\\n _register(subscriptionOrRegistrantToCopy, subscribe);\\n }\\n\\n /**\\n * @notice Transfer many tokens between 2 addresses, while ensuring the receiving contract has a receiver method.\\n * @param from The sender of the token.\\n * @param to The recipient of the token.\\n * @param ids The ids of the tokens.\\n * @param data Additional data.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n bytes calldata data\\n ) external virtual onlyAllowedOperator(from) {\\n if (to == address(0)) {\\n revert ERC721InvalidReceiver(address(0));\\n }\\n address msgSender = _msgSender();\\n uint256 numTokens = ids.length;\\n for (uint256 i = 0; i < numTokens; i++) {\\n uint256 tokenId = ids[i];\\n // Setting an \\\"auth\\\" arguments enables the `_isAuthorized` check which verifies that the token exists\\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\\n address previousOwner = _update(to, tokenId, msgSender);\\n if (previousOwner != from) {\\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\\n }\\n _checkOnERC721ReceivedImpl(from, to, tokenId, data);\\n }\\n }\\n\\n /**\\n * @notice Transfer many tokens between 2 addresses.\\n * @param from The sender of the token.\\n * @param to The recipient of the token.\\n * @param ids The ids of the tokens.\\n */\\n function batchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids\\n ) external virtual onlyAllowedOperator(from) {\\n if (to == address(0)) {\\n revert ERC721InvalidReceiver(address(0));\\n }\\n address msgSender = _msgSender();\\n uint256 numTokens = ids.length;\\n for (uint256 i = 0; i < numTokens; i++) {\\n uint256 tokenId = ids[i];\\n // Setting an \\\"auth\\\" arguments enables the `_isAuthorized` check which verifies that the token exists\\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\\n address previousOwner = _update(to, tokenId, msgSender);\\n if (previousOwner != from) {\\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets the royalty information that all ids in this contract will default to.\\n * @param receiver the receiver of the royalties\\n * @param feeNumerator percentage of the royalties in feeDenominator units\\n */\\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyOwner {\\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\\n emit DefaultRoyaltySet(_msgSender(), receiver, feeNumerator);\\n _setDefaultRoyalty(receiver, feeNumerator);\\n }\\n\\n /**\\n * @notice Removes default royalty information.\\n */\\n function resetDefaultRoyalty() external onlyOwner {\\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\\n emit DefaultRoyaltyReset(_msgSender());\\n _deleteDefaultRoyalty();\\n }\\n\\n /**\\n * @notice Sets the royalty information for a specific token id, overriding the global default.\\n * @param tokenId the tokenId for\\n * @param receiver the receiver of the royalties\\n * @param feeNumerator percentage of the royalties in feeDenominator units\\n */\\n function setTokenRoyalty(\\n uint256 tokenId,\\n address receiver,\\n uint96 feeNumerator\\n ) external onlyOwner {\\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\\n emit TokenRoyaltySet(_msgSender(), tokenId, receiver, feeNumerator);\\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\\n }\\n\\n /**\\n * @notice Resets royalty information for the token id back to the global default.\\n */\\n function resetTokenRoyalty(uint256 tokenId) external onlyOwner {\\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\\n emit TokenRoyaltyReset(_msgSender(), tokenId);\\n _resetTokenRoyalty(tokenId);\\n }\\n\\n /**\\n * @dev See OpenZeppelin {IERC721-setApprovalForAll}\\n */\\n function setApprovalForAll(address operator, bool approved)\\n public\\n override\\n onlyAllowedOperatorApproval(operator)\\n {\\n super.setApprovalForAll(operator, approved);\\n }\\n\\n /**\\n * @dev See OpenZeppelin {IERC721-approve}\\n */\\n function approve(address operator, uint256 tokenId)\\n public\\n override\\n onlyAllowedOperatorApproval(operator)\\n {\\n super.approve(operator, tokenId);\\n }\\n\\n /**\\n * @dev See OpenZeppelin {IERC721-transferFrom}\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public override onlyAllowedOperator(from) {\\n super.transferFrom(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See OpenZeppelin {IERC721-safeTransferFrom}\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) public override onlyAllowedOperator(from) {\\n super.safeTransferFrom(from, to, tokenId, data);\\n }\\n\\n /**\\n * @notice get the personalization of the indicated tokenID\\n * @param tokenId the token ID to check\\n * @return the personalization data as uint256\\n */\\n function personalizationOf(uint256 tokenId) external view returns (uint256) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.personalizationTraits[tokenId];\\n }\\n\\n /**\\n * @notice check if the indicated wallet can mint the indicated amount\\n * @param wallet wallet to be checked if it can mint\\n * @param amount amount to be checked if can be minted\\n * @param waveIndex the index of the wave used to mint\\n * @return if can mint or not\\n */\\n function isMintAllowed(uint256 waveIndex, address wallet, uint256 amount) external view returns (bool) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (waveIndex >= $.waveData.length) {\\n return false;\\n }\\n WaveData storage waveData = $.waveData[waveIndex];\\n return _isMintAllowed($, waveData, wallet, amount);\\n }\\n\\n /**\\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\\n * override.\\n */\\n function feeDenominator() external pure virtual returns (uint96) {\\n return _feeDenominator();\\n }\\n\\n /**\\n * @notice helper automation function\\n * @return current chainID for the blockchain\\n */\\n function chain() external view returns (uint256) {\\n return block.chainid;\\n }\\n\\n /**\\n * @notice return maximum amount of tokens that can be minted\\n */\\n function maxSupply() external view returns (uint256) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.maxSupply;\\n }\\n\\n /**\\n * @notice return treasury address where the payment for minting are sent\\n */\\n function mintTreasury() external view returns (address) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.mintTreasury;\\n }\\n\\n /**\\n * @notice return standard base token URL for ERC721 metadata\\n */\\n function baseTokenURI() external view returns (string memory) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.baseTokenURI;\\n }\\n\\n /**\\n * @notice return max tokens to buy per wave, cumulating all addresses\\n * @param waveIndex the index of the wave used to mint\\n */\\n function waveMaxTokensOverall(uint256 waveIndex) external view returns (uint256) {\\n WaveData storage waveData = _getWaveData(waveIndex);\\n return waveData.waveMaxTokensOverall;\\n }\\n\\n /**\\n * @notice return max tokens to buy, per wallet in a given wave\\n * @param waveIndex the index of the wave used to mint\\n */\\n function waveMaxTokensPerWallet(uint256 waveIndex) external view returns (uint256) {\\n WaveData storage waveData = _getWaveData(waveIndex);\\n return waveData.waveMaxTokensPerWallet;\\n }\\n\\n /**\\n * @notice return price of one token mint (in the token denoted by the allowedToExecuteMint contract)\\n * @param waveIndex the index of the wave used to mint\\n */\\n function waveSingleTokenPrice(uint256 waveIndex) external view returns (uint256) {\\n WaveData storage waveData = _getWaveData(waveIndex);\\n return waveData.waveSingleTokenPrice;\\n }\\n\\n /**\\n * @notice return number of total minted tokens in the current running wave\\n * @param waveIndex the index of the wave used to mint\\n */\\n function waveTotalMinted(uint256 waveIndex) external view returns (uint256) {\\n WaveData storage waveData = _getWaveData(waveIndex);\\n return waveData.waveTotalMinted;\\n }\\n\\n /**\\n * @notice return mapping of [owner -> wave index -> minted count]\\n * @param waveIndex the index of the wave used to mint\\n * @param owner the owner for which the count is returned\\n */\\n function waveOwnerToClaimedCounts(uint256 waveIndex, address owner) external view returns (uint256) {\\n WaveData storage waveData = _getWaveData(waveIndex);\\n return waveData.waveOwnerToClaimedCounts[owner];\\n }\\n\\n /**\\n * @notice the total amount of waves configured till now\\n */\\n function waveCount() external view returns (uint256) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.waveData.length;\\n }\\n\\n /**\\n * @notice return ERC20 contract through which the minting will be done (approveAndCall)\\n */\\n function allowedToExecuteMint() external view returns (IERC20) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.allowedToExecuteMint;\\n }\\n\\n /**\\n * @notice return the total amount of tokens minted till now\\n */\\n function totalSupply() external view returns (uint256) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(ERC2981Upgradeable, ERC721Upgradeable)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @notice complete the minting called from waveMint and mint\\n * @param waveData the data of the wave used to mint\\n * @param wallet minting wallet\\n * @param amount number of token to mint\\n */\\n function _doMint(WaveData storage waveData, address wallet, uint256 amount) internal {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (!_isMintAllowed($, waveData, wallet, amount)) {\\n revert CannotMint(wallet, amount);\\n }\\n uint256 _price = waveData.waveSingleTokenPrice * amount;\\n if (_price > 0) {\\n SafeERC20.safeTransferFrom($.allowedToExecuteMint, wallet, $.mintTreasury, _price);\\n }\\n uint256 _totalSupply = $.totalSupply;\\n for (uint256 i; i < amount; i++) {\\n // @dev _safeMint already checks the destination _wallet\\n // @dev start with tokenId = 1\\n _safeMint(wallet, _totalSupply + i + 1);\\n }\\n waveData.waveOwnerToClaimedCounts[wallet] += amount;\\n waveData.waveTotalMinted += amount;\\n $.totalSupply += amount;\\n }\\n\\n /**\\n * @notice return true if the indicated wallet can mint the indicated amount\\n * @param $ storage access\\n * @param waveData wave data used to check\\n * @param wallet wallet to be checked if it can mint\\n * @param amount amount to be checked if can be minted\\n */\\n function _isMintAllowed(NFTCollectionStorage storage $, WaveData storage waveData, address wallet, uint256 amount) internal view returns (bool) {\\n return amount > 0\\n && (waveData.waveTotalMinted + amount <= waveData.waveMaxTokensOverall)\\n && (waveData.waveOwnerToClaimedCounts[wallet] + amount <= waveData.waveMaxTokensPerWallet)\\n && $.totalSupply + amount <= $.maxSupply;\\n }\\n\\n /**\\n * @notice a helper function to ensure consistency when waveIndex is passed as argument to an external function\\n * @param waveIndex the index of the wave used to mint\\n * @return waveData the wave data used\\n * @dev we accept waveIndex gte to waveData.length so we can access the wave used by mint easily\\n */\\n function _getWaveData(uint256 waveIndex) internal view returns (WaveData storage waveData){\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n uint256 waveDataLen = $.waveData.length;\\n if (waveIndex >= waveDataLen) {\\n waveIndex = waveDataLen - 1;\\n }\\n return $.waveData[waveIndex];\\n }\\n\\n /**\\n * @notice get base TokenURI\\n * @return baseTokenURI\\n */\\n function _baseURI() internal view virtual override returns (string memory) {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n return $.baseTokenURI;\\n }\\n\\n /**\\n * @notice ERC2771 compatible msg.data getter\\n * @return msg.data\\n */\\n function _msgData() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (bytes calldata) {\\n return ERC2771HandlerUpgradeable._msgData();\\n }\\n\\n /**\\n * @notice ERC2771 compatible msg.sender getter\\n * @return sender msg.sender\\n */\\n function _msgSender()\\n internal\\n view\\n override(ContextUpgradeable, ERC2771HandlerUpgradeable, UpdatableOperatorFiltererUpgradeable, NFTCollectionSignature)\\n returns (address sender)\\n {\\n sender = ERC2771HandlerUpgradeable._msgSender();\\n }\\n\\n /**\\n * @dev ERC-2771 specifies the context as being a single address (20 bytes).\\n */\\n function _contextSuffixLength() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (uint256) {\\n return ERC2771HandlerUpgradeable._contextSuffixLength();\\n }\\n\\n /**\\n * @notice actually updates the variables that store the personalization traits per token.\\n * @dev no checks are done on input validations. Calling functions are expected to do them\\n * @param tokenId the ID for the token to personalize\\n * @param personalizationMask the personalization mask that will be applied\\n */\\n function _updateTokenTraits(uint256 tokenId, uint256 personalizationMask) internal {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n $.personalizationTraits[tokenId] = personalizationMask;\\n emit Personalized(_msgSender(), tokenId, personalizationMask);\\n emit MetadataUpdate(tokenId);\\n }\\n\\n /**\\n * @notice verifies it the provided address is a smart contract (by code size)\\n * @dev can be bypassed if called from contract constructors\\n * @param account account address to verify if it is a contract\\n */\\n function _isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @notice updates the base token URI for the contract\\n * @param baseURI an URI that will be used as the base for token URI\\n */\\n function _setBaseURI(string calldata baseURI) internal {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (bytes(baseURI).length == 0) {\\n revert InvalidBaseTokenURI(baseURI);\\n }\\n emit BaseURISet(_msgSender(), $.baseTokenURI, baseURI);\\n $.baseTokenURI = baseURI;\\n }\\n\\n /**\\n * @notice update the treasury address\\n * @param _treasury new treasury address to be saved\\n */\\n function _setTreasury(address _treasury) internal {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (_treasury == address(0)) {\\n revert InvalidTreasury(_treasury);\\n }\\n emit TreasurySet(_msgSender(), $.mintTreasury, _treasury);\\n $.mintTreasury = _treasury;\\n }\\n\\n /**\\n * @notice updates which address is allowed to execute the mint function.\\n * @dev also resets default mint price\\n * @param _minterToken the address that will be allowed to execute the mint function\\n */\\n function _setAllowedExecuteMint(IERC20Metadata _minterToken) internal {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (!_isContract(address(_minterToken))) {\\n revert InvalidAllowedToExecuteMint(_minterToken);\\n }\\n emit AllowedExecuteMintSet(_msgSender(), $.allowedToExecuteMint, _minterToken);\\n $.allowedToExecuteMint = _minterToken;\\n }\\n\\n /**\\n * @notice updates maximum supply\\n * @param _maxSupply maximum amount of tokens that can be minted\\n */\\n function _setMaxSupply(uint256 _maxSupply) internal {\\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\\n if (_maxSupply == 0) {\\n revert LowMaxSupply(0, $.totalSupply);\\n }\\n if (_maxSupply < $.totalSupply) {\\n revert LowMaxSupply(_maxSupply, $.totalSupply);\\n }\\n emit MaxSupplySet(_msgSender(), $.maxSupply, _maxSupply);\\n $.maxSupply = _maxSupply;\\n }\\n\\n /**\\n * @notice taken from ERC721Upgradeable because it is declared private.\\n * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the\\n * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n */\\n function _checkOnERC721ReceivedImpl(address from, address to, uint256 tokenId, bytes memory data) private {\\n if (to.code.length > 0) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n if (retval != IERC721Receiver.onERC721Received.selector) {\\n revert ERC721InvalidReceiver(to);\\n }\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert ERC721InvalidReceiver(to);\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8d35ad764a10b4ea803d0ade809eadf512c020d1862a524b98dcb4cb7a0ba726\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/nft-collection/NFTCollectionSignature.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.26;\\n\\nimport {ECDSA} from \\\"@openzeppelin/contracts-5.0.2/utils/cryptography/ECDSA.sol\\\";\\n\\n/**\\n * @title NFTCollectionSignature\\n * @author The Sandbox\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice Signatures accepted by the NFTCollection\\n * @dev We have a set of different signatures to be backward compatible with previous collections\\n * @dev We must be sure that all the signatures are different and cannot be reused by different methods, so,\\n * @dev we added an extra constant string to reveal to distinguish it from the mint signature.\\n * @dev mint: ['address', 'uint256', 'address', 'uint256']\\n * @dev reveal: ['address', 'uint256', 'address', 'uint256', 'string']\\n * @dev personalize: ['address', 'uint256', 'address', 'uint256', 'uint256', 'uint256']\\n * @dev waveMint: ['address', 'uint256', 'uint256', 'uint256', 'address', 'uint256']\\n */\\nabstract contract NFTCollectionSignature {\\n enum SignatureType {\\n Unused,\\n Mint,\\n Personalization,\\n Reveal,\\n WaveMint\\n }\\n\\n struct NFTCollectionSignatureStorage {\\n\\n /**\\n * @notice all signatures must come from this specific address, otherwise they are invalid\\n */\\n address signAddress;\\n\\n /**\\n * @notice map used to mark if a specific signatureId was used\\n * values are 0 (default, unused) and 1 (used)\\n * Used to avoid a signature reuse\\n */\\n mapping(uint256 => SignatureType) signatureIds;\\n }\\n\\n /**\\n * @notice Event emitted when the signer address was set or changed\\n * @dev emitted when setSignAddress is called\\n * @param operator the sender of the transaction\\n * @param oldSignAddress old signer address that is allowed to create mint signatures\\n * @param newSignAddress new signer address that is allowed to create mint signatures\\n */\\n event SignAddressSet(address indexed operator, address indexed oldSignAddress, address indexed newSignAddress);\\n\\n /**\\n * @notice The operation failed because signature is invalid or it was already used\\n * @param signatureId the ID of the provided signature\\n */\\n error InvalidSignature(uint256 signatureId);\\n\\n /**\\n * @notice The operation failed because the signAddress is wrong\\n * @param signAddress signer address that is allowed to create mint signatures\\n */\\n error InvalidSignAddress(address signAddress);\\n\\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.NFTCollectionSignature\\n bytes32 internal constant NFT_COLLECTION_SIGNATURE_STORAGE_LOCATION =\\n 0x40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900;\\n\\n function _getNFTCollectionSignatureStorage() private pure returns (NFTCollectionSignatureStorage storage $) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n $.slot := NFT_COLLECTION_SIGNATURE_STORAGE_LOCATION\\n }\\n }\\n\\n /**\\n * @notice return the address from which all signatures must come from this specific address, otherwise they are invalid\\n */\\n function signAddress() external view returns (address) {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n return $.signAddress;\\n }\\n\\n /**\\n * @notice return true if the signature id was used\\n * @param signatureId signing signature ID\\n */\\n function getSignatureType(uint256 signatureId) external view returns (SignatureType) {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n return $.signatureIds[signatureId];\\n }\\n\\n /**\\n * @notice updates the sign address.\\n * @param _signAddress new signer address to be set\\n */\\n function _setSignAddress(address _signAddress) internal {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n if (_signAddress == address(0)) {\\n revert InvalidSignAddress(_signAddress);\\n }\\n emit SignAddressSet(_msgSender(), $.signAddress, _signAddress);\\n $.signAddress = _signAddress;\\n }\\n\\n /**\\n * @notice checks that the provided signature is valid, while also taking into\\n * consideration the provided address and signatureId.\\n * @param wallet address to be used in validating the signature\\n * @param signatureId signing signature ID\\n * @param signature signing signature value\\n */\\n function _checkAndSetMintSignature(\\n address wallet,\\n uint256 signatureId,\\n bytes calldata signature\\n ) internal {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n if ($.signatureIds[signatureId] != SignatureType.Unused\\n || _getMintSignature(wallet, signatureId, address(this), block.chainid, signature) != $.signAddress) {\\n revert InvalidSignature(signatureId);\\n }\\n $.signatureIds[signatureId] = SignatureType.Mint;\\n }\\n\\n /**\\n * @notice checks that the provided signature is valid, while also taking into\\n * consideration the provided address and signatureId.\\n * @param wallet address to be used in validating the signature\\n * @param amount number of token to mint\\n * @param waveIndex the index of the wave that is used to mint\\n * @param signatureId signing signature ID\\n * @param signature signing signature value\\n */\\n function _checkAndSetWaveMintSignature(\\n address wallet,\\n uint256 amount,\\n uint256 waveIndex,\\n uint256 signatureId,\\n bytes calldata signature\\n ) internal {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n if ($.signatureIds[signatureId] != SignatureType.Unused\\n || _getWaveMintSignature(wallet, amount, waveIndex, signatureId, address(this), block.chainid, signature) != $.signAddress) {\\n revert InvalidSignature(signatureId);\\n }\\n $.signatureIds[signatureId] = SignatureType.WaveMint;\\n }\\n\\n /**\\n * @notice checks that the provided signature is valid, while also taking into\\n * consideration the provided address and signatureId.\\n * @param wallet address to be used in validating the signature\\n * @param signatureId signing signature ID\\n * @param signature signing signature value\\n */\\n function _checkAndSetRevealSignature(\\n address wallet,\\n uint256 signatureId,\\n bytes calldata signature\\n ) internal {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n if ($.signatureIds[signatureId] != SignatureType.Unused\\n || _getRevealSignature(wallet, signatureId, address(this), block.chainid, signature) != $.signAddress) {\\n revert InvalidSignature(signatureId);\\n }\\n $.signatureIds[signatureId] = SignatureType.Reveal;\\n }\\n\\n\\n /**\\n * @notice checks that the provided personalization signature is valid, while also taking into\\n * consideration the provided address and signatureId.\\n * @param wallet address to be used in validating the signature\\n * @param signatureId signing signature ID\\n * @param signature signing signature value\\n * @param tokenId what token to personalize\\n * @param personalizationMask a mask where each bit has a custom meaning in-game\\n */\\n function _checkAndSetPersonalizationSignature(\\n address wallet,\\n uint256 tokenId,\\n uint256 personalizationMask,\\n uint256 signatureId,\\n bytes calldata signature\\n ) internal {\\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\\n if ($.signatureIds[signatureId] != SignatureType.Unused ||\\n _getPersonalizationSignature(\\n wallet,\\n signatureId,\\n address(this),\\n block.chainid,\\n tokenId,\\n personalizationMask,\\n signature\\n ) != $.signAddress) {\\n revert InvalidSignature(signatureId);\\n }\\n $.signatureIds[signatureId] = SignatureType.Personalization;\\n }\\n\\n\\n /**\\n * @notice validates signature\\n * @param wallet wallet that was used in signature generation\\n * @param signatureId id of signature\\n * @param contractAddress contract address that was used in signature generation\\n * @param chainId chain ID for which the signature was generated\\n * @param signature signature\\n * @return address that validates the provided signature\\n */\\n function _getMintSignature(\\n address wallet,\\n uint256 signatureId,\\n address contractAddress,\\n uint256 chainId,\\n bytes calldata signature\\n ) internal pure returns (address) {\\n return\\n ECDSA.recover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encode(wallet, signatureId, contractAddress, chainId))\\n )\\n ),\\n signature\\n );\\n }\\n\\n /**\\n * @notice validates signature\\n * @param wallet wallet that was used in signature generation\\n * @param signatureId id of signature\\n * @param contractAddress contract address that was used in signature generation\\n * @param chainId chain ID for which the signature was generated\\n * @param signature signature\\n * @return address that validates the provided signature\\n */\\n function _getRevealSignature(\\n address wallet,\\n uint256 signatureId,\\n address contractAddress,\\n uint256 chainId,\\n bytes calldata signature\\n ) internal pure returns (address) {\\n /// @dev the string \\\"reveal\\\" is to distinguish it from the minting signature.\\n return\\n ECDSA.recover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(abi.encode(wallet, signatureId, contractAddress, chainId, \\\"reveal\\\"))\\n )\\n ),\\n signature\\n );\\n }\\n\\n /**\\n * @notice validate personalization mask\\n * @param wallet wallet that was used in signature generation\\n * @param signatureId id of signature\\n * @param contractAddress contract address that was used in signature generation\\n * @param chainId chain ID for which the signature was generated\\n * @param tokenId token ID for which the signature was generated\\n * @param personalizationMask a mask where each bit has a custom meaning in-game\\n * @param signature signature\\n * @return address that validates the provided signature\\n */\\n function _getPersonalizationSignature(\\n address wallet,\\n uint256 signatureId,\\n address contractAddress,\\n uint256 chainId,\\n uint256 tokenId,\\n uint256 personalizationMask,\\n bytes calldata signature\\n ) internal pure returns (address) {\\n return\\n ECDSA.recover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(\\n abi.encode(\\n wallet,\\n signatureId,\\n contractAddress,\\n chainId,\\n tokenId,\\n personalizationMask\\n )\\n )\\n )\\n ),\\n signature\\n );\\n }\\n\\n /**\\n * @notice validate a mint signature that includes a waveIndex\\n * @param wallet wallet that was used in signature generation\\n * @param amount number of token to mint\\n * @param waveIndex the index of the wave that is used to mint\\n * @param signatureId id of signature\\n * @param contractAddress contract address that was used in signature generation\\n * @param chainId chain ID for which the signature was generated\\n * @param signature signature\\n * @return address that validates the provided signature\\n */\\n function _getWaveMintSignature(\\n address wallet,\\n uint256 amount,\\n uint256 waveIndex,\\n uint256 signatureId,\\n address contractAddress,\\n uint256 chainId,\\n bytes calldata signature\\n ) internal pure returns (address) {\\n return\\n ECDSA.recover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n keccak256(\\n abi.encode(\\n wallet,\\n amount,\\n waveIndex,\\n signatureId,\\n contractAddress,\\n chainId\\n )\\n )\\n )\\n ),\\n signature\\n );\\n }\\n\\n /**\\n * @notice ERC2771 compatible msg.sender getter\\n * @return sender msg.sender\\n */\\n function _msgSender() internal view virtual returns (address);\\n}\\n\",\"keccak256\":\"0x869b8ad6945ab05abf62dc24e88ee35a16e59e019b328cb51023a3cfc4d56546\",\"license\":\"MIT\"},\"@sandbox-smart-contracts/avatar/contracts/nft-collection/UpdatableOperatorFiltererUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable one-contract-per-file\\npragma solidity 0.8.26;\\n\\n/**\\n * @title UpdatableOperatorFiltererUpgradeable\\n * @author The Sandbox\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice This contract would subscribe or copy or just to the subscription provided or just register to\\n * default subscription list\\n * @dev This contract is the upgradeable version of the OpenSea implementation\\n * https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/OperatorFilterer.sol\\n * and adapted to the 0.5.9 solidity version\\n * To avoid an extra IOperatorFilterRegistry file for a code that is deprecated the interface is added below\\n */\\nabstract contract UpdatableOperatorFiltererUpgradeable {\\n struct UpdatableOperatorFiltererUpgradeableStorage {\\n /**\\n * @notice the registry filter\\n */\\n IOperatorFilterRegistry operatorFilterRegistry;\\n }\\n\\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.UpdatableOperatorFiltererUpgradeable\\n bytes32 internal constant UPDATABLE_OPERATOR_FILTERER_UPGRADABLE_STORAGE_LOCATION =\\n 0x71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e800;\\n\\n function _getUpdatableOperatorFiltererUpgradeableStorage() private pure returns (UpdatableOperatorFiltererUpgradeableStorage storage $) {\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n $.slot := UPDATABLE_OPERATOR_FILTERER_UPGRADABLE_STORAGE_LOCATION\\n }\\n }\\n\\n /**\\n * @notice emitted when a registry is set\\n * @param operator the sender of the transaction\\n * @param oldRegistry address of the old registry\\n * @param newRegistry address of the new registry to set\\n */\\n event OperatorRegistrySet(address indexed operator, IOperatorFilterRegistry indexed oldRegistry, address indexed newRegistry);\\n\\n /**\\n * @notice emitted when the contract is registered into the registry\\n * @param operator the sender of the transaction\\n * @param registry address of the registry to set\\n * @param subscriptionOrRegistrant address to subscribe or copy entries from\\n * @param subscribe should it subscribe\\n */\\n event ContractRegistered(\\n address indexed operator,\\n IOperatorFilterRegistry indexed registry,\\n address indexed subscriptionOrRegistrant,\\n bool subscribe\\n );\\n\\n /**\\n * @notice the caller is not the operator\\n * @param operator that does the call\\n */\\n error OperatorNotAllowed(address operator);\\n\\n /**\\n * @notice the registry is not configured\\n * @param operator that does the call\\n */\\n error RegistryNotSet(address operator);\\n\\n /**\\n * @notice this contract is already registered\\n * @param operator that does the call\\n */\\n error AlreadyRegistered(address operator);\\n\\n /**\\n * @notice Used in approval operations to check if the operator is allowed to call this contract\\n * @param operator The address receiving the approval\\n */\\n modifier onlyAllowedOperatorApproval(address operator) virtual {\\n _checkIsOperatorAllowed(address(this), operator);\\n _;\\n }\\n\\n /**\\n * @notice Used in transfer from operations to check if the sender of the token is allowed to call this contract\\n * @param from the sender of the token\\n */\\n modifier onlyAllowedOperator(address from) virtual {\\n // Allow spending tokens from addresses with balance (from == _msgSender())\\n // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred\\n // from an EOA.\\n if (from != _msgSender()) {\\n _checkIsOperatorAllowed(address(this), _msgSender());\\n }\\n _;\\n }\\n\\n /**\\n * @notice return the operatorFilterRegistry address\\n */\\n function operatorFilterRegistry() external view returns (IOperatorFilterRegistry) {\\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\\n return $.operatorFilterRegistry;\\n }\\n\\n /**\\n * @notice Register this contract into the registry\\n * @param subscriptionOrRegistrantToCopy address to subscribe or copy entries from\\n * @param subscribe should it subscribe\\n */\\n function _register(address subscriptionOrRegistrantToCopy, bool subscribe) internal {\\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\\n IOperatorFilterRegistry registry = $.operatorFilterRegistry;\\n bool isContract = address(registry).code.length > 0;\\n if (!isContract) {\\n revert RegistryNotSet(_msgSender());\\n }\\n if (registry.isRegistered(address(this))) {\\n revert AlreadyRegistered(_msgSender());\\n }\\n\\n if (subscribe) {\\n registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);\\n } else if (subscriptionOrRegistrantToCopy != address(0)) {\\n registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);\\n } else {\\n registry.register(address(this));\\n }\\n emit ContractRegistered(_msgSender(), registry, subscriptionOrRegistrantToCopy, subscribe);\\n }\\n\\n /**\\n * @notice sets filter registry address deployed in test\\n * @param registry the address of the registry\\n * @dev address(0) disables the registry\\n */\\n function _setOperatorRegistry(address registry) internal {\\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\\n emit OperatorRegistrySet(_msgSender(), $.operatorFilterRegistry, registry);\\n $.operatorFilterRegistry = IOperatorFilterRegistry(registry);\\n }\\n\\n /**\\n * @notice Check if the operator is allowed for the given registrant\\n * @param registrant address of the registrant\\n * @param operator operator address to check\\n */\\n function _checkIsOperatorAllowed(address registrant, address operator) internal view {\\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\\n // Check registry code length to facilitate testing in environments without a deployed registry.\\n IOperatorFilterRegistry registry = $.operatorFilterRegistry;\\n if (address(registry).code.length > 0) {\\n /* solhint-disable no-empty-blocks */\\n try registry.isOperatorAllowed(registrant, operator) returns (bool retval) {\\n if (retval) {\\n return;\\n }\\n } catch (bytes memory) {}\\n /* solhint-enable no-empty-blocks */\\n revert OperatorNotAllowed(operator);\\n }\\n }\\n\\n /**\\n * @notice ERC2771 compatible msg.sender getter\\n * @return sender msg.sender\\n */\\n function _msgSender() internal view virtual returns (address);\\n}\\n\\n/**\\n * @title IOperatorFilterRegistry\\n * @author Opensea\\n * @custom:security-contact contact-blockchain@sandbox.game\\n * @notice Based on the opensea registry implementation, added here to be used specifically and\\n * @notice just once in UpdatableOperatorFiltererUpgradeable\\n * @dev see: https://github.com/ProjectOpenSea/operator-filter-registry/tree/main\\n */\\ninterface IOperatorFilterRegistry {\\n /**\\n * @notice Returns true if an address has registered\\n * @param addr the address to check if it is registered\\n */\\n function isRegistered(address addr) external returns (bool);\\n\\n /**\\n * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns\\n * true if supplied registrant address is not registered.\\n * @param registrant the address of the contract to check for (usually address(this))\\n * @param operator the operator to check if it is registered for this registrant\\n */\\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\\n\\n\\n /**\\n * @notice Registers an address with the registry and \\\"subscribes\\\" to another address's filtered operators and codeHashes.\\n * @param registrant the address of the contract to check for (usually address(this))\\n * @param subscription address to subscribe to\\n */\\n function registerAndSubscribe(address registrant, address subscription) external;\\n\\n /**\\n * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another\\n * address without subscribing.\\n * @param registrant the address of the contract to check for (usually address(this))\\n * @param registrantToCopy address to copy entries from\\n */\\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\\n\\n /**\\n * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.\\n * @param registrant the address of the contract to check for (usually address(this))\\n */\\n function register(address registrant) external;\\n}\\n\\n\",\"keccak256\":\"0x5dbcb88ed4e9ff6c4b1772485aff983ad57128b5dcd80cfce2393eb6cae686dd\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052348015600f57600080fd5b506016601a565b60ca565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161560695760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b039081161460c75780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b615d9c806100d96000396000f3fe608060405234801561001057600080fd5b50600436106104dd5760003560e01c8063715018a611610286578063a90fe8611161016b578063d547cfb7116100e3578063e985e9c511610097578063f0f442601161007c578063f0f4426014610bbd578063f2fde38b14610bd0578063f3993d1114610be357600080fd5b8063e985e9c514610b5a578063ee437dae14610bb557600080fd5b8063da742228116100c8578063da74222814610b0f578063e30c397814610b22578063e3e3506214610b2a57600080fd5b8063d547cfb714610ae0578063d5abeb0114610ae857600080fd5b8063b88d4fde1161013a578063c87b56dd1161011f578063c87b56dd14610aa6578063ca0df4a11461063a578063d266919914610ab957600080fd5b8063b88d4fde14610a8d578063c763e5a114610aa057600080fd5b8063a90fe86114610a2f578063ab01b46914610a42578063ac3149e314610a55578063b0ccc31e14610a8557600080fd5b80638da5cb5b116101fe57806397944ba2116101cd5780639d28fb86116101b25780639d28fb86146109f6578063a22cb46514610a09578063a6e3ec2614610a1c57600080fd5b806397944ba2146109af57806398603cca146109ee57600080fd5b80638da5cb5b1461090d5780638deeed421461091557806390c5c56d1461095d57806395d89b41146109a757600080fd5b806379ba50971161025557806382bc78771161023a57806382bc7877146108df5780638456cb59146108f25780638a616bc0146108fa57600080fd5b806379ba5097146108cf5780637da0a877146108d757600080fd5b8063715018a614610899578063731133e9146108a15780637581a8e6146108b457806378b6811f146108bc57600080fd5b80631c00ff5b116103c757806349c55c5e1161033f5780635944c753116102f35780636352211e116102d85780636352211e146108605780636f8b44b01461087357806370a082311461088657600080fd5b80635944c753146108235780635c975abb1461083657600080fd5b80635375e898116103245780635375e898146107ea57806355f804b3146107fd578063572b6c051461081057600080fd5b806349c55c5e146107c457806349c95a31146107d757600080fd5b80632a55205a116103965780633f4ba83a1161037b5780633f4ba83a1461079657806342842e0e1461079e57806342966c68146107b157600080fd5b80632a55205a146107515780633ee462c21461078357600080fd5b80631c00ff5b1461070557806323b872dd1461071857806326b3af641461072b57806328cfbd461461073e57600080fd5b806309b450971161045a57806315491c2111610429578063180b0d7e1161040e578063180b0d7e146106bb57806318160ddd146106cb5780631992c3f3146106f257600080fd5b806315491c2114610695578063179573d3146106a857600080fd5b806309b45097146105d85780630f0a3e6d1461062757806311db8d1b1461063a578063151370451461068257600080fd5b80630682bdbc116104b157806307ebec271161049657806307ebec2714610588578063081812fc146105b2578063095ea7b3146105c557600080fd5b80630682bdbc1461055357806306fdde031461057357600080fd5b80626cddce146104e257806301ffc9a714610508578063023ba7c31461052b57806304634d8d1461053e575b600080fd5b6104f56104f0366004614fb2565b610bf6565b6040519081526020015b60405180910390f35b61051b610516366004614ff9565b610c0d565b60405190151581526020016104ff565b6104f561053936600461503b565b610c1e565b61055161054c366004615083565b610c9e565b005b61055b610d14565b6040516001600160a01b0390911681526020016104ff565b61057b610d49565b6040516104ff9190615108565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594025460ff1661051b565b61055b6105c0366004614fb2565b610dff565b6105516105d336600461503b565b610e47565b61061a6105e6366004614fb2565b60009081527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357901602052604090205460ff1690565b6040516104ff9190615131565b610551610635366004615159565b610e61565b61055b610648366004614fb2565b60009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c5940060205260409020546001600160a01b031690565b6105516106903660046151da565b611063565b6105516106a33660046152e9565b611077565b6104f56106b6366004614fb2565b6111dd565b60405161271081526020016104ff565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d06546104f5565b6105516107003660046153e7565b6111f9565b610551610713366004615413565b61137b565b610551610726366004615474565b611400565b6105516107393660046154b5565b611443565b61055161074c36600461556d565b611579565b61076461075f3660046155e9565b6116b8565b604080516001600160a01b0390931683526020830191909152016104ff565b6104f5610791366004614fb2565b6117b7565b6105516117ce565b6105516107ac366004615474565b6117e8565b6105516107bf366004614fb2565b611803565b6105516107d2366004614fb2565b611814565b6104f56107e536600461560b565b6118aa565b6104f56107f8366004614fb2565b6118db565b61055161080b36600461563b565b6118ef565b61051b61081e3660046151da565b611934565b61055161083136600461567d565b61196c565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1661051b565b61055b61086e366004614fb2565b6119e0565b610551610881366004614fb2565b6119eb565b6104f56108943660046151da565b6119fc565b610551611a83565b6105516108af3660046156bb565b611a95565b610551611bb1565b61051b6108ca366004615708565b611bc1565b610551611c57565b61055b611cc9565b6105516108ed3660046151da565b611cf2565b610551611d03565b610551610908366004614fb2565b611d1b565b61055b611d91565b6104f56109233660046151da565b6001600160a01b031660009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59401602052604090205490565b61051b61096b3660046151da565b6001600160a01b031660009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594016020526040902054151590565b61057b611dba565b6104f56109bd366004614fb2565b60009081527f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d05602052604090205490565b610551611e0b565b610551610a043660046151da565b611e1b565b610551610a1736600461573d565b611e2c565b610551610a2a3660046155e9565b611e41565b610551610a3d36600461576b565b611eab565b610551610a5036600461573d565b611f57565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d04546001600160a01b031661055b565b61055b611f69565b610551610a9b3660046157be565b611f92565b466104f5565b61057b610ab4366004614fb2565b611fcb565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03546104f5565b61057b612032565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00546104f5565b610551610b1d3660046151da565b612083565b61055b612094565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d01546001600160a01b031661055b565b61051b610b6836600461583e565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b6105516120bd565b610551610bcb3660046151da565b61212b565b610551610bde3660046151da565b61213c565b610551610bf136600461586c565b6121c1565b600080610c02836122bc565b600101549392505050565b6000610c1882612344565b92915050565b6001600160a01b03821660009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594016020526040812080547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59400919084908110610c8a57610c8a6158c5565b906000526020600020015491505092915050565b610ca661239a565b816001600160a01b0316610cb8612407565b6040516bffffffffffffffffffffffff841681526001600160a01b0391909116907f1266dd9a36c3109e9494da97febae6bb0a79426e9c9aaa8763387454373e1f529060200160405180910390a3610d108282612411565b5050565b6000807f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f3333579005b546001600160a01b031692915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008054606091908190610d7b906158db565b80601f0160208091040260200160405190810160405280929190818152602001828054610da7906158db565b8015610df45780601f10610dc957610100808354040283529160200191610df4565b820191906000526020600020905b815481529060010190602001808311610dd757829003601f168201915b505050505091505090565b6000610e0a82612515565b5060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b0316610c18565b81610e52308261256d565b610e5c83836126a9565b505050565b610e696126bb565b610e7161239a565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00816000819003610ece576040517f1949fde700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003820154600003610ef257604051622dc1c960e71b815260040160405180910390fd5b6000610efd866122bc565b905060005b8281101561105a5760068401546000878784818110610f2357610f236158c5565b610f3992602060409092020190810191506151da565b90506000888885818110610f4f57610f4f6158c5565b905060400201602001359050610f6787868484612717565b610fb4576040517f6a2a8faa0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602481018290526044015b60405180910390fd5b60005b81811015610fe557610fdd83610fcd838761592b565b610fd890600161592b565b612792565b600101610fb7565b506001600160a01b03821660009081526004860160205260408120805483929061101090849061592b565b925050819055508085600301600082825461102b919061592b565b9250508190555080876006016000828254611046919061592b565b909155505060019093019250610f02915050565b50505050505050565b61106b61239a565b61107481612810565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156110c25750825b905060008267ffffffffffffffff1660011480156110df5750303b155b9050811580156110ed575080155b15611124576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561116f57845468ff00000000000000001916680100000000000000001785555b6111818f8f8f8f8f8f8f8f8f8f6128e8565b83156111cc57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050505050565b6000806111e9836122bc565b600201549392505050565b905090565b61120161239a565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00805484118061122f575083155b80611238575082155b8061124257508383115b15611283576040517ff3cafbc20000000000000000000000000000000000000000000000000000000081526004810185905260248101849052604401610fab565b6003810154611290612407565b6040805187815260208101879052908101859052606081018390526001600160a01b0391909116907f21e1aa7f400a90a7e77ab0176b81222f0f927b289ef67fabcb30a56da2c506b19060800160405180910390a2600382018054600101808255600082905286919083908110611309576113096158c5565b90600052602060002090600502016000018190555083826003018281548110611334576113346158c5565b9060005260206000209060050201600101819055508282600301828154811061135f5761135f6158c5565b9060005260206000209060050201600201819055505050505050565b6113836126bb565b600061138d612407565b9050600061139a876119e0565b9050816001600160a01b0316816001600160a01b0316146113e8576040516364283d7b60e01b81526001600160a01b0380841660048301526024820189905282166044820152606401610fab565b6113f6828888888888612a6f565b61105a8787612b52565b82611409612407565b6001600160a01b0316816001600160a01b031614611432576114323061142d612407565b61256d565b61143d848484612c12565b50505050565b61144b6126bb565b611453612c9e565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03547f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00906000036114b657604051622dc1c960e71b815260040160405180910390fd5b60048101546001600160a01b03166114cc612407565b6001600160a01b031614611520576114e2612407565b6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b61152e878787878787612d1f565b6000611539866122bc565b9050611546818989612df8565b505061157160017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050505050565b85611582612407565b6001600160a01b0316816001600160a01b0316146115a6576115a63061142d612407565b6001600160a01b0386166115d057604051633250574960e11b815260006004820152602401610fab565b60006115da612407565b90508460005b818110156116ac5760008888838181106115fc576115fc6158c5565b90506020020135905060006116128b8387612f74565b90508b6001600160a01b0316816001600160a01b031614611660576040516364283d7b60e01b81526001600160a01b03808e1660048301526024820184905282166044820152606401610fab565b6116a28c8c848b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506130b592505050565b50506001016115e0565b50505050505050505050565b60008281527fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b01602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282917fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00919061177857506040805180820190915281546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b60208101516000906127109061179c906bffffffffffffffffffffffff168861593e565b6117a69190615955565b9151945090925050505b9250929050565b6000806117c3836122bc565b600301549392505050565b6117d661239a565b6117de61320f565b6117e661326a565b565b610e5c83838360405180602001604052806000815250611f92565b61180b6126bb565b611074816132e2565b61181c61239a565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03547f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0090821061187e57604051622dc1c960e71b815260040160405180910390fd5b6000816003018381548110611895576118956158c5565b60009182526020909120600590910201555050565b6000806118b6846122bc565b6001600160a01b03841660009081526004909101602052604090205491505092915050565b6000806118e7836122bc565b549392505050565b6118f761239a565b61190182826133f7565b604051600019906000907f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c908290a35050565b7f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000546000906001600160a01b03808416911614610c18565b61197461239a565b816001600160a01b031683611987612407565b6040516bffffffffffffffffffffffff851681526001600160a01b0391909116907f80398053543636fe8ebda0b83661b13671543aa7c4ff209b9989e22df937c93f9060200160405180910390a4610e5c8383836134b5565b6000610c1882612515565b6119f361239a565b611074816135db565b60007f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316611a62576040517f89c62b6400000000000000000000000000000000000000000000000000000000815260006004820152602401610fab565b6001600160a01b039092166000908152600390920160205250604090205490565b611a8b61239a565b6117e660006136ef565b611a9d6126bb565b611aa5612c9e565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03547f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00906000819003611b0a57604051622dc1c960e71b815260040160405180910390fd5b60048201546001600160a01b0316611b20612407565b6001600160a01b031614611b36576114e2612407565b611b4287868686613727565b600060038301611b53600184615977565b81548110611b6357611b636158c5565b90600052602060002090600502019050611b7e818989612df8565b505050611baa60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050505050565b611bb961239a565b6117e6613801565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03546000907f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00908510611c18576000915050611c50565b6000816003018681548110611c2f57611c2f6158c5565b90600052602060002090600502019050611c4b82828787612717565b925050505b9392505050565b6000611c61612407565b9050806001600160a01b0316611c75612094565b6001600160a01b031614611cc0576040517f118cdaa70000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610fab565b611074816136ef565b6000807f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000610d39565b611cfa61239a565b611074816138ce565b611d0b61239a565b611d136126bb565b6117e66139ad565b611d2361239a565b80611d2c612407565b6001600160a01b03167fdf2990aaa44e731e41ae9d23d42384a4b75061aa55d335606115b3deb765944c60405160405180910390a360009081527fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b016020526040812055565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300610d39565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060917f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930091610d7b906158db565b611e1361239a565b6117e6613a0a565b611e2361239a565b61107481613ad3565b81611e37308261256d565b610e5c8383613b60565b611e4961239a565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031680611ea157604051637e27328960e01b815260048101849052602401610fab565b610e5c8383612b52565b611eb36126bb565b6000611ebd612407565b90506000611eca866119e0565b9050816001600160a01b0316816001600160a01b031614611f18576040516364283d7b60e01b81526001600160a01b0380841660048301526024820188905282166044820152606401610fab565b611f2482868686613b72565b60405186907ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce790600090a2505050505050565b611f5f61239a565b610d108282613c49565b6000807f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e800610d39565b83611f9b612407565b6001600160a01b0316816001600160a01b031614611fbf57611fbf3061142d612407565b611baa85858585613f4e565b6060611fd682612515565b506000611fe1612032565b905060008151116120015760405180602001604052806000815250611c50565b8061200b84613f65565b60405160200161201c92919061598a565b6040516020818303038152906040529392505050565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0280546060917f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0091610d7b906158db565b61208b61239a565b61107481614005565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610d39565b6120c561239a565b6120cd612407565b6001600160a01b03167f2dfe49916b7d76a5f1ebe1ab9a2618777c34ea6e0ba6c52d9369929a43a4a6de60405160405180910390a26117e660007fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b0055565b61213361239a565b61107481614092565b61214461239a565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b0383169081178255612188611d91565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b836121ca612407565b6001600160a01b0316816001600160a01b0316146121ee576121ee3061142d612407565b6001600160a01b03841661221857604051633250574960e11b815260006004820152602401610fab565b6000612222612407565b90508260005b818110156122b2576000868683818110612244576122446158c5565b905060200201359050600061225a898387612f74565b9050896001600160a01b0316816001600160a01b0316146122a8576040516364283d7b60e01b81526001600160a01b03808c1660048301526024820184905282166044820152606401610fab565b5050600101612228565b5050505050505050565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03546000907f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d009080841061231857612315600182615977565b93505b81600301848154811061232d5761232d6158c5565b906000526020600020906005020192505050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610c185750610c1882614170565b6123a2612407565b6001600160a01b03166123b3611d91565b6001600160a01b0316146117e6576123c9612407565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b60006111f4614253565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106bffffffffffffffffffffffff8316811015612494576040517f6f483d090000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff8416600482015260248101829052604401610fab565b6001600160a01b0384166124d7576040517fb6d9900a00000000000000000000000000000000000000000000000000000000815260006004820152602401610fab565b50604080518082019091526001600160a01b039093168084526bffffffffffffffffffffffff9092166020909301839052600160a01b909202179055565b60008181527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120546001600160a01b031680610c1857604051637e27328960e01b815260048101849052602401610fab565b7f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e80080546001600160a01b0316803b1561143d576040517fc61711340000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152848116602483015282169063c617113490604401602060405180830381865afa925050508015612623575060408051601f3d908101601f19168201909252612620918101906159b9565b60015b61265d573d808015612651576040519150601f19603f3d011682016040523d82523d6000602084013e612656565b606091505b505061266c565b801561266a575050505050565b505b6040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610fab565b610d1082826126b6612407565b6142cd565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16156117e6576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808211801561273857508354600385015461273590849061592b565b11155b801561276d575060018401546001600160a01b038416600090815260048601602052604090205461276a90849061592b565b11155b801561278957508454600686015461278690849061592b565b11155b95945050505050565b6001600160a01b0382166127bc57604051633250574960e11b815260006004820152602401610fab565b60006127ca83836000612f74565b90506001600160a01b03811615610e5c576040517f73c6ac6e00000000000000000000000000000000000000000000000000000000815260006004820152602401610fab565b7f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f3333579006001600160a01b03821661287c576040517fa6ff6cd10000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610fab565b80546001600160a01b038084169116612893612407565b6001600160a01b03167f827b059b420f2ae50bebd7002ab386062a31770f2e54269507162880bfb793b960405160405180910390a480546001600160a01b0319166001600160a01b0392909216919091179055565b6128f06142da565b865160000361292d57866040517f7f19f48d000000000000000000000000000000000000000000000000000000008152600401610fab9190615108565b855160000361296a57856040517fbc7e3f55000000000000000000000000000000000000000000000000000000008152600401610fab9190615108565b612972614341565b61297b8a6136ef565b612983614351565b61298c83614005565b6129968787614359565b61299e61436b565b6129a889896133f7565b6129b185614092565b6129ba84612810565b6129c3826138ce565b6129cc816135db565b856040516129da91906159d6565b6040518091039020876040516129f091906159d6565b60405180910390208a8a604051612a089291906159f2565b604080519182900382206001600160a01b038a81168452898116602085015287168383015260608301869052905190917fa00c490c2b21130e4143953352dedc9f2b226d5ce1c5ef7e2b20796cbe7c090a919081900360800190a450505050505050505050565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff166004811115612ad457612ad461511b565b141580612b03575080546001600160a01b0316612af7888630468b8b8a8a61437b565b6001600160a01b031614155b15612b2457604051630a57f30960e31b815260048101859052602401610fab565b600084815260018083016020526040909120805460029260ff1990911690835b021790555050505050505050565b60008281527f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d05602052604090208190557f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d008183612bad612407565b6001600160a01b03167f8f5bc4e4444be2e737fe62ea6160f37981fd2ecfcda061928373d882eceaf3fa60405160405180910390a460405183907ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce790600090a2505050565b6001600160a01b038216612c3c57604051633250574960e11b815260006004820152602401610fab565b6000612c508383612c4b612407565b612f74565b9050836001600160a01b0316816001600160a01b03161461143d576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401610fab565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01612d19576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff166004811115612d8457612d8461511b565b141580612db3575080546001600160a01b0316612da78888888830468a8a614465565b6001600160a01b031614155b15612dd457604051630a57f30960e31b815260048101859052602401610fab565b600084815260018083016020526040909120805460049260ff199091169083612b44565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00612e2581858585612717565b612e6d576040517f6a2a8faa0000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101839052604401610fab565b6000828560020154612e7f919061593e565b90508015612eaa5760048201546001830154612eaa916001600160a01b0390811691879116846144ab565b600682015460005b84811015612ee057612ed886612ec8838561592b565b612ed390600161592b565b614533565b600101612eb2565b506001600160a01b038516600090815260048701602052604081208054869290612f0b90849061592b565b9250508190555083866003016000828254612f26919061592b565b9250508190555083836006016000828254612f41919061592b565b9091555050505050505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120547f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300906001600160a01b0390811690841615612fe257612fe281858761454d565b6001600160a01b0381161561302257612fff6000866000806145ca565b6001600160a01b0381166000908152600383016020526040902080546000190190555b6001600160a01b03861615613053576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b6001600160a01b0383163b1561143d57826001600160a01b031663150b7a026130dc612407565b8685856040518563ffffffff1660e01b81526004016130fe9493929190615a02565b6020604051808303816000875af1925050508015613139575060408051601f3d908101601f1916820190925261313691810190615a43565b60015b6131a2573d808015613167576040519150601f19603f3d011682016040523d82523d6000602084013e61316c565b606091505b50805160000361319a57604051633250574960e11b81526001600160a01b0385166004820152602401610fab565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167f150b7a020000000000000000000000000000000000000000000000000000000014611baa57604051633250574960e11b81526001600160a01b0385166004820152602401610fab565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166117e6576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61327261320f565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6132c4612407565b6040516001600160a01b03909116815260200160405180910390a150565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59402547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594009060ff1661335f576040517ffddf3c2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613369612407565b9050600061337960008584612f74565b60008581526020858152604080832080546001600160a01b0319166001600160a01b038881169182179092558085526001808a018552838620805491820181558652938520909301899055905193945084169287927f0fb81ee2634a482264d8193cc9e1703d814cb3f5a1e239dc2580496bf571df7791a450505050565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0060008290036134575782826040517fa4fe57f4000000000000000000000000000000000000000000000000000000008152600401610fab929190615a8b565b61345f612407565b6001600160a01b03167f0589f6de204c3ac121129f5111ee5b702672a7e80758887b289d4b23a17b743a82600201858560405161349e93929190615a9f565b60405180910390a26002810161143d838583615b7d565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106bffffffffffffffffffffffff831681101561353f576040517fdfd1fc1b000000000000000000000000000000000000000000000000000000008152600481018690526bffffffffffffffffffffffff8416602482015260448101829052606401610fab565b6001600160a01b038416613589576040517f969f08520000000000000000000000000000000000000000000000000000000081526004810186905260006024820152604401610fab565b506040805180820182526001600160a01b0394851681526bffffffffffffffffffffffff938416602080830191825260009788526001909401909352942093519051909116600160a01b029116179055565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0060008290036136475760068101546040517f7c26552b000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152604401610fab565b80600601548210156136955760068101546040517f7c26552b000000000000000000000000000000000000000000000000000000008152610fab918491600401918252602082015260400190565b61369d612407565b6001600160a01b03167fccc3b7560f9d81f26c619129ba9fa74ded9a6edb555a04655baaeca673e0a8098260000154846040516136e4929190918252602082015260400190565b60405180910390a255565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610d1082614749565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff16600481111561378c5761378c61511b565b1415806137b9575080546001600160a01b03166137ad8686304688886147ba565b6001600160a01b031614155b156137da57604051630a57f30960e31b815260048101859052602401610fab565b600084815260018281016020526040909120805460ff191682805b02179055505050505050565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59402547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594009060ff161561387f576040517f4c3bf9a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028101805460ff19166001179055613896612407565b6001600160a01b03167f87c17d0e9338ee3c159be69a99891df1590dd083a3777b03bfdb241d41e9d30460405160405180910390a250565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d006001600160a01b0382163b61393b576040517fe5f21c110000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610fab565b60048101546001600160a01b038084169116613955612407565b6001600160a01b03167f5d3eb288d70f5778687463132ce6b9fbf9196273269c75cf04deec982da5b6ef60405160405180910390a460040180546001600160a01b0319166001600160a01b0392909216919091179055565b6139b56126bb565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586132c4612407565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59402547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594009060ff16613a87576040517ffddf3c2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028101805460ff19169055613a9b612407565b6001600160a01b03167fc1258e2781f6fca80c30c40200f57fd8171a2737a63ef1375dea6fae520ede6060405160405180910390a250565b7f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e80080546001600160a01b038381169116613b0b612407565b6001600160a01b03167f843ddfc5ccee52d319111d9be8a67a9f91517b207a5242a2faa1cbb10b621fee60405160405180910390a480546001600160a01b0319166001600160a01b0392909216919091179055565b610d10613b6b612407565b83836147fd565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff166004811115613bd757613bd761511b565b141580613c04575080546001600160a01b0316613bf88686304688886148d9565b6001600160a01b031614155b15613c2557604051630a57f30960e31b815260048101859052602401610fab565b600084815260018083016020526040909120805460039260ff1990911690836137f5565b7f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e80080546001600160a01b0316803b151580613cc457613c86612407565b6040517ff5d522670000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b6040517fc3c5a5470000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383169063c3c5a547906024016020604051808303816000875af1158015613d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d4791906159b9565b15613d9257613d54612407565b6040517f45ed80e90000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b8315613e18576040517f7d3e3dbe0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038681166024830152831690637d3e3dbe906044015b600060405180830381600087803b158015613dfb57600080fd5b505af1158015613e0f573d6000803e3d6000fd5b50505050613ee7565b6001600160a01b03851615613e74576040517fa0af29030000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03868116602483015283169063a0af290390604401613de1565b6040517f4420e4860000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831690634420e48690602401600060405180830381600087803b158015613ece57600080fd5b505af1158015613ee2573d6000803e3d6000fd5b505050505b846001600160a01b0316826001600160a01b0316613f03612407565b6001600160a01b03167f3ff6751845562342150f01f256e77e1a7f0a5c3e49cd1307c5f142062fb2f10587604051613f3f911515815260200190565b60405180910390a45050505050565b613f59848484611400565b61143d848484846130b5565b60606000613f7283614945565b600101905060008167ffffffffffffffff811115613f9257613f92615239565b6040519080825280601f01601f191660200182016040528015613fbc576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084613fc657509392505050565b7f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa700080546001600160a01b03838116911661403d612407565b6001600160a01b03167f8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e560405160405180910390a480546001600160a01b0319166001600160a01b0392909216919091179055565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d006001600160a01b0382166140fe576040517f256637fa0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610fab565b60018101546001600160a01b038084169116614118612407565b6001600160a01b03167fdaeb4cc3125e2ffb3c047d15e86dbcaac1e656b8d615dcbe28767cd8aac289ad60405160405180910390a460010180546001600160a01b0319166001600160a01b0392909216919091179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061420357507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c1857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610c18565b6000368160147f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000549091506001600160a01b0316331480156142955750808210155b156142c5576000366142a78385615977565b6142b2928290615c3d565b6142bb91615c67565b60601c9250505090565b339250505090565b610e5c83838360016145ca565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166117e6576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6143496142da565b6117e6614a27565b6117e66142da565b6143616142da565b610d108282614a2f565b6143736142da565b6117e6614a72565b604080516001600160a01b03808b16602083015291810189905290871660608201526080810186905260a0810185905260c081018490526000906144589060e0015b60408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250614aa592505050565b9998505050505050505050565b604080516001600160a01b03808b166020830152918101899052606081018890526080810187905290851660a082015260c081018490526000906144589060e0016143bd565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261143d908590614acf565b610d10828260405180602001604052806000815250614b4b565b614558838383614b62565b610e5c576001600160a01b03831661458657604051637e27328960e01b815260048101829052602401610fab565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260248101829052604401610fab565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930081806145ff57506001600160a01b03831615155b1561471857600061460f85612515565b90506001600160a01b0384161580159061463b5750836001600160a01b0316816001600160a01b031614155b801561468c57506001600160a01b0380821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209388168352929052205460ff16155b156146ce576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610fab565b82156147165784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b604080516001600160a01b0380891660208301529181018790529085166060820152608081018490526000906147f29060a0016143bd565b979650505050505050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316614869576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610fab565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b604080516001600160a01b03808916602083015291810187905290851660608201526080810184905260a080820152600660c08201527f72657665616c000000000000000000000000000000000000000000000000000060e08201526000906147f290610100016143bd565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061498e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106149ba576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106149d857662386f26fc10000830492506010015b6305f5e10083106149f0576305f5e100830492506008015b6127108310614a0457612710830492506004015b60648310614a16576064830492506002015b600a8310610c185760010192915050565b612f4e6142da565b614a376142da565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930080614a638482615ca7565b506001810161143d8382615ca7565b614a7a6142da565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff19169055565b600080600080614ab58686614c26565b925092509250614ac58282614c73565b5090949350505050565b6000614ae46001600160a01b03841683614d77565b90508051600014158015614b09575080806020019051810190614b0791906159b9565b155b15610e5c576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610fab565b614b558383612792565b610e5c60008484846130b5565b60006001600160a01b03831615801590614c1e5750826001600160a01b0316846001600160a01b03161480614bdb57506001600160a01b0380851660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209387168352929052205460ff165b80614c1e575060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b038481169116145b949350505050565b60008060008351604103614c605760208401516040850151606086015160001a614c5288828585614d85565b955095509550505050614c6c565b50508151600091506002905b9250925092565b6000826003811115614c8757614c8761511b565b03614c90575050565b6001826003811115614ca457614ca461511b565b03614cdb576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115614cef57614cef61511b565b03614d29576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610fab565b6003826003811115614d3d57614d3d61511b565b03610d10576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610fab565b6060611c5083836000614e54565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115614dc05750600091506003905082614e4a565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614e14573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614e4057506000925060019150829050614e4a565b9250600091508190505b9450945094915050565b606081471015614e92576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610fab565b600080856001600160a01b03168486604051614eae91906159d6565b60006040518083038185875af1925050503d8060008114614eeb576040519150601f19603f3d011682016040523d82523d6000602084013e614ef0565b606091505b5091509150611c4b868383606082614f1057614f0b82614f70565b611c50565b8151158015614f2757506001600160a01b0384163b155b15614f69576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610fab565b5080611c50565b805115614f805780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215614fc457600080fd5b5035919050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461107457600080fd5b60006020828403121561500b57600080fd5b8135611c5081614fcb565b6001600160a01b038116811461107457600080fd5b803561503681615016565b919050565b6000806040838503121561504e57600080fd5b823561505981615016565b946020939093013593505050565b80356bffffffffffffffffffffffff8116811461503657600080fd5b6000806040838503121561509657600080fd5b82356150a181615016565b91506150af60208401615067565b90509250929050565b60005b838110156150d35781810151838201526020016150bb565b50506000910152565b600081518084526150f48160208601602086016150b8565b601f01601f19169290920160200192915050565b602081526000611c5060208301846150dc565b634e487b7160e01b600052602160045260246000fd5b602081016005831061515357634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006040848603121561516e57600080fd5b83359250602084013567ffffffffffffffff81111561518c57600080fd5b8401601f8101861361519d57600080fd5b803567ffffffffffffffff8111156151b457600080fd5b8660208260061b84010111156151c957600080fd5b939660209190910195509293505050565b6000602082840312156151ec57600080fd5b8135611c5081615016565b60008083601f84011261520957600080fd5b50813567ffffffffffffffff81111561522157600080fd5b6020830191508360208285010111156117b057600080fd5b634e487b7160e01b600052604160045260246000fd5b60008067ffffffffffffffff84111561526a5761526a615239565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff8211171561529957615299615239565b6040528381529050808284018510156152b157600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126152da57600080fd5b611c508383356020850161524f565b6000806000806000806000806000806101208b8d03121561530957600080fd5b6153128b61502b565b995060208b013567ffffffffffffffff81111561532e57600080fd5b61533a8d828e016151f7565b909a5098505060408b013567ffffffffffffffff81111561535a57600080fd5b6153668d828e016152c9565b97505060608b013567ffffffffffffffff81111561538357600080fd5b61538f8d828e016152c9565b96505061539e60808c0161502b565b94506153ac60a08c0161502b565b93506153ba60c08c0161502b565b92506153c860e08c0161502b565b915060006101008c01359050809150509295989b9194979a5092959850565b6000806000606084860312156153fc57600080fd5b505081359360208301359350604090920135919050565b60008060008060006080868803121561542b57600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff81111561545757600080fd5b615463888289016151f7565b969995985093965092949392505050565b60008060006060848603121561548957600080fd5b833561549481615016565b925060208401356154a481615016565b929592945050506040919091013590565b60008060008060008060a087890312156154ce57600080fd5b86356154d981615016565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff81111561550a57600080fd5b61551689828a016151f7565b979a9699509497509295939492505050565b60008083601f84011261553a57600080fd5b50813567ffffffffffffffff81111561555257600080fd5b6020830191508360208260051b85010111156117b057600080fd5b6000806000806000806080878903121561558657600080fd5b863561559181615016565b955060208701356155a181615016565b9450604087013567ffffffffffffffff8111156155bd57600080fd5b6155c989828a01615528565b909550935050606087013567ffffffffffffffff81111561550a57600080fd5b600080604083850312156155fc57600080fd5b50508035926020909101359150565b6000806040838503121561561e57600080fd5b82359150602083013561563081615016565b809150509250929050565b6000806020838503121561564e57600080fd5b823567ffffffffffffffff81111561566557600080fd5b615671858286016151f7565b90969095509350505050565b60008060006060848603121561569257600080fd5b8335925060208401356156a481615016565b91506156b260408501615067565b90509250925092565b6000806000806000608086880312156156d357600080fd5b85356156de81615016565b94506020860135935060408601359250606086013567ffffffffffffffff81111561545757600080fd5b60008060006060848603121561571d57600080fd5b8335925060208401356154a481615016565b801515811461107457600080fd5b6000806040838503121561575057600080fd5b823561575b81615016565b915060208301356156308161572f565b6000806000806060858703121561578157600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156157a657600080fd5b6157b2878288016151f7565b95989497509550505050565b600080600080608085870312156157d457600080fd5b84356157df81615016565b935060208501356157ef81615016565b925060408501359150606085013567ffffffffffffffff81111561581257600080fd5b8501601f8101871361582357600080fd5b6158328782356020840161524f565b91505092959194509250565b6000806040838503121561585157600080fd5b823561585c81615016565b9150602083013561563081615016565b6000806000806060858703121561588257600080fd5b843561588d81615016565b9350602085013561589d81615016565b9250604085013567ffffffffffffffff8111156158b957600080fd5b6157b287828801615528565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806158ef57607f821691505b60208210810361590f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c1857610c18615915565b8082028115828204841417610c1857610c18615915565b60008261597257634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610c1857610c18615915565b6000835161599c8184602088016150b8565b8351908301906159b08183602088016150b8565b01949350505050565b6000602082840312156159cb57600080fd5b8151611c508161572f565b600082516159e88184602087016150b8565b9190910192915050565b8183823760009101908152919050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201526000615a3960808301846150dc565b9695505050505050565b600060208284031215615a5557600080fd5b8151611c5081614fcb565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b602081526000614c1e602083018486615a60565b604081526000808554615ab1816158db565b8060408601526001821660008114615ad05760018114615aec57615b20565b60ff1983166060870152606082151560051b8701019350615b20565b88600052602060002060005b83811015615b1757815488820160600152600190910190602001615af8565b87016060019450505b5050508281036020840152615a39818587615a60565b601f821115610e5c57806000526020600020601f840160051c81016020851015615b5d5750805b601f840160051c820191505b81811015611baa5760008155600101615b69565b67ffffffffffffffff831115615b9557615b95615239565b615ba983615ba383546158db565b83615b36565b6000601f841160018114615bdd5760008515615bc55750838201355b600019600387901b1c1916600186901b178355611baa565b600083815260209020601f19861690835b82811015615c0e5786850135825560209485019460019092019101615bee565b5086821015615c2b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008085851115615c4d57600080fd5b83861115615c5a57600080fd5b5050820193919092039150565b80356bffffffffffffffffffffffff198116906014841015615ca0576bffffffffffffffffffffffff19808560140360031b1b82161691505b5092915050565b815167ffffffffffffffff811115615cc157615cc1615239565b615cd581615ccf84546158db565b84615b36565b6020601f821160018114615d095760008315615cf15750848201515b600019600385901b1c1916600184901b178455611baa565b600084815260208120601f198516915b82811015615d395787850151825560209485019460019092019101615d19565b5084821015615d575786840151600019600387901b60f8161c191681555b50505050600190811b0190555056fea2646970667358221220c2a4c6181d81e781f105bc383b6c78eb4a3909c3cbf19c935014feea64cd1c8c64736f6c634300081a0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106104dd5760003560e01c8063715018a611610286578063a90fe8611161016b578063d547cfb7116100e3578063e985e9c511610097578063f0f442601161007c578063f0f4426014610bbd578063f2fde38b14610bd0578063f3993d1114610be357600080fd5b8063e985e9c514610b5a578063ee437dae14610bb557600080fd5b8063da742228116100c8578063da74222814610b0f578063e30c397814610b22578063e3e3506214610b2a57600080fd5b8063d547cfb714610ae0578063d5abeb0114610ae857600080fd5b8063b88d4fde1161013a578063c87b56dd1161011f578063c87b56dd14610aa6578063ca0df4a11461063a578063d266919914610ab957600080fd5b8063b88d4fde14610a8d578063c763e5a114610aa057600080fd5b8063a90fe86114610a2f578063ab01b46914610a42578063ac3149e314610a55578063b0ccc31e14610a8557600080fd5b80638da5cb5b116101fe57806397944ba2116101cd5780639d28fb86116101b25780639d28fb86146109f6578063a22cb46514610a09578063a6e3ec2614610a1c57600080fd5b806397944ba2146109af57806398603cca146109ee57600080fd5b80638da5cb5b1461090d5780638deeed421461091557806390c5c56d1461095d57806395d89b41146109a757600080fd5b806379ba50971161025557806382bc78771161023a57806382bc7877146108df5780638456cb59146108f25780638a616bc0146108fa57600080fd5b806379ba5097146108cf5780637da0a877146108d757600080fd5b8063715018a614610899578063731133e9146108a15780637581a8e6146108b457806378b6811f146108bc57600080fd5b80631c00ff5b116103c757806349c55c5e1161033f5780635944c753116102f35780636352211e116102d85780636352211e146108605780636f8b44b01461087357806370a082311461088657600080fd5b80635944c753146108235780635c975abb1461083657600080fd5b80635375e898116103245780635375e898146107ea57806355f804b3146107fd578063572b6c051461081057600080fd5b806349c55c5e146107c457806349c95a31146107d757600080fd5b80632a55205a116103965780633f4ba83a1161037b5780633f4ba83a1461079657806342842e0e1461079e57806342966c68146107b157600080fd5b80632a55205a146107515780633ee462c21461078357600080fd5b80631c00ff5b1461070557806323b872dd1461071857806326b3af641461072b57806328cfbd461461073e57600080fd5b806309b450971161045a57806315491c2111610429578063180b0d7e1161040e578063180b0d7e146106bb57806318160ddd146106cb5780631992c3f3146106f257600080fd5b806315491c2114610695578063179573d3146106a857600080fd5b806309b45097146105d85780630f0a3e6d1461062757806311db8d1b1461063a578063151370451461068257600080fd5b80630682bdbc116104b157806307ebec271161049657806307ebec2714610588578063081812fc146105b2578063095ea7b3146105c557600080fd5b80630682bdbc1461055357806306fdde031461057357600080fd5b80626cddce146104e257806301ffc9a714610508578063023ba7c31461052b57806304634d8d1461053e575b600080fd5b6104f56104f0366004614fb2565b610bf6565b6040519081526020015b60405180910390f35b61051b610516366004614ff9565b610c0d565b60405190151581526020016104ff565b6104f561053936600461503b565b610c1e565b61055161054c366004615083565b610c9e565b005b61055b610d14565b6040516001600160a01b0390911681526020016104ff565b61057b610d49565b6040516104ff9190615108565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594025460ff1661051b565b61055b6105c0366004614fb2565b610dff565b6105516105d336600461503b565b610e47565b61061a6105e6366004614fb2565b60009081527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357901602052604090205460ff1690565b6040516104ff9190615131565b610551610635366004615159565b610e61565b61055b610648366004614fb2565b60009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c5940060205260409020546001600160a01b031690565b6105516106903660046151da565b611063565b6105516106a33660046152e9565b611077565b6104f56106b6366004614fb2565b6111dd565b60405161271081526020016104ff565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d06546104f5565b6105516107003660046153e7565b6111f9565b610551610713366004615413565b61137b565b610551610726366004615474565b611400565b6105516107393660046154b5565b611443565b61055161074c36600461556d565b611579565b61076461075f3660046155e9565b6116b8565b604080516001600160a01b0390931683526020830191909152016104ff565b6104f5610791366004614fb2565b6117b7565b6105516117ce565b6105516107ac366004615474565b6117e8565b6105516107bf366004614fb2565b611803565b6105516107d2366004614fb2565b611814565b6104f56107e536600461560b565b6118aa565b6104f56107f8366004614fb2565b6118db565b61055161080b36600461563b565b6118ef565b61051b61081e3660046151da565b611934565b61055161083136600461567d565b61196c565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff1661051b565b61055b61086e366004614fb2565b6119e0565b610551610881366004614fb2565b6119eb565b6104f56108943660046151da565b6119fc565b610551611a83565b6105516108af3660046156bb565b611a95565b610551611bb1565b61051b6108ca366004615708565b611bc1565b610551611c57565b61055b611cc9565b6105516108ed3660046151da565b611cf2565b610551611d03565b610551610908366004614fb2565b611d1b565b61055b611d91565b6104f56109233660046151da565b6001600160a01b031660009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59401602052604090205490565b61051b61096b3660046151da565b6001600160a01b031660009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594016020526040902054151590565b61057b611dba565b6104f56109bd366004614fb2565b60009081527f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d05602052604090205490565b610551611e0b565b610551610a043660046151da565b611e1b565b610551610a1736600461573d565b611e2c565b610551610a2a3660046155e9565b611e41565b610551610a3d36600461576b565b611eab565b610551610a5036600461573d565b611f57565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d04546001600160a01b031661055b565b61055b611f69565b610551610a9b3660046157be565b611f92565b466104f5565b61057b610ab4366004614fb2565b611fcb565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03546104f5565b61057b612032565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00546104f5565b610551610b1d3660046151da565b612083565b61055b612094565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d01546001600160a01b031661055b565b61051b610b6836600461583e565b6001600160a01b0391821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793056020908152604080832093909416825291909152205460ff1690565b6105516120bd565b610551610bcb3660046151da565b61212b565b610551610bde3660046151da565b61213c565b610551610bf136600461586c565b6121c1565b600080610c02836122bc565b600101549392505050565b6000610c1882612344565b92915050565b6001600160a01b03821660009081527f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594016020526040812080547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59400919084908110610c8a57610c8a6158c5565b906000526020600020015491505092915050565b610ca661239a565b816001600160a01b0316610cb8612407565b6040516bffffffffffffffffffffffff841681526001600160a01b0391909116907f1266dd9a36c3109e9494da97febae6bb0a79426e9c9aaa8763387454373e1f529060200160405180910390a3610d108282612411565b5050565b6000807f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f3333579005b546001600160a01b031692915050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793008054606091908190610d7b906158db565b80601f0160208091040260200160405190810160405280929190818152602001828054610da7906158db565b8015610df45780601f10610dc957610100808354040283529160200191610df4565b820191906000526020600020905b815481529060010190602001808311610dd757829003601f168201915b505050505091505090565b6000610e0a82612515565b5060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b0316610c18565b81610e52308261256d565b610e5c83836126a9565b505050565b610e696126bb565b610e7161239a565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00816000819003610ece576040517f1949fde700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003820154600003610ef257604051622dc1c960e71b815260040160405180910390fd5b6000610efd866122bc565b905060005b8281101561105a5760068401546000878784818110610f2357610f236158c5565b610f3992602060409092020190810191506151da565b90506000888885818110610f4f57610f4f6158c5565b905060400201602001359050610f6787868484612717565b610fb4576040517f6a2a8faa0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602481018290526044015b60405180910390fd5b60005b81811015610fe557610fdd83610fcd838761592b565b610fd890600161592b565b612792565b600101610fb7565b506001600160a01b03821660009081526004860160205260408120805483929061101090849061592b565b925050819055508085600301600082825461102b919061592b565b9250508190555080876006016000828254611046919061592b565b909155505060019093019250610f02915050565b50505050505050565b61106b61239a565b61107481612810565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156110c25750825b905060008267ffffffffffffffff1660011480156110df5750303b155b9050811580156110ed575080155b15611124576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001178555831561116f57845468ff00000000000000001916680100000000000000001785555b6111818f8f8f8f8f8f8f8f8f8f6128e8565b83156111cc57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050505050565b6000806111e9836122bc565b600201549392505050565b905090565b61120161239a565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00805484118061122f575083155b80611238575082155b8061124257508383115b15611283576040517ff3cafbc20000000000000000000000000000000000000000000000000000000081526004810185905260248101849052604401610fab565b6003810154611290612407565b6040805187815260208101879052908101859052606081018390526001600160a01b0391909116907f21e1aa7f400a90a7e77ab0176b81222f0f927b289ef67fabcb30a56da2c506b19060800160405180910390a2600382018054600101808255600082905286919083908110611309576113096158c5565b90600052602060002090600502016000018190555083826003018281548110611334576113346158c5565b9060005260206000209060050201600101819055508282600301828154811061135f5761135f6158c5565b9060005260206000209060050201600201819055505050505050565b6113836126bb565b600061138d612407565b9050600061139a876119e0565b9050816001600160a01b0316816001600160a01b0316146113e8576040516364283d7b60e01b81526001600160a01b0380841660048301526024820189905282166044820152606401610fab565b6113f6828888888888612a6f565b61105a8787612b52565b82611409612407565b6001600160a01b0316816001600160a01b031614611432576114323061142d612407565b61256d565b61143d848484612c12565b50505050565b61144b6126bb565b611453612c9e565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03547f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00906000036114b657604051622dc1c960e71b815260040160405180910390fd5b60048101546001600160a01b03166114cc612407565b6001600160a01b031614611520576114e2612407565b6040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b61152e878787878787612d1f565b6000611539866122bc565b9050611546818989612df8565b505061157160017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050505050565b85611582612407565b6001600160a01b0316816001600160a01b0316146115a6576115a63061142d612407565b6001600160a01b0386166115d057604051633250574960e11b815260006004820152602401610fab565b60006115da612407565b90508460005b818110156116ac5760008888838181106115fc576115fc6158c5565b90506020020135905060006116128b8387612f74565b90508b6001600160a01b0316816001600160a01b031614611660576040516364283d7b60e01b81526001600160a01b03808e1660048301526024820184905282166044820152606401610fab565b6116a28c8c848b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506130b592505050565b50506001016115e0565b50505050505050505050565b60008281527fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b01602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282917fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00919061177857506040805180820190915281546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b60208101516000906127109061179c906bffffffffffffffffffffffff168861593e565b6117a69190615955565b9151945090925050505b9250929050565b6000806117c3836122bc565b600301549392505050565b6117d661239a565b6117de61320f565b6117e661326a565b565b610e5c83838360405180602001604052806000815250611f92565b61180b6126bb565b611074816132e2565b61181c61239a565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03547f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0090821061187e57604051622dc1c960e71b815260040160405180910390fd5b6000816003018381548110611895576118956158c5565b60009182526020909120600590910201555050565b6000806118b6846122bc565b6001600160a01b03841660009081526004909101602052604090205491505092915050565b6000806118e7836122bc565b549392505050565b6118f761239a565b61190182826133f7565b604051600019906000907f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c908290a35050565b7f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000546000906001600160a01b03808416911614610c18565b61197461239a565b816001600160a01b031683611987612407565b6040516bffffffffffffffffffffffff851681526001600160a01b0391909116907f80398053543636fe8ebda0b83661b13671543aa7c4ff209b9989e22df937c93f9060200160405180910390a4610e5c8383836134b5565b6000610c1882612515565b6119f361239a565b611074816135db565b60007f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316611a62576040517f89c62b6400000000000000000000000000000000000000000000000000000000815260006004820152602401610fab565b6001600160a01b039092166000908152600390920160205250604090205490565b611a8b61239a565b6117e660006136ef565b611a9d6126bb565b611aa5612c9e565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03547f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00906000819003611b0a57604051622dc1c960e71b815260040160405180910390fd5b60048201546001600160a01b0316611b20612407565b6001600160a01b031614611b36576114e2612407565b611b4287868686613727565b600060038301611b53600184615977565b81548110611b6357611b636158c5565b90600052602060002090600502019050611b7e818989612df8565b505050611baa60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b5050505050565b611bb961239a565b6117e6613801565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03546000907f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00908510611c18576000915050611c50565b6000816003018681548110611c2f57611c2f6158c5565b90600052602060002090600502019050611c4b82828787612717565b925050505b9392505050565b6000611c61612407565b9050806001600160a01b0316611c75612094565b6001600160a01b031614611cc0576040517f118cdaa70000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602401610fab565b611074816136ef565b6000807f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000610d39565b611cfa61239a565b611074816138ce565b611d0b61239a565b611d136126bb565b6117e66139ad565b611d2361239a565b80611d2c612407565b6001600160a01b03167fdf2990aaa44e731e41ae9d23d42384a4b75061aa55d335606115b3deb765944c60405160405180910390a360009081527fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b016020526040812055565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300610d39565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930180546060917f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930091610d7b906158db565b611e1361239a565b6117e6613a0a565b611e2361239a565b61107481613ad3565b81611e37308261256d565b610e5c8383613b60565b611e4961239a565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260409020546001600160a01b031680611ea157604051637e27328960e01b815260048101849052602401610fab565b610e5c8383612b52565b611eb36126bb565b6000611ebd612407565b90506000611eca866119e0565b9050816001600160a01b0316816001600160a01b031614611f18576040516364283d7b60e01b81526001600160a01b0380841660048301526024820188905282166044820152606401610fab565b611f2482868686613b72565b60405186907ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce790600090a2505050505050565b611f5f61239a565b610d108282613c49565b6000807f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e800610d39565b83611f9b612407565b6001600160a01b0316816001600160a01b031614611fbf57611fbf3061142d612407565b611baa85858585613f4e565b6060611fd682612515565b506000611fe1612032565b905060008151116120015760405180602001604052806000815250611c50565b8061200b84613f65565b60405160200161201c92919061598a565b6040516020818303038152906040529392505050565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0280546060917f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0091610d7b906158db565b61208b61239a565b61107481614005565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610d39565b6120c561239a565b6120cd612407565b6001600160a01b03167f2dfe49916b7d76a5f1ebe1ab9a2618777c34ea6e0ba6c52d9369929a43a4a6de60405160405180910390a26117e660007fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b0055565b61213361239a565b61107481614092565b61214461239a565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b0383169081178255612188611d91565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b836121ca612407565b6001600160a01b0316816001600160a01b0316146121ee576121ee3061142d612407565b6001600160a01b03841661221857604051633250574960e11b815260006004820152602401610fab565b6000612222612407565b90508260005b818110156122b2576000868683818110612244576122446158c5565b905060200201359050600061225a898387612f74565b9050896001600160a01b0316816001600160a01b0316146122a8576040516364283d7b60e01b81526001600160a01b03808c1660048301526024820184905282166044820152606401610fab565b5050600101612228565b5050505050505050565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d03546000907f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d009080841061231857612315600182615977565b93505b81600301848154811061232d5761232d6158c5565b906000526020600020906005020192505050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610c185750610c1882614170565b6123a2612407565b6001600160a01b03166123b3611d91565b6001600160a01b0316146117e6576123c9612407565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b60006111f4614253565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106bffffffffffffffffffffffff8316811015612494576040517f6f483d090000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff8416600482015260248101829052604401610fab565b6001600160a01b0384166124d7576040517fb6d9900a00000000000000000000000000000000000000000000000000000000815260006004820152602401610fab565b50604080518082019091526001600160a01b039093168084526bffffffffffffffffffffffff9092166020909301839052600160a01b909202179055565b60008181527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120546001600160a01b031680610c1857604051637e27328960e01b815260048101849052602401610fab565b7f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e80080546001600160a01b0316803b1561143d576040517fc61711340000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152848116602483015282169063c617113490604401602060405180830381865afa925050508015612623575060408051601f3d908101601f19168201909252612620918101906159b9565b60015b61265d573d808015612651576040519150601f19603f3d011682016040523d82523d6000602084013e612656565b606091505b505061266c565b801561266a575050505050565b505b6040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610fab565b610d1082826126b6612407565b6142cd565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16156117e6576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808211801561273857508354600385015461273590849061592b565b11155b801561276d575060018401546001600160a01b038416600090815260048601602052604090205461276a90849061592b565b11155b801561278957508454600686015461278690849061592b565b11155b95945050505050565b6001600160a01b0382166127bc57604051633250574960e11b815260006004820152602401610fab565b60006127ca83836000612f74565b90506001600160a01b03811615610e5c576040517f73c6ac6e00000000000000000000000000000000000000000000000000000000815260006004820152602401610fab565b7f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f3333579006001600160a01b03821661287c576040517fa6ff6cd10000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610fab565b80546001600160a01b038084169116612893612407565b6001600160a01b03167f827b059b420f2ae50bebd7002ab386062a31770f2e54269507162880bfb793b960405160405180910390a480546001600160a01b0319166001600160a01b0392909216919091179055565b6128f06142da565b865160000361292d57866040517f7f19f48d000000000000000000000000000000000000000000000000000000008152600401610fab9190615108565b855160000361296a57856040517fbc7e3f55000000000000000000000000000000000000000000000000000000008152600401610fab9190615108565b612972614341565b61297b8a6136ef565b612983614351565b61298c83614005565b6129968787614359565b61299e61436b565b6129a889896133f7565b6129b185614092565b6129ba84612810565b6129c3826138ce565b6129cc816135db565b856040516129da91906159d6565b6040518091039020876040516129f091906159d6565b60405180910390208a8a604051612a089291906159f2565b604080519182900382206001600160a01b038a81168452898116602085015287168383015260608301869052905190917fa00c490c2b21130e4143953352dedc9f2b226d5ce1c5ef7e2b20796cbe7c090a919081900360800190a450505050505050505050565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff166004811115612ad457612ad461511b565b141580612b03575080546001600160a01b0316612af7888630468b8b8a8a61437b565b6001600160a01b031614155b15612b2457604051630a57f30960e31b815260048101859052602401610fab565b600084815260018083016020526040909120805460029260ff1990911690835b021790555050505050505050565b60008281527f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d05602052604090208190557f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d008183612bad612407565b6001600160a01b03167f8f5bc4e4444be2e737fe62ea6160f37981fd2ecfcda061928373d882eceaf3fa60405160405180910390a460405183907ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce790600090a2505050565b6001600160a01b038216612c3c57604051633250574960e11b815260006004820152602401610fab565b6000612c508383612c4b612407565b612f74565b9050836001600160a01b0316816001600160a01b03161461143d576040516364283d7b60e01b81526001600160a01b0380861660048301526024820184905282166044820152606401610fab565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0080547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01612d19576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60029055565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff166004811115612d8457612d8461511b565b141580612db3575080546001600160a01b0316612da78888888830468a8a614465565b6001600160a01b031614155b15612dd457604051630a57f30960e31b815260048101859052602401610fab565b600084815260018083016020526040909120805460049260ff199091169083612b44565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00612e2581858585612717565b612e6d576040517f6a2a8faa0000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101839052604401610fab565b6000828560020154612e7f919061593e565b90508015612eaa5760048201546001830154612eaa916001600160a01b0390811691879116846144ab565b600682015460005b84811015612ee057612ed886612ec8838561592b565b612ed390600161592b565b614533565b600101612eb2565b506001600160a01b038516600090815260048701602052604081208054869290612f0b90849061592b565b9250508190555083866003016000828254612f26919061592b565b9250508190555083836006016000828254612f41919061592b565b9091555050505050505050565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930260205260408120547f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300906001600160a01b0390811690841615612fe257612fe281858761454d565b6001600160a01b0381161561302257612fff6000866000806145ca565b6001600160a01b0381166000908152600383016020526040902080546000190190555b6001600160a01b03861615613053576001600160a01b03861660009081526003830160205260409020805460010190555b600085815260028301602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a495945050505050565b6001600160a01b0383163b1561143d57826001600160a01b031663150b7a026130dc612407565b8685856040518563ffffffff1660e01b81526004016130fe9493929190615a02565b6020604051808303816000875af1925050508015613139575060408051601f3d908101601f1916820190925261313691810190615a43565b60015b6131a2573d808015613167576040519150601f19603f3d011682016040523d82523d6000602084013e61316c565b606091505b50805160000361319a57604051633250574960e11b81526001600160a01b0385166004820152602401610fab565b805181602001fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167f150b7a020000000000000000000000000000000000000000000000000000000014611baa57604051633250574960e11b81526001600160a01b0385166004820152602401610fab565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff166117e6576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61327261320f565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6132c4612407565b6040516001600160a01b03909116815260200160405180910390a150565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59402547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594009060ff1661335f576040517ffddf3c2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613369612407565b9050600061337960008584612f74565b60008581526020858152604080832080546001600160a01b0319166001600160a01b038881169182179092558085526001808a018552838620805491820181558652938520909301899055905193945084169287927f0fb81ee2634a482264d8193cc9e1703d814cb3f5a1e239dc2580496bf571df7791a450505050565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0060008290036134575782826040517fa4fe57f4000000000000000000000000000000000000000000000000000000008152600401610fab929190615a8b565b61345f612407565b6001600160a01b03167f0589f6de204c3ac121129f5111ee5b702672a7e80758887b289d4b23a17b743a82600201858560405161349e93929190615a9f565b60405180910390a26002810161143d838583615b7d565b7fdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b006127106bffffffffffffffffffffffff831681101561353f576040517fdfd1fc1b000000000000000000000000000000000000000000000000000000008152600481018690526bffffffffffffffffffffffff8416602482015260448101829052606401610fab565b6001600160a01b038416613589576040517f969f08520000000000000000000000000000000000000000000000000000000081526004810186905260006024820152604401610fab565b506040805180820182526001600160a01b0394851681526bffffffffffffffffffffffff938416602080830191825260009788526001909401909352942093519051909116600160a01b029116179055565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d0060008290036136475760068101546040517f7c26552b000000000000000000000000000000000000000000000000000000008152600060048201526024810191909152604401610fab565b80600601548210156136955760068101546040517f7c26552b000000000000000000000000000000000000000000000000000000008152610fab918491600401918252602082015260400190565b61369d612407565b6001600160a01b03167fccc3b7560f9d81f26c619129ba9fa74ded9a6edb555a04655baaeca673e0a8098260000154846040516136e4929190918252602082015260400190565b60405180910390a255565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610d1082614749565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff16600481111561378c5761378c61511b565b1415806137b9575080546001600160a01b03166137ad8686304688886147ba565b6001600160a01b031614155b156137da57604051630a57f30960e31b815260048101859052602401610fab565b600084815260018281016020526040909120805460ff191682805b02179055505050505050565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59402547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594009060ff161561387f576040517f4c3bf9a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028101805460ff19166001179055613896612407565b6001600160a01b03167f87c17d0e9338ee3c159be69a99891df1590dd083a3777b03bfdb241d41e9d30460405160405180910390a250565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d006001600160a01b0382163b61393b576040517fe5f21c110000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610fab565b60048101546001600160a01b038084169116613955612407565b6001600160a01b03167f5d3eb288d70f5778687463132ce6b9fbf9196273269c75cf04deec982da5b6ef60405160405180910390a460040180546001600160a01b0319166001600160a01b0392909216919091179055565b6139b56126bb565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff191660011781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586132c4612407565b7f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59402547f6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c594009060ff16613a87576040517ffddf3c2c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028101805460ff19169055613a9b612407565b6001600160a01b03167fc1258e2781f6fca80c30c40200f57fd8171a2737a63ef1375dea6fae520ede6060405160405180910390a250565b7f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e80080546001600160a01b038381169116613b0b612407565b6001600160a01b03167f843ddfc5ccee52d319111d9be8a67a9f91517b207a5242a2faa1cbb10b621fee60405160405180910390a480546001600160a01b0319166001600160a01b0392909216919091179055565b610d10613b6b612407565b83836147fd565b60008381527f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f33335790160205260408120547f40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900919060ff166004811115613bd757613bd761511b565b141580613c04575080546001600160a01b0316613bf88686304688886148d9565b6001600160a01b031614155b15613c2557604051630a57f30960e31b815260048101859052602401610fab565b600084815260018083016020526040909120805460039260ff1990911690836137f5565b7f71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e80080546001600160a01b0316803b151580613cc457613c86612407565b6040517ff5d522670000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b6040517fc3c5a5470000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383169063c3c5a547906024016020604051808303816000875af1158015613d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d4791906159b9565b15613d9257613d54612407565b6040517f45ed80e90000000000000000000000000000000000000000000000000000000081526001600160a01b039091166004820152602401610fab565b8315613e18576040517f7d3e3dbe0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038681166024830152831690637d3e3dbe906044015b600060405180830381600087803b158015613dfb57600080fd5b505af1158015613e0f573d6000803e3d6000fd5b50505050613ee7565b6001600160a01b03851615613e74576040517fa0af29030000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03868116602483015283169063a0af290390604401613de1565b6040517f4420e4860000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831690634420e48690602401600060405180830381600087803b158015613ece57600080fd5b505af1158015613ee2573d6000803e3d6000fd5b505050505b846001600160a01b0316826001600160a01b0316613f03612407565b6001600160a01b03167f3ff6751845562342150f01f256e77e1a7f0a5c3e49cd1307c5f142062fb2f10587604051613f3f911515815260200190565b60405180910390a45050505050565b613f59848484611400565b61143d848484846130b5565b60606000613f7283614945565b600101905060008167ffffffffffffffff811115613f9257613f92615239565b6040519080825280601f01601f191660200182016040528015613fbc576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084613fc657509392505050565b7f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa700080546001600160a01b03838116911661403d612407565b6001600160a01b03167f8ca022029d8ff7ad974913f8970aeed6c5e0e7eaf494a0c5b262249f6b5759e560405160405180910390a480546001600160a01b0319166001600160a01b0392909216919091179055565b7f54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d006001600160a01b0382166140fe576040517f256637fa0000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610fab565b60018101546001600160a01b038084169116614118612407565b6001600160a01b03167fdaeb4cc3125e2ffb3c047d15e86dbcaac1e656b8d615dcbe28767cd8aac289ad60405160405180910390a460010180546001600160a01b0319166001600160a01b0392909216919091179055565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061420357507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c1857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610c18565b6000368160147f269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000549091506001600160a01b0316331480156142955750808210155b156142c5576000366142a78385615977565b6142b2928290615c3d565b6142bb91615c67565b60601c9250505090565b339250505090565b610e5c83838360016145ca565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff166117e6576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6143496142da565b6117e6614a27565b6117e66142da565b6143616142da565b610d108282614a2f565b6143736142da565b6117e6614a72565b604080516001600160a01b03808b16602083015291810189905290871660608201526080810186905260a0810185905260c081018490526000906144589060e0015b60408051601f198184030181529082905280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000091830191909152603c820152605c016040516020818303038152906040528051906020012084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250614aa592505050565b9998505050505050505050565b604080516001600160a01b03808b166020830152918101899052606081018890526080810187905290851660a082015260c081018490526000906144589060e0016143bd565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261143d908590614acf565b610d10828260405180602001604052806000815250614b4b565b614558838383614b62565b610e5c576001600160a01b03831661458657604051637e27328960e01b815260048101829052602401610fab565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260248101829052604401610fab565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930081806145ff57506001600160a01b03831615155b1561471857600061460f85612515565b90506001600160a01b0384161580159061463b5750836001600160a01b0316816001600160a01b031614155b801561468c57506001600160a01b0380821660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209388168352929052205460ff16155b156146ce576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610fab565b82156147165784866001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b600093845260040160205250506040902080546001600160a01b0319166001600160a01b0392909216919091179055565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b604080516001600160a01b0380891660208301529181018790529085166060820152608081018490526000906147f29060a0016143bd565b979650505050505050565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab00793006001600160a01b038316614869576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610fab565b6001600160a01b038481166000818152600584016020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a350505050565b604080516001600160a01b03808916602083015291810187905290851660608201526080810184905260a080820152600660c08201527f72657665616c000000000000000000000000000000000000000000000000000060e08201526000906147f290610100016143bd565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061498e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106149ba576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106149d857662386f26fc10000830492506010015b6305f5e10083106149f0576305f5e100830492506008015b6127108310614a0457612710830492506004015b60648310614a16576064830492506002015b600a8310610c185760010192915050565b612f4e6142da565b614a376142da565b7f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930080614a638482615ca7565b506001810161143d8382615ca7565b614a7a6142da565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300805460ff19169055565b600080600080614ab58686614c26565b925092509250614ac58282614c73565b5090949350505050565b6000614ae46001600160a01b03841683614d77565b90508051600014158015614b09575080806020019051810190614b0791906159b9565b155b15610e5c576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610fab565b614b558383612792565b610e5c60008484846130b5565b60006001600160a01b03831615801590614c1e5750826001600160a01b0316846001600160a01b03161480614bdb57506001600160a01b0380851660009081527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079305602090815260408083209387168352929052205460ff165b80614c1e575060008281527f80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab007930460205260409020546001600160a01b038481169116145b949350505050565b60008060008351604103614c605760208401516040850151606086015160001a614c5288828585614d85565b955095509550505050614c6c565b50508151600091506002905b9250925092565b6000826003811115614c8757614c8761511b565b03614c90575050565b6001826003811115614ca457614ca461511b565b03614cdb576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115614cef57614cef61511b565b03614d29576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610fab565b6003826003811115614d3d57614d3d61511b565b03610d10576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610fab565b6060611c5083836000614e54565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115614dc05750600091506003905082614e4a565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015614e14573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614e4057506000925060019150829050614e4a565b9250600091508190505b9450945094915050565b606081471015614e92576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610fab565b600080856001600160a01b03168486604051614eae91906159d6565b60006040518083038185875af1925050503d8060008114614eeb576040519150601f19603f3d011682016040523d82523d6000602084013e614ef0565b606091505b5091509150611c4b868383606082614f1057614f0b82614f70565b611c50565b8151158015614f2757506001600160a01b0384163b155b15614f69576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610fab565b5080611c50565b805115614f805780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215614fc457600080fd5b5035919050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461107457600080fd5b60006020828403121561500b57600080fd5b8135611c5081614fcb565b6001600160a01b038116811461107457600080fd5b803561503681615016565b919050565b6000806040838503121561504e57600080fd5b823561505981615016565b946020939093013593505050565b80356bffffffffffffffffffffffff8116811461503657600080fd5b6000806040838503121561509657600080fd5b82356150a181615016565b91506150af60208401615067565b90509250929050565b60005b838110156150d35781810151838201526020016150bb565b50506000910152565b600081518084526150f48160208601602086016150b8565b601f01601f19169290920160200192915050565b602081526000611c5060208301846150dc565b634e487b7160e01b600052602160045260246000fd5b602081016005831061515357634e487b7160e01b600052602160045260246000fd5b91905290565b60008060006040848603121561516e57600080fd5b83359250602084013567ffffffffffffffff81111561518c57600080fd5b8401601f8101861361519d57600080fd5b803567ffffffffffffffff8111156151b457600080fd5b8660208260061b84010111156151c957600080fd5b939660209190910195509293505050565b6000602082840312156151ec57600080fd5b8135611c5081615016565b60008083601f84011261520957600080fd5b50813567ffffffffffffffff81111561522157600080fd5b6020830191508360208285010111156117b057600080fd5b634e487b7160e01b600052604160045260246000fd5b60008067ffffffffffffffff84111561526a5761526a615239565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff8211171561529957615299615239565b6040528381529050808284018510156152b157600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126152da57600080fd5b611c508383356020850161524f565b6000806000806000806000806000806101208b8d03121561530957600080fd5b6153128b61502b565b995060208b013567ffffffffffffffff81111561532e57600080fd5b61533a8d828e016151f7565b909a5098505060408b013567ffffffffffffffff81111561535a57600080fd5b6153668d828e016152c9565b97505060608b013567ffffffffffffffff81111561538357600080fd5b61538f8d828e016152c9565b96505061539e60808c0161502b565b94506153ac60a08c0161502b565b93506153ba60c08c0161502b565b92506153c860e08c0161502b565b915060006101008c01359050809150509295989b9194979a5092959850565b6000806000606084860312156153fc57600080fd5b505081359360208301359350604090920135919050565b60008060008060006080868803121561542b57600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff81111561545757600080fd5b615463888289016151f7565b969995985093965092949392505050565b60008060006060848603121561548957600080fd5b833561549481615016565b925060208401356154a481615016565b929592945050506040919091013590565b60008060008060008060a087890312156154ce57600080fd5b86356154d981615016565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff81111561550a57600080fd5b61551689828a016151f7565b979a9699509497509295939492505050565b60008083601f84011261553a57600080fd5b50813567ffffffffffffffff81111561555257600080fd5b6020830191508360208260051b85010111156117b057600080fd5b6000806000806000806080878903121561558657600080fd5b863561559181615016565b955060208701356155a181615016565b9450604087013567ffffffffffffffff8111156155bd57600080fd5b6155c989828a01615528565b909550935050606087013567ffffffffffffffff81111561550a57600080fd5b600080604083850312156155fc57600080fd5b50508035926020909101359150565b6000806040838503121561561e57600080fd5b82359150602083013561563081615016565b809150509250929050565b6000806020838503121561564e57600080fd5b823567ffffffffffffffff81111561566557600080fd5b615671858286016151f7565b90969095509350505050565b60008060006060848603121561569257600080fd5b8335925060208401356156a481615016565b91506156b260408501615067565b90509250925092565b6000806000806000608086880312156156d357600080fd5b85356156de81615016565b94506020860135935060408601359250606086013567ffffffffffffffff81111561545757600080fd5b60008060006060848603121561571d57600080fd5b8335925060208401356154a481615016565b801515811461107457600080fd5b6000806040838503121561575057600080fd5b823561575b81615016565b915060208301356156308161572f565b6000806000806060858703121561578157600080fd5b8435935060208501359250604085013567ffffffffffffffff8111156157a657600080fd5b6157b2878288016151f7565b95989497509550505050565b600080600080608085870312156157d457600080fd5b84356157df81615016565b935060208501356157ef81615016565b925060408501359150606085013567ffffffffffffffff81111561581257600080fd5b8501601f8101871361582357600080fd5b6158328782356020840161524f565b91505092959194509250565b6000806040838503121561585157600080fd5b823561585c81615016565b9150602083013561563081615016565b6000806000806060858703121561588257600080fd5b843561588d81615016565b9350602085013561589d81615016565b9250604085013567ffffffffffffffff8111156158b957600080fd5b6157b287828801615528565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806158ef57607f821691505b60208210810361590f57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c1857610c18615915565b8082028115828204841417610c1857610c18615915565b60008261597257634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610c1857610c18615915565b6000835161599c8184602088016150b8565b8351908301906159b08183602088016150b8565b01949350505050565b6000602082840312156159cb57600080fd5b8151611c508161572f565b600082516159e88184602087016150b8565b9190910192915050565b8183823760009101908152919050565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201526000615a3960808301846150dc565b9695505050505050565b600060208284031215615a5557600080fd5b8151611c5081614fcb565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b602081526000614c1e602083018486615a60565b604081526000808554615ab1816158db565b8060408601526001821660008114615ad05760018114615aec57615b20565b60ff1983166060870152606082151560051b8701019350615b20565b88600052602060002060005b83811015615b1757815488820160600152600190910190602001615af8565b87016060019450505b5050508281036020840152615a39818587615a60565b601f821115610e5c57806000526020600020601f840160051c81016020851015615b5d5750805b601f840160051c820191505b81811015611baa5760008155600101615b69565b67ffffffffffffffff831115615b9557615b95615239565b615ba983615ba383546158db565b83615b36565b6000601f841160018114615bdd5760008515615bc55750838201355b600019600387901b1c1916600186901b178355611baa565b600083815260209020601f19861690835b82811015615c0e5786850135825560209485019460019092019101615bee565b5086821015615c2b5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008085851115615c4d57600080fd5b83861115615c5a57600080fd5b5050820193919092039150565b80356bffffffffffffffffffffffff198116906014841015615ca0576bffffffffffffffffffffffff19808560140360031b1b82161691505b5092915050565b815167ffffffffffffffff811115615cc157615cc1615239565b615cd581615ccf84546158db565b84615b36565b6020601f821160018114615d095760008315615cf15750848201515b600019600385901b1c1916600184901b178455611baa565b600084815260208120601f198516915b82811015615d395787850151825560209485019460019092019101615d19565b5084821015615d575786840151600019600387901b60f8161c191681555b50505050600190811b0190555056fea2646970667358221220c2a4c6181d81e781f105bc383b6c78eb4a3909c3cbf19c935014feea64cd1c8c64736f6c634300081a0033", + "devdoc": { + "author": "The Sandbox", + "custom:security-contact": "contact-blockchain@sandbox.game", + "details": "Some features: - upgradable - ownable (2 step transfer) - OpenSea royalty compliant - ERC2981 compliant - ERC4906 compliant - ERC165 compliant - supports ERC2771 for services like Biconomy - supports \"burn memory\" - keeping track of who burned what token for faster in-game gating checks - minting is supported via an ERC20 token contract that supports approveAndCall as mint price is in non-native tokens - custom batch operations for minting and transfer", + "errors": { + "AddressEmptyCode(address)": [ + { + "details": "There's no code at `target` (it is not a contract)." + } + ], + "AddressInsufficientBalance(address)": [ + { + "details": "The ETH balance of the account is not enough to perform the operation." + } + ], + "AlreadyRegistered(address)": [ + { + "params": { + "operator": "that does the call" + } + } + ], + "CannotMint(address,uint256)": [ + { + "params": { + "amount": "amount to be checked if can be minted", + "wallet": "wallet to be checked if it can mint" + } + } + ], + "ECDSAInvalidSignature()": [ + { + "details": "The signature derives the `address(0)`." + } + ], + "ECDSAInvalidSignatureLength(uint256)": [ + { + "details": "The signature has an invalid length." + } + ], + "ECDSAInvalidSignatureS(bytes32)": [ + { + "details": "The signature has an S value that is in the upper half order." + } + ], + "ERC2981InvalidDefaultRoyalty(uint256,uint256)": [ + { + "details": "The default royalty set is invalid (eg. (numerator / denominator) >= 1)." + } + ], + "ERC2981InvalidDefaultRoyaltyReceiver(address)": [ + { + "details": "The default royalty receiver is invalid." + } + ], + "ERC2981InvalidTokenRoyalty(uint256,uint256,uint256)": [ + { + "details": "The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1)." + } + ], + "ERC2981InvalidTokenRoyaltyReceiver(uint256,address)": [ + { + "details": "The royalty receiver for `tokenId` is invalid." + } + ], + "ERC721IncorrectOwner(address,uint256,address)": [ + { + "details": "Indicates an error related to the ownership over a particular token. Used in transfers.", + "params": { + "owner": "Address of the current owner of a token.", + "sender": "Address whose tokens are being transferred.", + "tokenId": "Identifier number of a token." + } + } + ], + "ERC721InsufficientApproval(address,uint256)": [ + { + "details": "Indicates a failure with the `operator`’s approval. Used in transfers.", + "params": { + "operator": "Address that may be allowed to operate on tokens without being their owner.", + "tokenId": "Identifier number of a token." + } + } + ], + "ERC721InvalidApprover(address)": [ + { + "details": "Indicates a failure with the `approver` of a token to be approved. Used in approvals.", + "params": { + "approver": "Address initiating an approval operation." + } + } + ], + "ERC721InvalidOperator(address)": [ + { + "details": "Indicates a failure with the `operator` to be approved. Used in approvals.", + "params": { + "operator": "Address that may be allowed to operate on tokens without being their owner." + } + } + ], + "ERC721InvalidOwner(address)": [ + { + "details": "Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. Used in balance queries.", + "params": { + "owner": "Address of the current owner of a token." + } + } + ], + "ERC721InvalidReceiver(address)": [ + { + "details": "Indicates a failure with the token `receiver`. Used in transfers.", + "params": { + "receiver": "Address to which tokens are being transferred." + } + } + ], + "ERC721InvalidSender(address)": [ + { + "details": "Indicates a failure with the token `sender`. Used in transfers.", + "params": { + "sender": "Address whose tokens are being transferred." + } + } + ], + "ERC721NonexistentToken(uint256)": [ + { + "details": "Indicates a `tokenId` whose `owner` is the zero address.", + "params": { + "tokenId": "Identifier number of a token." + } + } + ], + "EnforcedPause()": [ + { + "details": "The operation failed because the contract is paused." + } + ], + "ExpectedPause()": [ + { + "details": "The operation failed because the contract is not paused." + } + ], + "FailedInnerCall()": [ + { + "details": "A call to an address target failed. The target may have reverted." + } + ], + "InvalidAllowedToExecuteMint(address)": [ + { + "params": { + "allowedToExecuteMint": "token address that is used for payments and that is allowed to execute mint" + } + } + ], + "InvalidBaseTokenURI(string)": [ + { + "params": { + "baseURI": "an URI that will be used as the base for token URI" + } + } + ], + "InvalidInitialization()": [ + { + "details": "The contract is already initialized." + } + ], + "InvalidName(string)": [ + { + "params": { + "name": "name of the ERC721 token" + } + } + ], + "InvalidSignAddress(address)": [ + { + "params": { + "signAddress": "signer address that is allowed to create mint signatures" + } + } + ], + "InvalidSignature(uint256)": [ + { + "params": { + "signatureId": "the ID of the provided signature" + } + } + ], + "InvalidSymbol(string)": [ + { + "params": { + "symbol": "token symbol of the ERC721 token" + } + } + ], + "InvalidTreasury(address)": [ + { + "params": { + "mintTreasury": "collection treasury address (where the payments are sent)" + } + } + ], + "InvalidWaveData(uint256,uint256)": [ + { + "params": { + "waveMaxTokensOverall": "the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)", + "waveMaxTokensPerWallet": "max tokens to buy, per wallet in a given wave" + } + } + ], + "LowMaxSupply(uint256,uint256)": [ + { + "params": { + "maxSupply": "max supply of tokens to be allowed to be minted per contract", + "totalSupply": "amount of tokens minted till now" + } + } + ], + "NotInitializing()": [ + { + "details": "The contract is not initializing." + } + ], + "OperatorNotAllowed(address)": [ + { + "params": { + "operator": "that does the call" + } + } + ], + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ], + "ReentrancyGuardReentrantCall()": [ + { + "details": "Unauthorized reentrant call." + } + ], + "RegistryNotSet(address)": [ + { + "params": { + "operator": "that does the call" + } + } + ], + "SafeERC20FailedOperation(address)": [ + { + "details": "An operation with an ERC20 token failed." + } + ] + }, + "events": { + "AllowedExecuteMintSet(address,address,address)": { + "details": "emitted when setAllowedExecuteMint is called", + "params": { + "newToken": "new address that is used for payments and that is allowed to execute mint", + "oldToken": "old address that is used for payments and that is allowed to execute mint", + "operator": "the sender of the transaction" + } + }, + "Approval(address,address,uint256)": { + "details": "Emitted when `owner` enables `approved` to manage the `tokenId` token." + }, + "ApprovalForAll(address,address,bool)": { + "details": "Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets." + }, + "BaseURISet(address,string,string)": { + "details": "emitted when setBaseURI is called", + "params": { + "newBaseURI": "new URI that will be used as the base for token metadata URI", + "oldBaseURI": "old URI that will be used as the base for token metadata URI", + "operator": "the sender of the transaction" + } + }, + "BatchMetadataUpdate(uint256,uint256)": { + "details": "This event emits when the metadata of a range of tokens is changed. So that the third-party platforms such as NFT market could timely update the images and related attributes of the NFTs." + }, + "ContractInitialized(string,string,string,address,address,address,uint256)": { + "details": "emitted at proxy startup, only once", + "params": { + "allowedToExecuteMint": "token address that is used for payments and that is allowed to execute mint", + "baseURI": "an URI that will be used as the base for token URI", + "maxSupply": "max supply of tokens to be allowed to be minted per contract", + "mintTreasury": "collection treasury address (where the payments are sent)", + "name": "name of the ERC721 token", + "signAddress": "signer address that is allowed to create mint signatures", + "symbol": "token symbol of the ERC721 token" + } + }, + "ContractRegistered(address,address,address,bool)": { + "params": { + "operator": "the sender of the transaction", + "registry": "address of the registry to set", + "subscribe": "should it subscribe", + "subscriptionOrRegistrant": "address to subscribe or copy entries from" + } + }, + "DefaultRoyaltyReset(address)": { + "params": { + "operator": "the sender of the transaction" + } + }, + "DefaultRoyaltySet(address,address,uint96)": { + "params": { + "feeNumerator": "percentage of the royalties in feeDenominator units", + "operator": "the sender of the transaction", + "receiver": "the receiver of the royalties" + } + }, + "Initialized(uint64)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "MaxSupplySet(address,uint256,uint256)": { + "details": "emitted when setSignAddress is called", + "params": { + "newMaxSupply": "new maximum amount of tokens that can be minted", + "oldMaxSupply": "old maximum amount of tokens that can be minted", + "operator": "the sender of the transaction" + } + }, + "MetadataUpdate(uint256)": { + "details": "This event emits when the metadata of a token is changed. So that the third-party platforms such as NFT market could timely update the images and related attributes of the NFT." + }, + "OperatorRegistrySet(address,address,address)": { + "params": { + "newRegistry": "address of the new registry to set", + "oldRegistry": "address of the old registry", + "operator": "the sender of the transaction" + } + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Personalized(address,uint256,uint256)": { + "details": "emitted when personalize is called", + "params": { + "operator": "the sender of the transaction", + "personalizationMask": "the exact personalization that was done, as a custom meaning bit-mask", + "tokenId": "id of the token which had the personalization done" + } + }, + "SignAddressSet(address,address,address)": { + "details": "emitted when setSignAddress is called", + "params": { + "newSignAddress": "new signer address that is allowed to create mint signatures", + "oldSignAddress": "old signer address that is allowed to create mint signatures", + "operator": "the sender of the transaction" + } + }, + "TokenBurned(address,uint256,address)": { + "params": { + "burner": "the owner that burned the token", + "operator": "the sender of the transaction", + "tokenId": "the id of the token that was burned" + } + }, + "TokenBurningDisabled(address)": { + "params": { + "operator": "the sender of the transaction" + } + }, + "TokenBurningEnabled(address)": { + "params": { + "operator": "the sender of the transaction" + } + }, + "TokenRoyaltyReset(address,uint256)": { + "params": { + "operator": "the sender of the transaction" + } + }, + "TokenRoyaltySet(address,uint256,address,uint96)": { + "params": { + "feeNumerator": "percentage of the royalties in feeDenominator units", + "operator": "the sender of the transaction", + "receiver": "the receiver of the royalties", + "tokenId": "the token id" + } + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `tokenId` token is transferred from `from` to `to`." + }, + "TreasurySet(address,address,address)": { + "details": "emitted when setTreasury is called", + "params": { + "newTreasury": "new collection treasury address (where the payments are sent)", + "oldTreasury": "old collection treasury address (where the payments are sent)", + "operator": "the sender of the transaction" + } + }, + "TrustedForwarderSet(address,address,address)": { + "params": { + "newForwarder": "the new trusted forwarder address", + "oldForwarder": "the old trusted forwarder address", + "operator": "the sender of the transaction" + } + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + }, + "WaveSetup(address,uint256,uint256,uint256,uint256)": { + "details": "emitted when setupWave is called", + "params": { + "operator": "the sender of the transaction", + "waveIndex": "the current wave index", + "waveMaxTokens": "the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)", + "waveMaxTokensToBuy": "max tokens to buy, per wallet in a given wave", + "waveSingleTokenPrice": "the price to mint a token in a given wave, in wei" + } + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "approve(address,uint256)": { + "details": "See OpenZeppelin {IERC721-approve}" + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "batchMint(uint256,(address,uint256)[])": { + "details": "this methods takes a list of destination wallets and can only be used by the owner of the contract", + "params": { + "wallets": "list of destination wallets and amounts", + "waveIndex": "the index of the wave used to mint" + } + }, + "batchTransferFrom(address,address,uint256[])": { + "params": { + "from": "The sender of the token.", + "ids": "The ids of the tokens.", + "to": "The recipient of the token." + } + }, + "burn(uint256)": { + "details": "See {ERC721BurnMemoryEnumerableUpgradeable.burn}.", + "params": { + "tokenId": "the token id to be burned" + } + }, + "burnedTokens(address,uint256)": { + "params": { + "index": "of the burnedTokens array", + "previousOwner": "the owner to check for burned tokens" + }, + "returns": { + "_0": "the list of burned tokens by the indicated owner indexed by index" + } + }, + "burnedTokensCount(address)": { + "params": { + "previousOwner": "the owner to check for burned tokens" + }, + "returns": { + "_0": "number of burned tokens by the indicated owner" + } + }, + "burner(uint256)": { + "details": "same as burnerOf, kept here to be backward compatible", + "params": { + "tokenId": "the tokenId to be checked who burned it" + }, + "returns": { + "_0": "the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet." + } + }, + "burnerOf(uint256)": { + "params": { + "tokenId": "the tokenId to be checked who burned it" + }, + "returns": { + "_0": "the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet." + } + }, + "cancelWave(uint256)": { + "params": { + "waveIndex": "the index of the wave to be canceled" + } + }, + "chain()": { + "returns": { + "_0": "current chainID for the blockchain" + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "didBurnTokens(address)": { + "params": { + "previousOwner": "the owner to check for burned tokens" + }, + "returns": { + "_0": "true if the address burned any tokens" + } + }, + "disableBurning()": { + "details": "reverts if burning already disabled." + }, + "enableBurning()": { + "details": "reverts if burning already enabled." + }, + "feeDenominator()": { + "details": "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." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "getSignatureType(uint256)": { + "params": { + "signatureId": "signing signature ID" + } + }, + "initialize(address,string,string,string,address,address,address,address,uint256)": { + "details": "calls all the init functions from the base classes. Emits {ContractInitialized} event", + "params": { + "_allowedToExecuteMint": "token address that is used for payments and that is allowed to execute mint", + "_collectionOwner": "the address that will be set as the owner of the collection", + "_initialBaseURI": "an URI that will be used as the base for token URI", + "_initialTrustedForwarder": "trusted forwarder address", + "_maxSupply": "max supply of tokens to be allowed to be minted per contract", + "_mintTreasury": "collection treasury address (where the payments are sent)", + "_name": "name of the ERC721 token", + "_signAddress": "signer address that is allowed to create mint signatures", + "_symbol": "token symbol of the ERC721 token" + } + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "isMintAllowed(uint256,address,uint256)": { + "params": { + "amount": "amount to be checked if can be minted", + "wallet": "wallet to be checked if it can mint", + "waveIndex": "the index of the wave used to mint" + }, + "returns": { + "_0": "if can mint or not" + } + }, + "isTrustedForwarder(address)": { + "params": { + "forwarder": "the address ot the trusted forwarder to check" + }, + "returns": { + "_0": "true if forwarder is the trusted forwarder address" + } + }, + "mint(address,uint256,uint256,bytes)": { + "details": "this method is backward compatible with the previous contract, so, it uses last configured wave", + "params": { + "amount": "number of token to mint", + "signature": "signing signature value", + "signatureId": "signing signature ID", + "wallet": "minting wallet" + } + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "operatorPersonalize(uint256,uint256)": { + "details": "reverts if token does not exist or if not authorized", + "params": { + "personalizationMask": "a mask where each bit has a custom meaning in-game", + "tokenId": "what token to personalize" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "pause()": { + "details": "reverts if not owner of the collection or if not un-paused" + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "pendingOwner()": { + "details": "Returns the address of the pending owner." + }, + "personalizationOf(uint256)": { + "params": { + "tokenId": "the token ID to check" + }, + "returns": { + "_0": "the personalization data as uint256" + } + }, + "personalize(uint256,uint256,uint256,bytes)": { + "details": "after checks, it is reduced to personalizationTraits[_tokenId] = _personalizationMask", + "params": { + "personalizationMask": "a mask where each bit has a custom meaning in-game", + "signature": "signing signature", + "signatureId": "the ID of the provided signature", + "tokenId": "what token to personalize" + } + }, + "register(address,bool)": { + "details": "subscriptionOrRegistrantToCopy == address(0), just register", + "params": { + "subscribe": "bool to signify subscription 'true' or to copy the list 'false'.", + "subscriptionOrRegistrantToCopy": "registration address of the list to subscribe." + } + }, + "renounceOwnership()": { + "details": "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." + }, + "reveal(uint256,uint256,bytes)": { + "details": "will revert if owner of token is not caller or if signature is not valid", + "params": { + "signature": "validation signature", + "signatureId": "validation signature ID", + "tokenId": "the ID belonging to the NFT token for which to emit the event" + } + }, + "royaltyInfo(uint256,uint256)": { + "details": "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." + }, + "safeBatchTransferFrom(address,address,uint256[],bytes)": { + "params": { + "data": "Additional data.", + "from": "The sender of the token.", + "ids": "The ids of the tokens.", + "to": "The recipient of the token." + } + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See OpenZeppelin {IERC721-safeTransferFrom}" + }, + "setAllowedExecuteMint(address)": { + "details": "also resets default mint price", + "params": { + "minterToken": "the address that will be allowed to execute the mint function" + } + }, + "setApprovalForAll(address,bool)": { + "details": "See OpenZeppelin {IERC721-setApprovalForAll}" + }, + "setBaseURI(string)": { + "params": { + "baseURI": "an URI that will be used as the base for token URI" + } + }, + "setDefaultRoyalty(address,uint96)": { + "params": { + "feeNumerator": "percentage of the royalties in feeDenominator units", + "receiver": "the receiver of the royalties" + } + }, + "setMaxSupply(uint256)": { + "params": { + "_maxSupply": "maximum amount of tokens that can be minted" + } + }, + "setOperatorRegistry(address)": { + "params": { + "registry": "the address of the registry" + } + }, + "setSignAddress(address)": { + "params": { + "_signAddress": "new signer address to be set" + } + }, + "setTokenRoyalty(uint256,address,uint96)": { + "params": { + "feeNumerator": "percentage of the royalties in feeDenominator units", + "receiver": "the receiver of the royalties", + "tokenId": "the tokenId for" + } + }, + "setTreasury(address)": { + "params": { + "treasury": "new treasury address to be saved" + } + }, + "setTrustedForwarder(address)": { + "details": "address(0) disables the forwarder", + "params": { + "forwarder": "the new trusted forwarder address" + } + }, + "setupWave(uint256,uint256,uint256)": { + "params": { + "_waveMaxTokensOverall": "the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)", + "_waveMaxTokensPerWallet": "max tokens to buy, per wallet in a given wave", + "_waveSingleTokenPrice": "the price to mint a token in a given wave, in wei denoted by the allowedToExecuteMint contract" + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "transferFrom(address,address,uint256)": { + "details": "See OpenZeppelin {IERC721-transferFrom}" + }, + "transferOwnership(address)": { + "details": "Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner." + }, + "trustedForwarder()": { + "returns": { + "_0": "the trusted forwarder address" + } + }, + "unpause()": { + "details": "reverts if not owner of the collection or if not paused" + }, + "waveMaxTokensOverall(uint256)": { + "params": { + "waveIndex": "the index of the wave used to mint" + } + }, + "waveMaxTokensPerWallet(uint256)": { + "params": { + "waveIndex": "the index of the wave used to mint" + } + }, + "waveMint(address,uint256,uint256,uint256,bytes)": { + "params": { + "amount": "number of token to mint", + "signature": "signing signature value", + "signatureId": "signing signature ID", + "wallet": "minting wallet", + "waveIndex": "the index of the wave used to mint" + } + }, + "waveOwnerToClaimedCounts(uint256,address)": { + "params": { + "owner": "the owner for which the count is returned", + "waveIndex": "the index of the wave used to mint" + } + }, + "waveSingleTokenPrice(uint256)": { + "params": { + "waveIndex": "the index of the wave used to mint" + } + }, + "waveTotalMinted(uint256)": { + "params": { + "waveIndex": "the index of the wave used to mint" + } + } + }, + "stateVariables": { + "NFT_COLLECTION_STORAGE_LOCATION": { + "custom:storage-location": "erc7201:thesandbox.storage.avatar.nft-collection.NFTCollection" + } + }, + "title": "NFTCollection", + "version": 1 + }, + "userdoc": { + "errors": { + "AlreadyRegistered(address)": [ + { + "notice": "this contract is already registered" + } + ], + "CannotMint(address,uint256)": [ + { + "notice": "The operation failed because the wave is completed" + } + ], + "ContractNotConfigured()": [ + { + "notice": "The operation failed the wave index is zero, no wave was ever configured" + } + ], + "EnforcedBurn()": [ + { + "notice": "The operation failed because burning is enabled." + } + ], + "ExpectedBurn()": [ + { + "notice": "The operation failed because burning is disabled." + } + ], + "InvalidAllowedToExecuteMint(address)": [ + { + "notice": "The operation failed because the allowedToExecuteMint is not a contract or wrong" + } + ], + "InvalidBaseTokenURI(string)": [ + { + "notice": "The operation failed because the base token uri is empty." + } + ], + "InvalidBatchData()": [ + { + "notice": "The operation failed because the batch data len is zero" + } + ], + "InvalidName(string)": [ + { + "notice": "The operation failed because the token name is invalid" + } + ], + "InvalidSignAddress(address)": [ + { + "notice": "The operation failed because the signAddress is wrong" + } + ], + "InvalidSignature(uint256)": [ + { + "notice": "The operation failed because signature is invalid or it was already used" + } + ], + "InvalidSymbol(string)": [ + { + "notice": "The operation failed because the token symbol is invalid" + } + ], + "InvalidTreasury(address)": [ + { + "notice": "The operation failed because the treasury is wrong" + } + ], + "InvalidWaveData(uint256,uint256)": [ + { + "notice": "The operation failed because the wave arguments are wrong" + } + ], + "LowMaxSupply(uint256,uint256)": [ + { + "notice": "The operation failed because the maxSupply is lower than totalSupply" + } + ], + "OperatorNotAllowed(address)": [ + { + "notice": "the caller is not the operator" + } + ], + "RegistryNotSet(address)": [ + { + "notice": "the registry is not configured" + } + ] + }, + "events": { + "AllowedExecuteMintSet(address,address,address)": { + "notice": "Event emitted when an address was set as allowed to mint" + }, + "BaseURISet(address,string,string)": { + "notice": "Event emitted when the base token URI for the contract was set or changed" + }, + "ContractInitialized(string,string,string,address,address,address,uint256)": { + "notice": "Event emitted when the contract was initialized." + }, + "ContractRegistered(address,address,address,bool)": { + "notice": "emitted when the contract is registered into the registry" + }, + "DefaultRoyaltyReset(address)": { + "notice": "Event emitted when default royalties are reset" + }, + "DefaultRoyaltySet(address,address,uint96)": { + "notice": "Event emitted when a token personalization was made." + }, + "MaxSupplySet(address,uint256,uint256)": { + "notice": "Event emitted when the max supply is set or changed" + }, + "OperatorRegistrySet(address,address,address)": { + "notice": "emitted when a registry is set" + }, + "Personalized(address,uint256,uint256)": { + "notice": "Event emitted when a token personalization was made." + }, + "SignAddressSet(address,address,address)": { + "notice": "Event emitted when the signer address was set or changed" + }, + "TokenBurned(address,uint256,address)": { + "notice": "event emitted when a token was burned" + }, + "TokenBurningDisabled(address)": { + "notice": "event emitted when token burning was disabled" + }, + "TokenBurningEnabled(address)": { + "notice": "event emitted when token burning was enabled" + }, + "TokenRoyaltyReset(address,uint256)": { + "notice": "Event emitted when default royalties are reset" + }, + "TokenRoyaltySet(address,uint256,address,uint96)": { + "notice": "Event emitted when a token personalization was made." + }, + "TreasurySet(address,address,address)": { + "notice": "Event emitted when the treasury address was saved" + }, + "TrustedForwarderSet(address,address,address)": { + "notice": "emitted when the trusted forwarder is set" + }, + "WaveSetup(address,uint256,uint256,uint256,uint256)": { + "notice": "Event emitted when a wave was set up" + } + }, + "kind": "user", + "methods": { + "allowedToExecuteMint()": { + "notice": "return ERC20 contract through which the minting will be done (approveAndCall)" + }, + "baseTokenURI()": { + "notice": "return standard base token URL for ERC721 metadata" + }, + "batchMint(uint256,(address,uint256)[])": { + "notice": "batch minting function, used by owner to airdrop directly to users." + }, + "batchTransferFrom(address,address,uint256[])": { + "notice": "Transfer many tokens between 2 addresses." + }, + "burn(uint256)": { + "notice": "Burns `tokenId`. The caller must own `tokenId` or be an approved operator." + }, + "burnedTokens(address,uint256)": { + "notice": "Gets the list of burned tokens by the indicated owner" + }, + "burnedTokensCount(address)": { + "notice": "Gets the number of burned tokens by the indicated owner" + }, + "burner(uint256)": { + "notice": "Returns the burner of the `tokenId`" + }, + "burnerOf(uint256)": { + "notice": "Returns the burner of the `tokenId`" + }, + "cancelWave(uint256)": { + "notice": "function to setup wave parameters. A wave is defined as a combination of allowed number tokens to be minted in total, per wallet and minting price" + }, + "chain()": { + "notice": "helper automation function" + }, + "didBurnTokens(address)": { + "notice": "Checks if the indicated owner had burned tokens" + }, + "disableBurning()": { + "notice": "disables burning of tokens" + }, + "enableBurning()": { + "notice": "enables burning of tokens" + }, + "getSignatureType(uint256)": { + "notice": "return true if the signature id was used" + }, + "initialize(address,string,string,string,address,address,address,address,uint256)": { + "notice": "external entry point initialization function in accordance with the upgradable pattern" + }, + "isBurnEnabled()": { + "notice": "Return true if burning is enabled" + }, + "isMintAllowed(uint256,address,uint256)": { + "notice": "check if the indicated wallet can mint the indicated amount" + }, + "isTrustedForwarder(address)": { + "notice": "Indicates whether any particular address is the trusted forwarder." + }, + "maxSupply()": { + "notice": "return maximum amount of tokens that can be minted" + }, + "mint(address,uint256,uint256,bytes)": { + "notice": "token minting function on the last wave. Price is set by wave and is paid in tokens denoted by the allowedToExecuteMint contract" + }, + "mintTreasury()": { + "notice": "return treasury address where the payment for minting are sent" + }, + "operatorFilterRegistry()": { + "notice": "return the operatorFilterRegistry address" + }, + "operatorPersonalize(uint256,uint256)": { + "notice": "personalize token traits but can be called by owner or special roles address Used to change the traits of a token based on an in-game action" + }, + "pause()": { + "notice": "pauses the contract" + }, + "personalizationOf(uint256)": { + "notice": "get the personalization of the indicated tokenID" + }, + "personalize(uint256,uint256,uint256,bytes)": { + "notice": "personalize token traits according to the provided personalization bit-mask" + }, + "register(address,bool)": { + "notice": "This function is used to register Land contract on the Operator Filterer Registry of Opensea." + }, + "resetDefaultRoyalty()": { + "notice": "Removes default royalty information." + }, + "resetTokenRoyalty(uint256)": { + "notice": "Resets royalty information for the token id back to the global default." + }, + "reveal(uint256,uint256,bytes)": { + "notice": "helper function to emit the {MetadataUpdate} event in order for marketplaces to, on demand, refresh metadata, for the provided token ID. Off-chain, gaming mechanics are done and this function is ultimately called to signal the end of a reveal." + }, + "safeBatchTransferFrom(address,address,uint256[],bytes)": { + "notice": "Transfer many tokens between 2 addresses, while ensuring the receiving contract has a receiver method." + }, + "setAllowedExecuteMint(address)": { + "notice": "updates which address is allowed to execute the mint function." + }, + "setBaseURI(string)": { + "notice": "updates the base token URI for the contract" + }, + "setDefaultRoyalty(address,uint96)": { + "notice": "Sets the royalty information that all ids in this contract will default to." + }, + "setMaxSupply(uint256)": { + "notice": "updates the sign address." + }, + "setOperatorRegistry(address)": { + "notice": "sets filter registry address deployed in test" + }, + "setSignAddress(address)": { + "notice": "updates the sign address." + }, + "setTokenRoyalty(uint256,address,uint96)": { + "notice": "Sets the royalty information for a specific token id, overriding the global default." + }, + "setTreasury(address)": { + "notice": "update the treasury address" + }, + "setTrustedForwarder(address)": { + "notice": "set the trusted forwarder" + }, + "setupWave(uint256,uint256,uint256)": { + "notice": "function to setup a new wave. A wave is defined as a combination of allowed number tokens to be minted in total, per wallet and minting price" + }, + "signAddress()": { + "notice": "return the address from which all signatures must come from this specific address, otherwise they are invalid" + }, + "totalSupply()": { + "notice": "return the total amount of tokens minted till now" + }, + "trustedForwarder()": { + "notice": "Returns the address of the trusted forwarder." + }, + "unpause()": { + "notice": "unpauses the contract" + }, + "waveCount()": { + "notice": "the total amount of waves configured till now" + }, + "waveMaxTokensOverall(uint256)": { + "notice": "return max tokens to buy per wave, cumulating all addresses" + }, + "waveMaxTokensPerWallet(uint256)": { + "notice": "return max tokens to buy, per wallet in a given wave" + }, + "waveMint(address,uint256,uint256,uint256,bytes)": { + "notice": "token minting function on a certain wave. Price is set by wave and is paid in tokens denoted by the allowedToExecuteMint contract" + }, + "waveOwnerToClaimedCounts(uint256,address)": { + "notice": "return mapping of [owner -> wave index -> minted count]" + }, + "waveSingleTokenPrice(uint256)": { + "notice": "return price of one token mint (in the token denoted by the allowedToExecuteMint contract)" + }, + "waveTotalMinted(uint256)": { + "notice": "return number of total minted tokens in the current running wave" + } + }, + "notice": "ERC721 contract for Avatar collections. May be initialized via {CollectionFactory} or other similar factories", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/amoy/solcInputs/d4df534bdfed54cd2444d6da84f0b936.json b/packages/deploy/deployments/amoy/solcInputs/d4df534bdfed54cd2444d6da84f0b936.json new file mode 100644 index 0000000000..4bb05e36de --- /dev/null +++ b/packages/deploy/deployments/amoy/solcInputs/d4df534bdfed54cd2444d6da84f0b936.json @@ -0,0 +1,387 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts-0.8.13/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.13/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts-0.8.13/token/ERC20/extensions/draft-IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-0.8.13/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-0.8.13/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.13/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-0.8.13/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.13/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.13/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-0.8.13/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.13/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/access/Ownable2Step.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Ownable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2Step is Ownable {\n address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n return _pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n _pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n delete _pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() external {\n address sender = _msgSender();\n require(pendingOwner() == sender, \"Ownable2Step: caller is not the new owner\");\n _transferOwnership(sender);\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-0.8.15/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "@openzeppelin/contracts-0.8.15/proxy/beacon/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the proxy with `beacon`.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity\n * constructor.\n *\n * Requirements:\n *\n * - `beacon` must be a contract with the interface {IBeacon}.\n */\n constructor(address beacon, bytes memory data) payable {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n\n /**\n * @dev Returns the current beacon address.\n */\n function _beacon() internal view virtual returns (address) {\n return _getBeacon();\n }\n\n /**\n * @dev Returns the current implementation address of the associated beacon.\n */\n function _implementation() internal view virtual override returns (address) {\n return IBeacon(_getBeacon()).implementation();\n }\n\n /**\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n *\n * Requirements:\n *\n * - `beacon` must be a contract.\n * - The implementation returned by `beacon` must be a contract.\n */\n function _setBeacon(address beacon, bytes memory data) internal virtual {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts-0.8.15/proxy/beacon/UpgradeableBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n _implementation = newImplementation;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/IERC1967.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts-0.8.15/token/ERC20/extensions/draft-IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-0.8.15/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-0.8.15/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-0.8.15/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/draft-IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV // Deprecated in v4.8\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts-0.8.15/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\n * unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\n * array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSet {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n bytes32[] memory store = _values(set._inner);\n bytes32[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n constructor() {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n // On the first call to nonReentrant, _notEntered will be true\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n\n _;\n\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: balance query for the zero address\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _owners[tokenId];\n require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overriden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransfer(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, _data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits a {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits a {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC721/extensions/ERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721.sol\";\nimport \"./IERC721Enumerable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721Enumerable is ERC721, IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {\n return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Enumerable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC721/extensions/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts-0.8/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts-0.8/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Strings.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n // Check the signature length\n // - case 65: r,s,v signature (standard)\n // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else if (signature.length == 64) {\n bytes32 r;\n bytes32 vs;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n assembly {\n r := mload(add(signature, 0x20))\n vs := mload(add(signature, 0x40))\n }\n return tryRecover(hash, r, vs);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s;\n uint8 v;\n assembly {\n s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)\n v := add(shr(255, vs), 27)\n }\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", Strings.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts-0.8/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-0.8/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Permit.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts-5.0.2/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n * caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts-5.0.2/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\nimport {IERC20Permit} from \"../extensions/IERC20Permit.sol\";\nimport {Address} from \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev An operation with an ERC20 token failed.\n */\n error SafeERC20FailedOperation(address token);\n\n /**\n * @dev Indicates a failed `decreaseAllowance` request.\n */\n error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n forceApprove(token, spender, oldAllowance + value);\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no\n * value, non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {\n unchecked {\n uint256 currentAllowance = token.allowance(address(this), spender);\n if (currentAllowance < requestedDecrease) {\n revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);\n }\n forceApprove(token, spender, currentAllowance - requestedDecrease);\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data);\n if (returndata.length != 0 && !abi.decode(returndata, (bool))) {\n revert SafeERC20FailedOperation(address(token));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;\n }\n}\n" + }, + "@openzeppelin/contracts-5.0.2/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev The ETH balance of the account is not enough to perform the operation.\n */\n error AddressInsufficientBalance(address account);\n\n /**\n * @dev There's no code at `target` (it is not a contract).\n */\n error AddressEmptyCode(address target);\n\n /**\n * @dev A call to an address target failed. The target may have reverted.\n */\n error FailedInnerCall();\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n if (address(this).balance < amount) {\n revert AddressInsufficientBalance(address(this));\n }\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n if (!success) {\n revert FailedInnerCall();\n }\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason or custom error, it is bubbled\n * up by this function (like regular Solidity function calls). However, if\n * the call reverted with no returned reason, this function reverts with a\n * {FailedInnerCall} error.\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n if (address(this).balance < value) {\n revert AddressInsufficientBalance(address(this));\n }\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an\n * unsuccessful call.\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata\n ) internal view returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n // only check if target is a contract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n if (returndata.length == 0 && target.code.length == 0) {\n revert AddressEmptyCode(target);\n }\n return returndata;\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n * revert reason or with a default {FailedInnerCall} error.\n */\n function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n if (!success) {\n _revert(returndata);\n } else {\n return returndata;\n }\n }\n\n /**\n * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.\n */\n function _revert(bytes memory returndata) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert FailedInnerCall();\n }\n }\n}\n" + }, + "@openzeppelin/contracts-5.0.2/utils/cryptography/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS\n }\n\n /**\n * @dev The signature derives the `address(0)`.\n */\n error ECDSAInvalidSignature();\n\n /**\n * @dev The signature has an invalid length.\n */\n error ECDSAInvalidSignatureLength(uint256 length);\n\n /**\n * @dev The signature has an S value that is in the upper half order.\n */\n error ECDSAInvalidSignatureS(bytes32 s);\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n * and a bytes32 providing additional information about the error.\n *\n * If no error is returned, then the address can be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n */\n function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {\n unchecked {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n // We do not check for an overflow here since the shift operation results in 0 or 1.\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n */\n function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError, bytes32) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS, s);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature, bytes32(0));\n }\n\n return (signer, RecoverError.NoError, bytes32(0));\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n _throwError(error, errorArg);\n return recovered;\n }\n\n /**\n * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n */\n function _throwError(RecoverError error, bytes32 errorArg) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert ECDSAInvalidSignature();\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert ECDSAInvalidSignatureLength(uint256(errorArg));\n } else if (error == RecoverError.InvalidSignatureS) {\n revert ECDSAInvalidSignatureS(errorArg);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal onlyInitializing {\n }\n\n function __AccessControl_init_unchained() internal onlyInitializing {\n }\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(account),\n \" is missing role \",\n StringsUpgradeable.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/security/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/token/ERC721/ERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721Upgradeable.sol\";\nimport \"./IERC721ReceiverUpgradeable.sol\";\nimport \"./extensions/IERC721MetadataUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/StringsUpgradeable.sol\";\nimport \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\n using AddressUpgradeable for address;\n using StringsUpgradeable for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC721_init_unchained(name_, symbol_);\n }\n\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n return\n interfaceId == type(IERC721Upgradeable).interfaceId ||\n interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner or approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _ownerOf(tokenId) != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721Upgradeable.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256, /* firstTokenId */\n uint256 batchSize\n ) internal virtual {\n if (batchSize > 1) {\n if (from != address(0)) {\n _balances[from] -= batchSize;\n }\n if (to != address(0)) {\n _balances[to] += batchSize;\n }\n }\n }\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 firstTokenId,\n uint256 batchSize\n ) internal virtual {}\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[44] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"./IERC721EnumerableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {\n function __ERC721Enumerable_init() internal onlyInitializing {\n }\n\n function __ERC721Enumerable_init_unchained() internal onlyInitializing {\n }\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {\n return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Upgradeable.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721EnumerableUpgradeable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev See {ERC721-_beforeTokenTransfer}.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 firstTokenId,\n uint256 batchSize\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\n\n if (batchSize > 1) {\n // Will only trigger during construction. Batch transferring (minting) is not available afterwards.\n revert(\"ERC721Enumerable: consecutive transfers not supported\");\n }\n\n uint256 tokenId = firstTokenId;\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721Upgradeable.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/token/ERC721/extensions/IERC721MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/token/ERC721/IERC721ReceiverUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/token/ERC721/IERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-0.8.13/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/access/Ownable2StepUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)\n\npragma solidity ^0.8.20;\n\nimport {OwnableUpgradeable} from \"./OwnableUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is specified at deployment time in the constructor for `Ownable`. This\n * can later be changed with {transferOwnership} and {acceptOwnership}.\n *\n * This module is used through inheritance. It will make available all functions\n * from parent (Ownable).\n */\nabstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step\n struct Ownable2StepStorage {\n address _pendingOwner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable2Step\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00;\n\n function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) {\n assembly {\n $.slot := Ownable2StepStorageLocation\n }\n }\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n function __Ownable2Step_init() internal onlyInitializing {\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev Returns the address of the pending owner.\n */\n function pendingOwner() public view virtual returns (address) {\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n return $._pendingOwner;\n }\n\n /**\n * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual override onlyOwner {\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n $._pendingOwner = newOwner;\n emit OwnershipTransferStarted(owner(), newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual override {\n Ownable2StepStorage storage $ = _getOwnable2StepStorage();\n delete $._pendingOwner;\n super._transferOwnership(newOwner);\n }\n\n /**\n * @dev The new owner accepts the ownership transfer.\n */\n function acceptOwnership() public virtual {\n address sender = _msgSender();\n if (pendingOwner() != sender) {\n revert OwnableUnauthorizedAccount(sender);\n }\n _transferOwnership(sender);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * The initial owner is set to the address provided by the deployer. This can\n * later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Ownable\n struct OwnableStorage {\n address _owner;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Ownable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;\n\n function _getOwnableStorage() private pure returns (OwnableStorage storage $) {\n assembly {\n $.slot := OwnableStorageLocation\n }\n }\n\n /**\n * @dev The caller account is not authorized to perform an operation.\n */\n error OwnableUnauthorizedAccount(address account);\n\n /**\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\n */\n error OwnableInvalidOwner(address owner);\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\n */\n function __Ownable_init(address initialOwner) internal onlyInitializing {\n __Ownable_init_unchained(initialOwner);\n }\n\n function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {\n if (initialOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(initialOwner);\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n OwnableStorage storage $ = _getOwnableStorage();\n return $._owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n if (owner() != _msgSender()) {\n revert OwnableUnauthorizedAccount(_msgSender());\n }\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n if (newOwner == address(0)) {\n revert OwnableInvalidOwner(address(0));\n }\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n OwnableStorage storage $ = _getOwnableStorage();\n address oldOwner = $._owner;\n $._owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Storage of the initializable contract.\n *\n * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions\n * when using with upgradeable contracts.\n *\n * @custom:storage-location erc7201:openzeppelin.storage.Initializable\n */\n struct InitializableStorage {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n uint64 _initialized;\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool _initializing;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Initializable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;\n\n /**\n * @dev The contract is already initialized.\n */\n error InvalidInitialization();\n\n /**\n * @dev The contract is not initializing.\n */\n error NotInitializing();\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint64 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any\n * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in\n * production.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n // Cache values to avoid duplicated sloads\n bool isTopLevelCall = !$._initializing;\n uint64 initialized = $._initialized;\n\n // Allowed calls:\n // - initialSetup: the contract is not in the initializing state and no previous version was\n // initialized\n // - construction: the contract is initialized at version 1 (no reininitialization) and the\n // current contract is just being deployed\n bool initialSetup = initialized == 0 && isTopLevelCall;\n bool construction = initialized == 1 && address(this).code.length == 0;\n\n if (!initialSetup && !construction) {\n revert InvalidInitialization();\n }\n $._initialized = 1;\n if (isTopLevelCall) {\n $._initializing = true;\n }\n _;\n if (isTopLevelCall) {\n $._initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint64 version) {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing || $._initialized >= version) {\n revert InvalidInitialization();\n }\n $._initialized = version;\n $._initializing = true;\n _;\n $._initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n _checkInitializing();\n _;\n }\n\n /**\n * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.\n */\n function _checkInitializing() internal view virtual {\n if (!_isInitializing()) {\n revert NotInitializing();\n }\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n // solhint-disable-next-line var-name-mixedcase\n InitializableStorage storage $ = _getInitializableStorage();\n\n if ($._initializing) {\n revert InvalidInitialization();\n }\n if ($._initialized != type(uint64).max) {\n $._initialized = type(uint64).max;\n emit Initialized(type(uint64).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint64) {\n return _getInitializableStorage()._initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _getInitializableStorage()._initializing;\n }\n\n /**\n * @dev Returns a pointer to the storage namespace.\n */\n // solhint-disable-next-line var-name-mixedcase\n function _getInitializableStorage() private pure returns (InitializableStorage storage $) {\n assembly {\n $.slot := INITIALIZABLE_STORAGE\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/token/common/ERC2981Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC2981} from \"@openzeppelin/contracts/interfaces/IERC2981.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {ERC165Upgradeable} from \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.\n *\n * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for\n * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.\n *\n * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the\n * fee is specified in basis points by default.\n *\n * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See\n * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to\n * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.\n */\nabstract contract ERC2981Upgradeable is Initializable, IERC2981, ERC165Upgradeable {\n struct RoyaltyInfo {\n address receiver;\n uint96 royaltyFraction;\n }\n\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC2981\n struct ERC2981Storage {\n RoyaltyInfo _defaultRoyaltyInfo;\n mapping(uint256 tokenId => RoyaltyInfo) _tokenRoyaltyInfo;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ERC2981\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ERC2981StorageLocation = 0xdaedc9ab023613a7caf35e703657e986ccfad7e3eb0af93a2853f8d65dd86b00;\n\n function _getERC2981Storage() private pure returns (ERC2981Storage storage $) {\n assembly {\n $.slot := ERC2981StorageLocation\n }\n }\n\n /**\n * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).\n */\n error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);\n\n /**\n * @dev The default royalty receiver is invalid.\n */\n error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);\n\n /**\n * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).\n */\n error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);\n\n /**\n * @dev The royalty receiver for `tokenId` is invalid.\n */\n error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);\n\n function __ERC2981_init() internal onlyInitializing {\n }\n\n function __ERC2981_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165Upgradeable) returns (bool) {\n return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @inheritdoc IERC2981\n */\n function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address, uint256) {\n ERC2981Storage storage $ = _getERC2981Storage();\n RoyaltyInfo memory royalty = $._tokenRoyaltyInfo[tokenId];\n\n if (royalty.receiver == address(0)) {\n royalty = $._defaultRoyaltyInfo;\n }\n\n uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();\n\n return (royalty.receiver, royaltyAmount);\n }\n\n /**\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\n * override.\n */\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n /**\n * @dev Sets the royalty information that all ids in this contract will default to.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\n ERC2981Storage storage $ = _getERC2981Storage();\n uint256 denominator = _feeDenominator();\n if (feeNumerator > denominator) {\n // Royalty fee will exceed the sale price\n revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);\n }\n if (receiver == address(0)) {\n revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));\n }\n\n $._defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Removes default royalty information.\n */\n function _deleteDefaultRoyalty() internal virtual {\n ERC2981Storage storage $ = _getERC2981Storage();\n delete $._defaultRoyaltyInfo;\n }\n\n /**\n * @dev Sets the royalty information for a specific token id, overriding the global default.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {\n ERC2981Storage storage $ = _getERC2981Storage();\n uint256 denominator = _feeDenominator();\n if (feeNumerator > denominator) {\n // Royalty fee will exceed the sale price\n revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);\n }\n if (receiver == address(0)) {\n revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));\n }\n\n $._tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Resets royalty information for the token id back to the global default.\n */\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n ERC2981Storage storage $ = _getERC2981Storage();\n delete $._tokenRoyaltyInfo[tokenId];\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC721} from \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {IERC721Metadata} from \"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\";\nimport {ContextUpgradeable} from \"../../utils/ContextUpgradeable.sol\";\nimport {Strings} from \"@openzeppelin/contracts/utils/Strings.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {ERC165Upgradeable} from \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport {IERC721Errors} from \"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\nabstract contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721, IERC721Metadata, IERC721Errors {\n using Strings for uint256;\n\n /// @custom:storage-location erc7201:openzeppelin.storage.ERC721\n struct ERC721Storage {\n // Token name\n string _name;\n\n // Token symbol\n string _symbol;\n\n mapping(uint256 tokenId => address) _owners;\n\n mapping(address owner => uint256) _balances;\n\n mapping(uint256 tokenId => address) _tokenApprovals;\n\n mapping(address owner => mapping(address operator => bool)) _operatorApprovals;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ERC721\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ERC721StorageLocation = 0x80bb2b638cc20bc4d0a60d66940f3ab4a00c1d7b313497ca82fb0b4ab0079300;\n\n function _getERC721Storage() private pure returns (ERC721Storage storage $) {\n assembly {\n $.slot := ERC721StorageLocation\n }\n }\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC721_init_unchained(name_, symbol_);\n }\n\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n ERC721Storage storage $ = _getERC721Storage();\n $._name = name_;\n $._symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual returns (uint256) {\n ERC721Storage storage $ = _getERC721Storage();\n if (owner == address(0)) {\n revert ERC721InvalidOwner(address(0));\n }\n return $._balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual returns (address) {\n return _requireOwned(tokenId);\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual returns (string memory) {\n ERC721Storage storage $ = _getERC721Storage();\n return $._name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual returns (string memory) {\n ERC721Storage storage $ = _getERC721Storage();\n return $._symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual returns (string memory) {\n _requireOwned(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual {\n _approve(to, tokenId, _msgSender());\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual returns (address) {\n _requireOwned(tokenId);\n\n return _getApproved(tokenId);\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {\n ERC721Storage storage $ = _getERC721Storage();\n return $._operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(address from, address to, uint256 tokenId) public virtual {\n if (to == address(0)) {\n revert ERC721InvalidReceiver(address(0));\n }\n // Setting an \"auth\" arguments enables the `_isAuthorized` check which verifies that the token exists\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\n address previousOwner = _update(to, tokenId, _msgSender());\n if (previousOwner != from) {\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n }\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {\n transferFrom(from, to, tokenId);\n _checkOnERC721Received(from, to, tokenId, data);\n }\n\n /**\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n *\n * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the\n * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances\n * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by\n * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n ERC721Storage storage $ = _getERC721Storage();\n return $._owners[tokenId];\n }\n\n /**\n * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.\n */\n function _getApproved(uint256 tokenId) internal view virtual returns (address) {\n ERC721Storage storage $ = _getERC721Storage();\n return $._tokenApprovals[tokenId];\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in\n * particular (ignoring whether it is owned by `owner`).\n *\n * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this\n * assumption.\n */\n function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {\n return\n spender != address(0) &&\n (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.\n * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets\n * the `spender` for the specific `tokenId`.\n *\n * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this\n * assumption.\n */\n function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {\n if (!_isAuthorized(owner, spender, tokenId)) {\n if (owner == address(0)) {\n revert ERC721NonexistentToken(tokenId);\n } else {\n revert ERC721InsufficientApproval(spender, tokenId);\n }\n }\n }\n\n /**\n * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n *\n * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that\n * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.\n *\n * WARNING: Increasing an account's balance using this function tends to be paired with an override of the\n * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership\n * remain consistent with one another.\n */\n function _increaseBalance(address account, uint128 value) internal virtual {\n ERC721Storage storage $ = _getERC721Storage();\n unchecked {\n $._balances[account] += value;\n }\n }\n\n /**\n * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner\n * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.\n *\n * The `auth` argument is optional. If the value passed is non 0, then this function will check that\n * `auth` is either the owner of the token, or approved to operate on the token (by the owner).\n *\n * Emits a {Transfer} event.\n *\n * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.\n */\n function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {\n ERC721Storage storage $ = _getERC721Storage();\n address from = _ownerOf(tokenId);\n\n // Perform (optional) operator check\n if (auth != address(0)) {\n _checkAuthorized(from, auth, tokenId);\n }\n\n // Execute the update\n if (from != address(0)) {\n // Clear approval. No need to re-authorize or emit the Approval event\n _approve(address(0), tokenId, address(0), false);\n\n unchecked {\n $._balances[from] -= 1;\n }\n }\n\n if (to != address(0)) {\n unchecked {\n $._balances[to] += 1;\n }\n }\n\n $._owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n return from;\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal {\n if (to == address(0)) {\n revert ERC721InvalidReceiver(address(0));\n }\n address previousOwner = _update(to, tokenId, address(0));\n if (previousOwner != address(0)) {\n revert ERC721InvalidSender(address(0));\n }\n }\n\n /**\n * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\n _mint(to, tokenId);\n _checkOnERC721Received(address(0), to, tokenId, data);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal {\n address previousOwner = _update(address(0), tokenId, address(0));\n if (previousOwner == address(0)) {\n revert ERC721NonexistentToken(tokenId);\n }\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(address from, address to, uint256 tokenId) internal {\n if (to == address(0)) {\n revert ERC721InvalidReceiver(address(0));\n }\n address previousOwner = _update(to, tokenId, address(0));\n if (previousOwner == address(0)) {\n revert ERC721NonexistentToken(tokenId);\n } else if (previousOwner != from) {\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n }\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients\n * are aware of the ERC721 standard to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is like {safeTransferFrom} in the sense that it invokes\n * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `tokenId` token must exist and be owned by `from`.\n * - `to` cannot be the zero address.\n * - `from` cannot be the zero address.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(address from, address to, uint256 tokenId) internal {\n _safeTransfer(from, to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\n _transfer(from, to, tokenId);\n _checkOnERC721Received(from, to, tokenId, data);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is\n * either the owner of the token, or approved to operate on all tokens held by this owner.\n *\n * Emits an {Approval} event.\n *\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n */\n function _approve(address to, uint256 tokenId, address auth) internal {\n _approve(to, tokenId, auth, true);\n }\n\n /**\n * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not\n * emitted in the context of transfers.\n */\n function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {\n ERC721Storage storage $ = _getERC721Storage();\n // Avoid reading the owner unless necessary\n if (emitEvent || auth != address(0)) {\n address owner = _requireOwned(tokenId);\n\n // We do not use _isAuthorized because single-token approvals should not be able to call approve\n if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {\n revert ERC721InvalidApprover(auth);\n }\n\n if (emitEvent) {\n emit Approval(owner, to, tokenId);\n }\n }\n\n $._tokenApprovals[tokenId] = to;\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Requirements:\n * - operator can't be the address zero.\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n ERC721Storage storage $ = _getERC721Storage();\n if (operator == address(0)) {\n revert ERC721InvalidOperator(operator);\n }\n $._operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).\n * Returns the owner.\n *\n * Overrides to ownership logic should be done to {_ownerOf}.\n */\n function _requireOwned(uint256 tokenId) internal view returns (address) {\n address owner = _ownerOf(tokenId);\n if (owner == address(0)) {\n revert ERC721NonexistentToken(tokenId);\n }\n return owner;\n }\n\n /**\n * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the\n * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n */\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {\n if (to.code.length > 0) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n if (retval != IERC721Receiver.onERC721Received.selector) {\n revert ERC721InvalidReceiver(to);\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert ERC721InvalidReceiver(to);\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165 {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/utils/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)\n\npragma solidity ^0.8.20;\n\nimport {ContextUpgradeable} from \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /// @custom:storage-location erc7201:openzeppelin.storage.Pausable\n struct PausableStorage {\n bool _paused;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.Pausable\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;\n\n function _getPausableStorage() private pure returns (PausableStorage storage $) {\n assembly {\n $.slot := PausableStorageLocation\n }\n }\n\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n /**\n * @dev The operation failed because the contract is paused.\n */\n error EnforcedPause();\n\n /**\n * @dev The operation failed because the contract is not paused.\n */\n error ExpectedPause();\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n PausableStorage storage $ = _getPausableStorage();\n $._paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n PausableStorage storage $ = _getPausableStorage();\n return $._paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n if (paused()) {\n revert EnforcedPause();\n }\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n if (!paused()) {\n revert ExpectedPause();\n }\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n PausableStorage storage $ = _getPausableStorage();\n $._paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n PausableStorage storage $ = _getPausableStorage();\n $._paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable-5.0.2/utils/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant NOT_ENTERED = 1;\n uint256 private constant ENTERED = 2;\n\n /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard\n struct ReentrancyGuardStorage {\n uint256 _status;\n }\n\n // keccak256(abi.encode(uint256(keccak256(\"openzeppelin.storage.ReentrancyGuard\")) - 1)) & ~bytes32(uint256(0xff))\n bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;\n\n function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {\n assembly {\n $.slot := ReentrancyGuardStorageLocation\n }\n }\n\n /**\n * @dev Unauthorized reentrant call.\n */\n error ReentrancyGuardReentrantCall();\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n $._status = NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // On the first call to nonReentrant, _status will be NOT_ENTERED\n if ($._status == ENTERED) {\n revert ReentrancyGuardReentrantCall();\n }\n\n // Any calls to nonReentrant after this point will fail\n $._status = ENTERED;\n }\n\n function _nonReentrantAfter() private {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n $._status = NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();\n return $._status == ENTERED;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n function __AccessControl_init() internal onlyInitializing {\n }\n\n function __AccessControl_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(account),\n \" is missing role \",\n StringsUpgradeable.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n function __Ownable_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable_init_unchained() internal onlyInitializing {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n // Booleans are more expensive than uint256 or any type that takes up a full\n // word because each write operation emits an extra SLOAD to first read the\n // slot's contents, replace the bits taken up by the boolean, and then write\n // back. This is the compiler's defense against contract upgrades and\n // pointer aliasing, and it cannot be disabled.\n\n // The values being non-zero value makes deployment a bit more expensive,\n // but in exchange the refund on every call to nonReentrant will be lower in\n // amount. Since refunds are capped to a percentage of the total\n // transaction's gas, it is best to keep them low in cases like this one, to\n // increase the likelihood of the full refund coming into effect.\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n\n uint256 private _status;\n\n function __ReentrancyGuard_init() internal onlyInitializing {\n __ReentrancyGuard_init_unchained();\n }\n\n function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n * Calling a `nonReentrant` function from another `nonReentrant`\n * function is not supported. It is possible to prevent this from happening\n * by making the `nonReentrant` function external, and making it call a\n * `private` function that does the actual work.\n */\n modifier nonReentrant() {\n _nonReentrantBefore();\n _;\n _nonReentrantAfter();\n }\n\n function _nonReentrantBefore() private {\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n // Any calls to nonReentrant after this point will fail\n _status = _ENTERED;\n }\n\n function _nonReentrantAfter() private {\n // By storing the original value once again, a refund is triggered (see\n // https://eips.ethereum.org/EIPS/eip-2200)\n _status = _NOT_ENTERED;\n }\n\n /**\n * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n * `nonReentrant` function in the call stack.\n */\n function _reentrancyGuardEntered() internal view returns (bool) {\n return _status == _ENTERED;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721Upgradeable.sol\";\nimport \"./IERC721ReceiverUpgradeable.sol\";\nimport \"./extensions/IERC721MetadataUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/StringsUpgradeable.sol\";\nimport \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\n using AddressUpgradeable for address;\n using StringsUpgradeable for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC721_init_unchained(name_, symbol_);\n }\n\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n return\n interfaceId == type(IERC721Upgradeable).interfaceId ||\n interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner or approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(address from, address to, uint256 tokenId) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _ownerOf(tokenId) != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721Upgradeable.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(address from, address to, uint256 tokenId) internal virtual {\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n *\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\n * that `ownerOf(tokenId)` is `a`.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\n _balances[account] += amount;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[44] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"./IERC721EnumerableUpgradeable.sol\";\nimport {Initializable} from \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n function __ERC721Enumerable_init() internal onlyInitializing {\n }\n\n function __ERC721Enumerable_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {\n return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Upgradeable.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721EnumerableUpgradeable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev See {ERC721-_beforeTokenTransfer}.\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 firstTokenId,\n uint256 batchSize\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, firstTokenId, batchSize);\n\n if (batchSize > 1) {\n // Will only trigger during construction. Batch transferring (minting) is not available afterwards.\n revert(\"ERC721Enumerable: consecutive transfers not supported\");\n }\n\n uint256 tokenId = firstTokenId;\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721Upgradeable.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n *\n * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport {Initializable} from \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165Upgradeable {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMathUpgradeable {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\nimport \"./math/SignedMathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = MathUpgradeable.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMathUpgradeable.abs(value))));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, MathUpgradeable.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC6093.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC20InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC20InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\n * @param needed Minimum amount required to perform a transfer.\n */\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC20InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n * @param spender Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n /**\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n * Used in balance queries.\n * @param owner Address of the current owner of a token.\n */\n error ERC721InvalidOwner(address owner);\n\n /**\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\n * @param tokenId Identifier number of a token.\n */\n error ERC721NonexistentToken(uint256 tokenId);\n\n /**\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param tokenId Identifier number of a token.\n * @param owner Address of the current owner of a token.\n */\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC721InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC721InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param tokenId Identifier number of a token.\n */\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC721InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n /**\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n * @param balance Current balance for the interacting account.\n * @param needed Minimum amount required to perform a transfer.\n * @param tokenId Identifier number of a token.\n */\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n /**\n * @dev Indicates a failure with the token `sender`. Used in transfers.\n * @param sender Address whose tokens are being transferred.\n */\n error ERC1155InvalidSender(address sender);\n\n /**\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\n * @param receiver Address to which tokens are being transferred.\n */\n error ERC1155InvalidReceiver(address receiver);\n\n /**\n * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n * @param owner Address of the current owner of a token.\n */\n error ERC1155MissingApprovalForAll(address operator, address owner);\n\n /**\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n * @param approver Address initiating an approval operation.\n */\n error ERC1155InvalidApprover(address approver);\n\n /**\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n * @param operator Address that may be allowed to operate on tokens without being their owner.\n */\n error ERC1155InvalidOperator(address operator);\n\n /**\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n * Used in batch transfers.\n * @param idsLength Length of the array of token identifiers\n * @param valuesLength Length of the array of token amounts\n */\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC2981.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n */\ninterface IERC2981 is IERC165 {\n /**\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n */\n function royaltyInfo(\n uint256 tokenId,\n uint256 salePrice\n ) external view returns (address receiver, uint256 royaltyAmount);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC721} from \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n * a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\n * {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n * a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the address zero.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be\n * reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n /**\n * @dev Muldiv operation overflow.\n */\n error MathOverflowedMulDiv();\n\n enum Rounding {\n Floor, // Toward negative infinity\n Ceil, // Toward positive infinity\n Trunc, // Toward zero\n Expand // Away from zero\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds towards infinity instead\n * of rounding towards zero.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n if (b == 0) {\n // Guarantee the same behavior as in a regular Solidity division.\n return a / b;\n }\n\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n * denominator == 0.\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n * Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0 = x * y; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n if (denominator <= prod1) {\n revert MathOverflowedMulDiv();\n }\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n uint256 twos = denominator & (0 - denominator);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n // works in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n * towards zero.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256 of a positive value rounded towards zero.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n */\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n return uint8(rounding) % 2 == 1;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/math/SignedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n uint8 private constant ADDRESS_LENGTH = 20;\n\n /**\n * @dev The `value` string doesn't fit in the specified `length`.\n */\n error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toStringSigned(int256 value) internal pure returns (string memory) {\n return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n uint256 localValue = value;\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = HEX_DIGITS[localValue & 0xf];\n localValue >>= 4;\n }\n if (localValue != 0) {\n revert StringsInsufficientHexLength(value, length);\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n * representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/common/IERC4906.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n/// @title EIP-721 Metadata Update Extension\ninterface IERC4906 {\n /// @dev This event emits when the metadata of a token is changed.\n /// So that the third-party platforms such as NFT market could\n /// timely update the images and related attributes of the NFT.\n event MetadataUpdate(uint256 indexed _tokenId);\n\n /// @dev This event emits when the metadata of a range of tokens is changed.\n /// So that the third-party platforms such as NFT market could\n /// timely update the images and related attributes of the NFTs.\n event BatchMetadataUpdate(uint256 indexed _fromTokenId, uint256 indexed _toTokenId);\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/common/IERC5313.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\n// taken from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/interfaces/IERC5313.sol\n// as of deployment, version 4.9 of OpenZeppelin/openzeppelin-contracts, that holds this interface, is not released. Will change it when it will be\n\n/**\n * @dev Interface for the Light Contract Ownership Standard.\n *\n * A standardized minimal interface required to identify an account that controls a contract\n *\n * _Available since v4.9._\n */\ninterface IERC5313 {\n /**\n * @dev Gets the address of the owner.\n */\n function owner() external view returns (address);\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/nft-collection/ERC2771HandlerUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.26;\n\nimport {ContextUpgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/utils/ContextUpgradeable.sol\";\n\n/**\n * @title ERC2771HandlerUpgradeable\n * @author The Sandbox\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice minimal ERC2771 handler to keep bytecode-size down\n * @dev based on: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.6.0/contracts/metatx/ERC2771Context.sol\n * with an initializer for proxies and a mutable forwarder\n */\nabstract contract ERC2771HandlerUpgradeable is ContextUpgradeable {\n struct ERC2771HandlerUpgradeableStorage {\n address trustedForwarder;\n }\n\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.ERC2771HandlerUpgradeable\n bytes32 internal constant ERC2771_HANDLER_UPGRADABLE_STORAGE_LOCATION =\n 0x269c7d123624135714769792dd28ef6db020f837bcb105cea22203ad17aa7000;\n\n function _getERC2771HandlerUpgradableStorage() private pure returns (ERC2771HandlerUpgradeableStorage storage $) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n $.slot := ERC2771_HANDLER_UPGRADABLE_STORAGE_LOCATION\n }\n }\n\n /**\n * @notice emitted when the trusted forwarder is set\n * @param operator the sender of the transaction\n * @param oldForwarder the old trusted forwarder address\n * @param newForwarder the new trusted forwarder address\n */\n event TrustedForwarderSet(address indexed operator, address indexed oldForwarder, address indexed newForwarder);\n\n\n /**\n * @notice set the trusted forwarder\n * @param forwarder the new trusted forwarder address\n * @dev address(0) disables the forwarder\n */\n function _setTrustedForwarder(address forwarder) internal {\n ERC2771HandlerUpgradeableStorage storage $ = _getERC2771HandlerUpgradableStorage();\n emit TrustedForwarderSet(_msgSender(), $.trustedForwarder, forwarder);\n $.trustedForwarder = forwarder;\n }\n\n /**\n * @notice Returns the address of the trusted forwarder.\n * @return the trusted forwarder address\n */\n function trustedForwarder() external view virtual returns (address) {\n ERC2771HandlerUpgradeableStorage storage $ = _getERC2771HandlerUpgradableStorage();\n return $.trustedForwarder;\n }\n\n /**\n * @notice Indicates whether any particular address is the trusted forwarder.\n * @param forwarder the address ot the trusted forwarder to check\n * @return true if forwarder is the trusted forwarder address\n */\n function isTrustedForwarder(address forwarder) external view virtual returns (bool) {\n return _isTrustedForwarder(forwarder);\n }\n\n /**\n * @notice Override for `msg.sender`.\n * @return the address of the sender\n * @dev Defaults to the original `msg.sender` whenever a call is not performed by the trusted forwarder\n * or the calldata length is less than 20 bytes (an address length).\n */\n function _msgSender() internal view override virtual returns (address) {\n uint256 calldataLength = msg.data.length;\n uint256 contextSuffixLength = _contextSuffixLength();\n if (_isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) {\n return address(bytes20(msg.data[calldataLength - contextSuffixLength :]));\n } else {\n return msg.sender;\n }\n }\n\n /**\n * @notice Override for `msg.data`.\n * @return the message data with the address of the sender removed\n * @dev Defaults to the original `msg.data` whenever a call is not performed by the trusted forwarder\n * or the calldata length is less than 20 bytes (an address length).\n */\n function _msgData() internal view override virtual returns (bytes calldata) {\n uint256 calldataLength = msg.data.length;\n uint256 contextSuffixLength = _contextSuffixLength();\n if (_isTrustedForwarder(msg.sender) && calldataLength >= contextSuffixLength) {\n return msg.data[: calldataLength - contextSuffixLength];\n } else {\n return msg.data;\n }\n }\n\n /**\n * @notice Indicates whether any particular address is the trusted forwarder.\n * @param forwarder the address ot the trusted forwarder to check\n * @return true if forwarder is the trusted forwarder address\n */\n function _isTrustedForwarder(address forwarder) internal view virtual returns (bool) {\n ERC2771HandlerUpgradeableStorage storage $ = _getERC2771HandlerUpgradableStorage();\n return forwarder == $.trustedForwarder;\n }\n\n /**\n * @notice ERC-2771 specifies the context as being a single address (20 bytes).\n */\n function _contextSuffixLength() internal view override virtual returns (uint256) {\n return 20;\n }\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/nft-collection/ERC721BurnMemoryUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.26;\n\nimport {ERC721Upgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol\";\n\n/**\n * @title ERC721BurnMemoryUpgradeable\n * @author The Sandbox\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice Baseline ERC721 contract to be used by the NFTCollection contract\n * @dev provides the \"burn memory\" functionality: keeping track of who burned what token\n */\nabstract contract ERC721BurnMemoryUpgradeable is ERC721Upgradeable {\n struct ERC721BurnMemoryUpgradeableStorage {\n /**\n * @notice tokenId to burner mapping; saves who burned a specific token\n */\n mapping(uint256 => address) burner;\n\n /**\n * @notice burner to list of burned tokens mapping; to see what tokens who burned\n */\n mapping(address => uint256[]) burnedTokens;\n\n /**\n * @notice flag that gates burning (enabling/disabling burning)\n */\n bool isBurnEnabled;\n }\n\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.ERC721BurnMemoryUpgradeable\n bytes32 internal constant ERC721_BURN_MEMORY_UPGRADABLE_STORAGE_LOCATION =\n 0x6936713dbc593f49219a6774bfcd8c37b5bc8ca843481c9ed2d56b3c48c59400;\n\n function _getERC721BurnMemoryUpgradableStorage() private pure returns (ERC721BurnMemoryUpgradeableStorage storage $) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n $.slot := ERC721_BURN_MEMORY_UPGRADABLE_STORAGE_LOCATION\n }\n }\n\n /**\n * @notice event emitted when a token was burned\n * @param operator the sender of the transaction\n * @param tokenId the id of the token that was burned\n * @param burner the owner that burned the token\n */\n event TokenBurned(address indexed operator, uint256 indexed tokenId, address indexed burner);\n\n /**\n * @notice event emitted when token burning was enabled\n * @param operator the sender of the transaction\n */\n event TokenBurningEnabled(address indexed operator);\n\n /**\n * @notice event emitted when token burning was disabled\n * @param operator the sender of the transaction\n */\n event TokenBurningDisabled(address indexed operator);\n\n /**\n * @notice The operation failed because burning is enabled.\n */\n error EnforcedBurn();\n\n /**\n * @notice The operation failed because burning is disabled.\n */\n error ExpectedBurn();\n\n /**\n * @notice enables burning of tokens\n */\n function _enableBurning() internal {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n if ($.isBurnEnabled) {\n revert EnforcedBurn();\n }\n $.isBurnEnabled = true;\n emit TokenBurningEnabled(_msgSender());\n }\n\n /**\n * @notice disables burning of tokens\n */\n function _disableBurning() internal {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n if (!$.isBurnEnabled) {\n revert ExpectedBurn();\n }\n $.isBurnEnabled = false;\n emit TokenBurningDisabled(_msgSender());\n }\n\n /**\n * @notice Burns `tokenId`. The caller must own `tokenId` or be an approved operator.\n * @param tokenId the token id to be burned\n */\n function _burnWithCheck(uint256 tokenId) internal virtual {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n if (!$.isBurnEnabled) {\n revert ExpectedBurn();\n }\n address sender = _msgSender();\n // Setting an \"auth\" arguments enables the `_isAuthorized` check which verifies that the token exists\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\n address previousOwner = _update(address(0), tokenId, sender);\n $.burner[tokenId] = sender;\n // @dev TODO: if we don't remove this code, check if we want sender or owner.\n $.burnedTokens[sender].push(tokenId);\n emit TokenBurned(sender, tokenId, previousOwner);\n }\n\n /**\n * @notice Returns the burner of the `tokenId`\n * @param tokenId the tokenId to be checked who burned it\n * @return the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet.\n */\n function burnerOf(uint256 tokenId) external view returns (address) {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n return $.burner[tokenId];\n }\n\n /**\n * @notice Returns the burner of the `tokenId`\n * @param tokenId the tokenId to be checked who burned it\n * @return the address of who burned the indicated token ID or zero if the token wasn't minted or burned yet.\n * @dev same as burnerOf, kept here to be backward compatible\n */\n function burner(uint256 tokenId) external view returns (address) {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n return $.burner[tokenId];\n }\n\n /**\n * @notice Checks if the indicated owner had burned tokens\n * @param previousOwner the owner to check for burned tokens\n * @return true if the address burned any tokens\n */\n function didBurnTokens(address previousOwner) external view returns (bool) {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n return $.burnedTokens[previousOwner].length != 0;\n }\n\n /**\n * @notice Gets the number of burned tokens by the indicated owner\n * @param previousOwner the owner to check for burned tokens\n * @return number of burned tokens by the indicated owner\n */\n function burnedTokensCount(address previousOwner) external view returns (uint256) {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n return $.burnedTokens[previousOwner].length;\n }\n\n\n /**\n * @notice Gets the list of burned tokens by the indicated owner\n * @param previousOwner the owner to check for burned tokens\n * @param index of the burnedTokens array\n * @return the list of burned tokens by the indicated owner indexed by index\n */\n function burnedTokens(address previousOwner, uint256 index) external view returns (uint256) {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n return $.burnedTokens[previousOwner][index];\n }\n\n /**\n * @notice Return true if burning is enabled\n */\n function isBurnEnabled() external view returns (bool) {\n ERC721BurnMemoryUpgradeableStorage storage $ = _getERC721BurnMemoryUpgradableStorage();\n return $.isBurnEnabled;\n }\n\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/nft-collection/INFTCollection.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.26;\n\nimport {IERC20} from \"@openzeppelin/contracts-5.0.2/token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Metadata.sol\";\n\n\n/**\n * @title INFTCollection\n * @author The Sandbox\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice Events emitted and Error raised by the NFTCollection\n */\ninterface INFTCollection {\n /**\n * @notice Event emitted when the contract was initialized.\n * @dev emitted at proxy startup, only once\n * @param baseURI an URI that will be used as the base for token URI\n * @param name name of the ERC721 token\n * @param symbol token symbol of the ERC721 token\n * @param mintTreasury collection treasury address (where the payments are sent)\n * @param signAddress signer address that is allowed to create mint signatures\n * @param allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\n * @param maxSupply max supply of tokens to be allowed to be minted per contract\n */\n event ContractInitialized(\n string indexed baseURI,\n string indexed name,\n string indexed symbol,\n address mintTreasury,\n address signAddress,\n IERC20Metadata allowedToExecuteMint,\n uint256 maxSupply\n );\n\n /**\n * @notice Event emitted when a wave was set up\n * @dev emitted when setupWave is called\n * @param operator the sender of the transaction\n * @param waveMaxTokens the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\n * @param waveMaxTokensToBuy max tokens to buy, per wallet in a given wave\n * @param waveSingleTokenPrice the price to mint a token in a given wave, in wei\n * @param waveIndex the current wave index\n */\n event WaveSetup(\n address indexed operator,\n uint256 waveMaxTokens,\n uint256 waveMaxTokensToBuy,\n uint256 waveSingleTokenPrice,\n uint256 waveIndex\n );\n\n /**\n * @notice Event emitted when an address was set as allowed to mint\n * @dev emitted when setAllowedExecuteMint is called\n * @param operator the sender of the transaction\n * @param oldToken old address that is used for payments and that is allowed to execute mint\n * @param newToken new address that is used for payments and that is allowed to execute mint\n */\n event AllowedExecuteMintSet(address indexed operator, IERC20 indexed oldToken, IERC20 indexed newToken);\n\n /**\n * @notice Event emitted when the treasury address was saved\n * @dev emitted when setTreasury is called\n * @param operator the sender of the transaction\n * @param oldTreasury old collection treasury address (where the payments are sent)\n * @param newTreasury new collection treasury address (where the payments are sent)\n */\n event TreasurySet(address indexed operator, address indexed oldTreasury, address indexed newTreasury);\n\n /**\n * @notice Event emitted when the base token URI for the contract was set or changed\n * @dev emitted when setBaseURI is called\n * @param operator the sender of the transaction\n * @param oldBaseURI old URI that will be used as the base for token metadata URI\n * @param newBaseURI new URI that will be used as the base for token metadata URI\n */\n event BaseURISet(address indexed operator, string oldBaseURI, string newBaseURI);\n\n /**\n * @notice Event emitted when the max supply is set or changed\n * @dev emitted when setSignAddress is called\n * @param operator the sender of the transaction\n * @param oldMaxSupply old maximum amount of tokens that can be minted\n * @param newMaxSupply new maximum amount of tokens that can be minted\n */\n event MaxSupplySet(address indexed operator, uint256 oldMaxSupply, uint256 newMaxSupply);\n\n /**\n * @notice Event emitted when a token personalization was made.\n * @dev emitted when personalize is called\n * @param operator the sender of the transaction\n * @param tokenId id of the token which had the personalization done\n * @param personalizationMask the exact personalization that was done, as a custom meaning bit-mask\n */\n event Personalized(address indexed operator, uint256 indexed tokenId, uint256 indexed personalizationMask);\n\n\n /**\n * @notice Event emitted when a token personalization was made.\n * @param operator the sender of the transaction\n * @param receiver the receiver of the royalties\n * @param feeNumerator percentage of the royalties in feeDenominator units\n */\n event DefaultRoyaltySet(address indexed operator, address indexed receiver, uint96 feeNumerator);\n\n\n /**\n * @notice Event emitted when default royalties are reset\n * @param operator the sender of the transaction\n */\n event DefaultRoyaltyReset(address indexed operator);\n\n /**\n * @notice Event emitted when a token personalization was made.\n * @param operator the sender of the transaction\n * @param tokenId the token id\n * @param receiver the receiver of the royalties\n * @param feeNumerator percentage of the royalties in feeDenominator units\n */\n event TokenRoyaltySet(address indexed operator, uint256 indexed tokenId, address indexed receiver, uint96 feeNumerator);\n\n\n /**\n * @notice Event emitted when default royalties are reset\n * @param operator the sender of the transaction\n */\n event TokenRoyaltyReset(address indexed operator, uint256 indexed tokenId);\n\n /**\n * @notice The operation failed because the base token uri is empty.\n * @param baseURI an URI that will be used as the base for token URI\n */\n error InvalidBaseTokenURI(string baseURI);\n\n /**\n * @notice The operation failed the wave index is zero, no wave was ever configured\n */\n error ContractNotConfigured();\n\n /**\n * @notice The operation failed because the token name is invalid\n * @param name name of the ERC721 token\n */\n error InvalidName(string name);\n\n /**\n * @notice The operation failed because the token symbol is invalid\n * @param symbol token symbol of the ERC721 token\n */\n error InvalidSymbol(string symbol);\n\n /**\n * @notice The operation failed because the treasury is wrong\n * @param mintTreasury collection treasury address (where the payments are sent)\n */\n error InvalidTreasury(address mintTreasury);\n\n /**\n * @notice The operation failed because the allowedToExecuteMint is not a contract or wrong\n * @param allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\n */\n error InvalidAllowedToExecuteMint(IERC20Metadata allowedToExecuteMint);\n\n /**\n * @notice The operation failed because the maxSupply is lower than totalSupply\n * @param maxSupply max supply of tokens to be allowed to be minted per contract\n * @param totalSupply amount of tokens minted till now\n */\n error LowMaxSupply(uint256 maxSupply, uint256 totalSupply);\n\n /**\n * @notice The operation failed because the batch data len is zero\n */\n error InvalidBatchData();\n\n /**\n * @notice The operation failed because the wave arguments are wrong\n * @param waveMaxTokensOverall the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\n * @param waveMaxTokensPerWallet max tokens to buy, per wallet in a given wave\n */\n error InvalidWaveData(uint256 waveMaxTokensOverall, uint256 waveMaxTokensPerWallet);\n\n /**\n * @notice The operation failed because the wave is completed\n * @param wallet wallet to be checked if it can mint\n * @param amount amount to be checked if can be minted\n */\n error CannotMint(address wallet, uint256 amount);\n\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/nft-collection/NFTCollection.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.26;\n\nimport {ReentrancyGuardUpgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/utils/ReentrancyGuardUpgradeable.sol\";\nimport {Ownable2StepUpgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/access/Ownable2StepUpgradeable.sol\";\nimport {ContextUpgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/utils/ContextUpgradeable.sol\";\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/utils/PausableUpgradeable.sol\";\nimport {ERC2981Upgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/token/common/ERC2981Upgradeable.sol\";\nimport {ERC721Upgradeable} from \"@openzeppelin/contracts-upgradeable-5.0.2/token/ERC721/ERC721Upgradeable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts-5.0.2/token/ERC20/IERC20.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts-5.0.2/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts-5.0.2/token/ERC20/utils/SafeERC20.sol\";\nimport {IERC721Receiver} from \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport {IERC4906} from \"../common/IERC4906.sol\";\nimport {UpdatableOperatorFiltererUpgradeable} from \"./UpdatableOperatorFiltererUpgradeable.sol\";\nimport {ERC2771HandlerUpgradeable} from \"./ERC2771HandlerUpgradeable.sol\";\nimport {ERC721BurnMemoryUpgradeable} from \"./ERC721BurnMemoryUpgradeable.sol\";\nimport {NFTCollectionSignature} from \"./NFTCollectionSignature.sol\";\nimport {INFTCollection} from \"./INFTCollection.sol\";\n\n/**\n * @title NFTCollection\n * @author The Sandbox\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice ERC721 contract for Avatar collections.\n * May be initialized via {CollectionFactory} or other similar factories\n * @dev Some features:\n * - upgradable\n * - ownable (2 step transfer)\n * - OpenSea royalty compliant\n * - ERC2981 compliant\n * - ERC4906 compliant\n * - ERC165 compliant\n * - supports ERC2771 for services like Biconomy\n * - supports \"burn memory\" - keeping track of who burned what token for faster in-game gating checks\n * - minting is supported via an ERC20 token contract that supports approveAndCall\n * as mint price is in non-native tokens\n * - custom batch operations for minting and transfer\n */\ncontract NFTCollection is\nReentrancyGuardUpgradeable,\nOwnable2StepUpgradeable,\nERC721BurnMemoryUpgradeable,\nERC2981Upgradeable,\nERC2771HandlerUpgradeable,\nUpdatableOperatorFiltererUpgradeable,\nPausableUpgradeable,\nNFTCollectionSignature,\nIERC4906,\nINFTCollection\n{\n /**\n * @notice Structure used to mint in batch\n * @param wallet destination address that will receive the tokens\n * @param amount of tokens to mint\n */\n struct BatchMintingData {\n address wallet;\n uint256 amount;\n }\n\n /**\n * @notice Structure used save minting wave information\n * @param waveMaxTokensOverall max tokens to buy per wave, cumulating all addresses\n * @param waveMaxTokensPerWallet max tokens to buy, per wallet in a given wave\n * @param waveSingleTokenPrice price of one token mint (in the token denoted by the allowedToExecuteMint contract)\n * @param waveTotalMinted number of total minted tokens in the current running wave\n * @param waveOwnerToClaimedCounts mapping of [owner -> minted count]\n */\n struct WaveData {\n uint256 waveMaxTokensOverall;\n uint256 waveMaxTokensPerWallet;\n uint256 waveSingleTokenPrice;\n uint256 waveTotalMinted;\n mapping(address => uint256) waveOwnerToClaimedCounts;\n }\n\n struct NFTCollectionStorage {\n /**\n * @notice maximum amount of tokens that can be minted\n */\n uint256 maxSupply; // public\n\n /**\n * @notice treasury address where the payment for minting are sent\n */\n address mintTreasury; // public\n\n /**\n * @notice standard base token URL for ERC721 metadata\n */\n string baseTokenURI;\n\n /**\n * @notice saved information of minting waves\n */\n WaveData[] waveData;\n\n /**\n * @notice ERC20 contract through which the minting will be done (approveAndCall)\n * When there is a price for the minting, the payment will be done using this token\n */\n IERC20 allowedToExecuteMint;\n\n /**\n * @notice stores the personalization mask for a tokenId\n */\n mapping(uint256 => uint256) personalizationTraits;\n\n /**\n * @notice total amount of tokens minted till now\n */\n uint256 totalSupply;\n }\n\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.NFTCollection\n bytes32 internal constant NFT_COLLECTION_STORAGE_LOCATION =\n 0x54137d560768c3c24834e09621a4fafd063f4a5812823197e84bcd3fbaff7d00;\n\n function _getNFTCollectionStorage() private pure returns (NFTCollectionStorage storage $) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n $.slot := NFT_COLLECTION_STORAGE_LOCATION\n }\n }\n\n /**\n * @notice mitigate a possible Implementation contract takeover, as indicate by\n * https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n /**\n * @notice external entry point initialization function in accordance with the upgradable pattern\n * @dev calls all the init functions from the base classes. Emits {ContractInitialized} event\n * @param _collectionOwner the address that will be set as the owner of the collection\n * @param _initialBaseURI an URI that will be used as the base for token URI\n * @param _name name of the ERC721 token\n * @param _symbol token symbol of the ERC721 token\n * @param _mintTreasury collection treasury address (where the payments are sent)\n * @param _signAddress signer address that is allowed to create mint signatures\n * @param _initialTrustedForwarder trusted forwarder address\n * @param _allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\n * @param _maxSupply max supply of tokens to be allowed to be minted per contract\n */\n function initialize(\n address _collectionOwner,\n string calldata _initialBaseURI,\n string memory _name,\n string memory _symbol,\n address payable _mintTreasury,\n address _signAddress,\n address _initialTrustedForwarder,\n IERC20Metadata _allowedToExecuteMint,\n uint256 _maxSupply\n ) external virtual initializer {\n __NFTCollection_init(\n _collectionOwner,\n _initialBaseURI,\n _name,\n _symbol,\n _mintTreasury,\n _signAddress,\n _initialTrustedForwarder,\n _allowedToExecuteMint,\n _maxSupply\n );\n }\n\n /**\n * @notice initialization function in accordance with the upgradable pattern\n * @dev calls all the init functions from the base classes. Emits {ContractInitialized} event\n * @param _collectionOwner the address that will be set as the owner of the collection\n * @param _initialBaseURI an URI that will be used as the base for token URI\n * @param _name name of the ERC721 token\n * @param _symbol token symbol of the ERC721 token\n * @param _mintTreasury collection treasury address (where the payments are sent)\n * @param _signAddress signer address that is allowed to create mint signatures\n * @param _initialTrustedForwarder trusted forwarder address\n * @param _allowedToExecuteMint token address that is used for payments and that is allowed to execute mint\n * @param _maxSupply max supply of tokens to be allowed to be minted per contract\n */\n function __NFTCollection_init(\n address _collectionOwner,\n string calldata _initialBaseURI,\n string memory _name,\n string memory _symbol,\n address payable _mintTreasury,\n address _signAddress,\n address _initialTrustedForwarder,\n IERC20Metadata _allowedToExecuteMint,\n uint256 _maxSupply\n ) internal onlyInitializing {\n if (bytes(_name).length == 0) {\n revert InvalidName(_name);\n }\n if (bytes(_symbol).length == 0) {\n revert InvalidSymbol(_symbol);\n }\n __ReentrancyGuard_init();\n // We don't want to set the owner to _msgSender, so, we call _transferOwnership instead of __Ownable_init\n _transferOwnership(_collectionOwner);\n __ERC2981_init();\n _setTrustedForwarder(_initialTrustedForwarder);\n __ERC721_init(_name, _symbol);\n __Pausable_init();\n _setBaseURI(_initialBaseURI);\n _setTreasury(_mintTreasury);\n _setSignAddress(_signAddress);\n _setAllowedExecuteMint(_allowedToExecuteMint);\n _setMaxSupply(_maxSupply);\n\n emit ContractInitialized(\n _initialBaseURI,\n _name,\n _symbol,\n _mintTreasury,\n _signAddress,\n _allowedToExecuteMint,\n _maxSupply\n );\n }\n\n /**\n * @notice function to setup a new wave. A wave is defined as a combination of allowed number tokens to be\n * minted in total, per wallet and minting price\n * @param _waveMaxTokensOverall the allowed number of tokens to be minted in this wave (cumulative by all minting wallets)\n * @param _waveMaxTokensPerWallet max tokens to buy, per wallet in a given wave\n * @param _waveSingleTokenPrice the price to mint a token in a given wave, in wei\n * denoted by the allowedToExecuteMint contract\n */\n function setupWave(\n uint256 _waveMaxTokensOverall,\n uint256 _waveMaxTokensPerWallet,\n uint256 _waveSingleTokenPrice\n ) external onlyOwner {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (_waveMaxTokensOverall > $.maxSupply ||\n _waveMaxTokensOverall == 0 ||\n _waveMaxTokensPerWallet == 0 ||\n _waveMaxTokensPerWallet > _waveMaxTokensOverall\n ) {\n revert InvalidWaveData(_waveMaxTokensOverall, _waveMaxTokensPerWallet);\n }\n uint256 waveIndex = $.waveData.length;\n emit WaveSetup(_msgSender(), _waveMaxTokensOverall, _waveMaxTokensPerWallet, _waveSingleTokenPrice, waveIndex);\n $.waveData.push();\n $.waveData[waveIndex].waveMaxTokensOverall = _waveMaxTokensOverall;\n $.waveData[waveIndex].waveMaxTokensPerWallet = _waveMaxTokensPerWallet;\n $.waveData[waveIndex].waveSingleTokenPrice = _waveSingleTokenPrice;\n }\n\n /**\n * @notice token minting function on the last wave. Price is set by wave and is paid in tokens denoted\n * by the allowedToExecuteMint contract\n * @param wallet minting wallet\n * @param amount number of token to mint\n * @param signatureId signing signature ID\n * @param signature signing signature value\n * @dev this method is backward compatible with the previous contract, so, it uses last configured wave\n */\n function mint(\n address wallet,\n uint256 amount,\n uint256 signatureId,\n bytes calldata signature\n ) external whenNotPaused nonReentrant {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n uint256 waveIndex = $.waveData.length;\n if (waveIndex == 0) {\n revert ContractNotConfigured();\n }\n if (_msgSender() != address($.allowedToExecuteMint)) {\n revert ERC721InvalidSender(_msgSender());\n }\n _checkAndSetMintSignature(wallet, signatureId, signature);\n WaveData storage waveData = $.waveData[waveIndex - 1];\n _doMint(waveData, wallet, amount);\n }\n\n /**\n * @notice token minting function on a certain wave. Price is set by wave and is paid in tokens denoted\n * by the allowedToExecuteMint contract\n * @param wallet minting wallet\n * @param amount number of token to mint\n * @param waveIndex the index of the wave used to mint\n * @param signatureId signing signature ID\n * @param signature signing signature value\n */\n function waveMint(\n address wallet,\n uint256 amount,\n uint256 waveIndex,\n uint256 signatureId,\n bytes calldata signature\n ) external whenNotPaused nonReentrant {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if ($.waveData.length == 0) {\n revert ContractNotConfigured();\n }\n if (_msgSender() != address($.allowedToExecuteMint)) {\n revert ERC721InvalidSender(_msgSender());\n }\n _checkAndSetWaveMintSignature(wallet, amount, waveIndex, signatureId, signature);\n WaveData storage waveData = _getWaveData(waveIndex);\n _doMint(waveData, wallet, amount);\n }\n\n /**\n * @notice function to setup wave parameters. A wave is defined as a combination of allowed number tokens to be\n * minted in total, per wallet and minting price\n * @param waveIndex the index of the wave to be canceled\n */\n function cancelWave(uint256 waveIndex) external onlyOwner {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n /// @dev don't use _getWaveData, we don't want to cancel the last wave by mistake\n if (waveIndex >= $.waveData.length) {\n revert ContractNotConfigured();\n }\n $.waveData[waveIndex].waveMaxTokensOverall = 0;\n }\n\n /**\n * @notice batch minting function, used by owner to airdrop directly to users.\n * @dev this methods takes a list of destination wallets and can only be used by the owner of the contract\n * @param waveIndex the index of the wave used to mint\n * @param wallets list of destination wallets and amounts\n */\n function batchMint(uint256 waveIndex, BatchMintingData[] calldata wallets) external whenNotPaused onlyOwner {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n uint256 len = wallets.length;\n if (len == 0) {\n revert InvalidBatchData();\n }\n if ($.waveData.length == 0) {\n revert ContractNotConfigured();\n }\n WaveData storage waveData = _getWaveData(waveIndex);\n for (uint256 i; i < len; i++) {\n uint256 _totalSupply = $.totalSupply;\n address wallet = wallets[i].wallet;\n uint256 amount = wallets[i].amount;\n if (!_isMintAllowed($, waveData, wallet, amount)) {\n revert CannotMint(wallet, amount);\n }\n for (uint256 j; j < amount; j++) {\n // @dev _mint already checks the destination wallet\n // @dev start with tokenId = 1\n _mint(wallet, _totalSupply + j + 1);\n }\n waveData.waveOwnerToClaimedCounts[wallet] += amount;\n waveData.waveTotalMinted += amount;\n $.totalSupply += amount;\n }\n }\n\n /**\n * @notice helper function to emit the {MetadataUpdate} event in order for marketplaces to, on demand,\n * refresh metadata, for the provided token ID. Off-chain, gaming mechanics are done and this\n * function is ultimately called to signal the end of a reveal.\n * @dev will revert if owner of token is not caller or if signature is not valid\n * @param tokenId the ID belonging to the NFT token for which to emit the event\n * @param signatureId validation signature ID\n * @param signature validation signature\n */\n function reveal(\n uint256 tokenId,\n uint256 signatureId,\n bytes calldata signature\n ) external whenNotPaused {\n address sender = _msgSender();\n address owner = ownerOf(tokenId);\n if (owner != sender) {\n revert ERC721IncorrectOwner(sender, tokenId, owner);\n }\n _checkAndSetRevealSignature(sender, signatureId, signature);\n emit MetadataUpdate(tokenId);\n }\n\n /**\n * @notice personalize token traits according to the provided personalization bit-mask\n * @dev after checks, it is reduced to personalizationTraits[_tokenId] = _personalizationMask\n * @param tokenId what token to personalize\n * @param personalizationMask a mask where each bit has a custom meaning in-game\n * @param signatureId the ID of the provided signature\n * @param signature signing signature\n */\n function personalize(\n uint256 tokenId,\n uint256 personalizationMask,\n uint256 signatureId,\n bytes calldata signature\n ) external whenNotPaused {\n address sender = _msgSender();\n address owner = ownerOf(tokenId);\n if (owner != sender) {\n revert ERC721IncorrectOwner(sender, tokenId, owner);\n }\n _checkAndSetPersonalizationSignature(sender, tokenId, personalizationMask, signatureId, signature);\n _updateTokenTraits(tokenId, personalizationMask);\n }\n\n /**\n * @notice personalize token traits but can be called by owner or special roles address\n * Used to change the traits of a token based on an in-game action\n * @dev reverts if token does not exist or if not authorized\n * @param tokenId what token to personalize\n * @param personalizationMask a mask where each bit has a custom meaning in-game\n */\n function operatorPersonalize(uint256 tokenId, uint256 personalizationMask) external onlyOwner\n {\n address owner = _ownerOf(tokenId);\n if (owner == address(0)) {\n revert ERC721NonexistentToken(tokenId);\n }\n _updateTokenTraits(tokenId, personalizationMask);\n }\n\n /**\n * @notice Burns `tokenId`. The caller must own `tokenId` or be an approved operator.\n * @dev See {ERC721BurnMemoryEnumerableUpgradeable.burn}.\n * @param tokenId the token id to be burned\n */\n function burn(uint256 tokenId) external whenNotPaused {\n _burnWithCheck(tokenId);\n }\n\n /**\n * @notice enables burning of tokens\n * @dev reverts if burning already enabled.\n */\n function enableBurning() external onlyOwner {\n _enableBurning();\n }\n\n /**\n * @notice disables burning of tokens\n * @dev reverts if burning already disabled.\n */\n function disableBurning() external onlyOwner {\n _disableBurning();\n }\n\n /**\n * @notice pauses the contract\n * @dev reverts if not owner of the collection or if not un-paused\n */\n function pause() external onlyOwner {\n _requireNotPaused();\n _pause();\n }\n\n /**\n * @notice unpauses the contract\n * @dev reverts if not owner of the collection or if not paused\n */\n function unpause() external onlyOwner {\n _requirePaused();\n _unpause();\n }\n\n /**\n * @notice update the treasury address\n * @param treasury new treasury address to be saved\n */\n function setTreasury(address treasury) external onlyOwner {\n _setTreasury(treasury);\n }\n\n /**\n * @notice updates the sign address.\n * @param _signAddress new signer address to be set\n */\n function setSignAddress(address _signAddress) external onlyOwner {\n _setSignAddress(_signAddress);\n }\n\n /**\n * @notice updates the sign address.\n * @param _maxSupply maximum amount of tokens that can be minted\n */\n function setMaxSupply(uint256 _maxSupply) external onlyOwner {\n _setMaxSupply(_maxSupply);\n }\n\n /**\n * @notice updates which address is allowed to execute the mint function.\n * @dev also resets default mint price\n * @param minterToken the address that will be allowed to execute the mint function\n */\n function setAllowedExecuteMint(IERC20Metadata minterToken) external onlyOwner {\n _setAllowedExecuteMint(minterToken);\n }\n\n /**\n * @notice updates the base token URI for the contract\n * @param baseURI an URI that will be used as the base for token URI\n */\n function setBaseURI(string calldata baseURI) external onlyOwner {\n _setBaseURI(baseURI);\n // Refreshes the whole collection (https://docs.opensea.io/docs/metadata-standards#metadata-updates)\n emit BatchMetadataUpdate(0, type(uint256).max);\n }\n\n /**\n * @notice sets filter registry address deployed in test\n * @param registry the address of the registry\n */\n function setOperatorRegistry(address registry) external virtual onlyOwner {\n _setOperatorRegistry(registry);\n }\n\n /**\n * @notice set the trusted forwarder\n * @param forwarder the new trusted forwarder address\n * @dev address(0) disables the forwarder\n */\n function setTrustedForwarder(address forwarder) external virtual onlyOwner {\n _setTrustedForwarder(forwarder);\n }\n\n /**\n * @notice This function is used to register Land contract on the Operator Filterer Registry of Opensea.\n * @param subscriptionOrRegistrantToCopy registration address of the list to subscribe.\n * @param subscribe bool to signify subscription 'true' or to copy the list 'false'.\n * @dev subscriptionOrRegistrantToCopy == address(0), just register\n */\n function register(address subscriptionOrRegistrantToCopy, bool subscribe) external onlyOwner {\n _register(subscriptionOrRegistrantToCopy, subscribe);\n }\n\n /**\n * @notice Transfer many tokens between 2 addresses, while ensuring the receiving contract has a receiver method.\n * @param from The sender of the token.\n * @param to The recipient of the token.\n * @param ids The ids of the tokens.\n * @param data Additional data.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n bytes calldata data\n ) external virtual onlyAllowedOperator(from) {\n if (to == address(0)) {\n revert ERC721InvalidReceiver(address(0));\n }\n address msgSender = _msgSender();\n uint256 numTokens = ids.length;\n for (uint256 i = 0; i < numTokens; i++) {\n uint256 tokenId = ids[i];\n // Setting an \"auth\" arguments enables the `_isAuthorized` check which verifies that the token exists\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\n address previousOwner = _update(to, tokenId, msgSender);\n if (previousOwner != from) {\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n }\n _checkOnERC721ReceivedImpl(from, to, tokenId, data);\n }\n }\n\n /**\n * @notice Transfer many tokens between 2 addresses.\n * @param from The sender of the token.\n * @param to The recipient of the token.\n * @param ids The ids of the tokens.\n */\n function batchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids\n ) external virtual onlyAllowedOperator(from) {\n if (to == address(0)) {\n revert ERC721InvalidReceiver(address(0));\n }\n address msgSender = _msgSender();\n uint256 numTokens = ids.length;\n for (uint256 i = 0; i < numTokens; i++) {\n uint256 tokenId = ids[i];\n // Setting an \"auth\" arguments enables the `_isAuthorized` check which verifies that the token exists\n // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\n address previousOwner = _update(to, tokenId, msgSender);\n if (previousOwner != from) {\n revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n }\n }\n }\n\n /**\n * @notice Sets the royalty information that all ids in this contract will default to.\n * @param receiver the receiver of the royalties\n * @param feeNumerator percentage of the royalties in feeDenominator units\n */\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyOwner {\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\n emit DefaultRoyaltySet(_msgSender(), receiver, feeNumerator);\n _setDefaultRoyalty(receiver, feeNumerator);\n }\n\n /**\n * @notice Removes default royalty information.\n */\n function resetDefaultRoyalty() external onlyOwner {\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\n emit DefaultRoyaltyReset(_msgSender());\n _deleteDefaultRoyalty();\n }\n\n /**\n * @notice Sets the royalty information for a specific token id, overriding the global default.\n * @param tokenId the tokenId for\n * @param receiver the receiver of the royalties\n * @param feeNumerator percentage of the royalties in feeDenominator units\n */\n function setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) external onlyOwner {\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\n emit TokenRoyaltySet(_msgSender(), tokenId, receiver, feeNumerator);\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\n }\n\n /**\n * @notice Resets royalty information for the token id back to the global default.\n */\n function resetTokenRoyalty(uint256 tokenId) external onlyOwner {\n /// @dev ERC2981Upgradeable don't emit and don't give access to the old value\n emit TokenRoyaltyReset(_msgSender(), tokenId);\n _resetTokenRoyalty(tokenId);\n }\n\n /**\n * @dev See OpenZeppelin {IERC721-setApprovalForAll}\n */\n function setApprovalForAll(address operator, bool approved)\n public\n override\n onlyAllowedOperatorApproval(operator)\n {\n super.setApprovalForAll(operator, approved);\n }\n\n /**\n * @dev See OpenZeppelin {IERC721-approve}\n */\n function approve(address operator, uint256 tokenId)\n public\n override\n onlyAllowedOperatorApproval(operator)\n {\n super.approve(operator, tokenId);\n }\n\n /**\n * @dev See OpenZeppelin {IERC721-transferFrom}\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public override onlyAllowedOperator(from) {\n super.transferFrom(from, to, tokenId);\n }\n\n /**\n * @dev See OpenZeppelin {IERC721-safeTransferFrom}\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public override onlyAllowedOperator(from) {\n super.safeTransferFrom(from, to, tokenId, data);\n }\n\n /**\n * @notice get the personalization of the indicated tokenID\n * @param tokenId the token ID to check\n * @return the personalization data as uint256\n */\n function personalizationOf(uint256 tokenId) external view returns (uint256) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.personalizationTraits[tokenId];\n }\n\n /**\n * @notice check if the indicated wallet can mint the indicated amount\n * @param wallet wallet to be checked if it can mint\n * @param amount amount to be checked if can be minted\n * @param waveIndex the index of the wave used to mint\n * @return if can mint or not\n */\n function isMintAllowed(uint256 waveIndex, address wallet, uint256 amount) external view returns (bool) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (waveIndex >= $.waveData.length) {\n return false;\n }\n WaveData storage waveData = $.waveData[waveIndex];\n return _isMintAllowed($, waveData, wallet, amount);\n }\n\n /**\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\n * override.\n */\n function feeDenominator() external pure virtual returns (uint96) {\n return _feeDenominator();\n }\n\n /**\n * @notice helper automation function\n * @return current chainID for the blockchain\n */\n function chain() external view returns (uint256) {\n return block.chainid;\n }\n\n /**\n * @notice return maximum amount of tokens that can be minted\n */\n function maxSupply() external view returns (uint256) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.maxSupply;\n }\n\n /**\n * @notice return treasury address where the payment for minting are sent\n */\n function mintTreasury() external view returns (address) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.mintTreasury;\n }\n\n /**\n * @notice return standard base token URL for ERC721 metadata\n */\n function baseTokenURI() external view returns (string memory) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.baseTokenURI;\n }\n\n /**\n * @notice return max tokens to buy per wave, cumulating all addresses\n * @param waveIndex the index of the wave used to mint\n */\n function waveMaxTokensOverall(uint256 waveIndex) external view returns (uint256) {\n WaveData storage waveData = _getWaveData(waveIndex);\n return waveData.waveMaxTokensOverall;\n }\n\n /**\n * @notice return max tokens to buy, per wallet in a given wave\n * @param waveIndex the index of the wave used to mint\n */\n function waveMaxTokensPerWallet(uint256 waveIndex) external view returns (uint256) {\n WaveData storage waveData = _getWaveData(waveIndex);\n return waveData.waveMaxTokensPerWallet;\n }\n\n /**\n * @notice return price of one token mint (in the token denoted by the allowedToExecuteMint contract)\n * @param waveIndex the index of the wave used to mint\n */\n function waveSingleTokenPrice(uint256 waveIndex) external view returns (uint256) {\n WaveData storage waveData = _getWaveData(waveIndex);\n return waveData.waveSingleTokenPrice;\n }\n\n /**\n * @notice return number of total minted tokens in the current running wave\n * @param waveIndex the index of the wave used to mint\n */\n function waveTotalMinted(uint256 waveIndex) external view returns (uint256) {\n WaveData storage waveData = _getWaveData(waveIndex);\n return waveData.waveTotalMinted;\n }\n\n /**\n * @notice return mapping of [owner -> wave index -> minted count]\n * @param waveIndex the index of the wave used to mint\n * @param owner the owner for which the count is returned\n */\n function waveOwnerToClaimedCounts(uint256 waveIndex, address owner) external view returns (uint256) {\n WaveData storage waveData = _getWaveData(waveIndex);\n return waveData.waveOwnerToClaimedCounts[owner];\n }\n\n /**\n * @notice the total amount of waves configured till now\n */\n function waveCount() external view returns (uint256) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.waveData.length;\n }\n\n /**\n * @notice return ERC20 contract through which the minting will be done (approveAndCall)\n */\n function allowedToExecuteMint() external view returns (IERC20) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.allowedToExecuteMint;\n }\n\n /**\n * @notice return the total amount of tokens minted till now\n */\n function totalSupply() external view returns (uint256) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.totalSupply;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId)\n public\n view\n virtual\n override(ERC2981Upgradeable, ERC721Upgradeable)\n returns (bool)\n {\n return super.supportsInterface(interfaceId);\n }\n\n /**\n * @notice complete the minting called from waveMint and mint\n * @param waveData the data of the wave used to mint\n * @param wallet minting wallet\n * @param amount number of token to mint\n */\n function _doMint(WaveData storage waveData, address wallet, uint256 amount) internal {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (!_isMintAllowed($, waveData, wallet, amount)) {\n revert CannotMint(wallet, amount);\n }\n uint256 _price = waveData.waveSingleTokenPrice * amount;\n if (_price > 0) {\n SafeERC20.safeTransferFrom($.allowedToExecuteMint, wallet, $.mintTreasury, _price);\n }\n uint256 _totalSupply = $.totalSupply;\n for (uint256 i; i < amount; i++) {\n // @dev _safeMint already checks the destination _wallet\n // @dev start with tokenId = 1\n _safeMint(wallet, _totalSupply + i + 1);\n }\n waveData.waveOwnerToClaimedCounts[wallet] += amount;\n waveData.waveTotalMinted += amount;\n $.totalSupply += amount;\n }\n\n /**\n * @notice return true if the indicated wallet can mint the indicated amount\n * @param $ storage access\n * @param waveData wave data used to check\n * @param wallet wallet to be checked if it can mint\n * @param amount amount to be checked if can be minted\n */\n function _isMintAllowed(NFTCollectionStorage storage $, WaveData storage waveData, address wallet, uint256 amount) internal view returns (bool) {\n return amount > 0\n && (waveData.waveTotalMinted + amount <= waveData.waveMaxTokensOverall)\n && (waveData.waveOwnerToClaimedCounts[wallet] + amount <= waveData.waveMaxTokensPerWallet)\n && $.totalSupply + amount <= $.maxSupply;\n }\n\n /**\n * @notice a helper function to ensure consistency when waveIndex is passed as argument to an external function\n * @param waveIndex the index of the wave used to mint\n * @return waveData the wave data used\n * @dev we accept waveIndex gte to waveData.length so we can access the wave used by mint easily\n */\n function _getWaveData(uint256 waveIndex) internal view returns (WaveData storage waveData){\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n uint256 waveDataLen = $.waveData.length;\n if (waveIndex >= waveDataLen) {\n waveIndex = waveDataLen - 1;\n }\n return $.waveData[waveIndex];\n }\n\n /**\n * @notice get base TokenURI\n * @return baseTokenURI\n */\n function _baseURI() internal view virtual override returns (string memory) {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n return $.baseTokenURI;\n }\n\n /**\n * @notice ERC2771 compatible msg.data getter\n * @return msg.data\n */\n function _msgData() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (bytes calldata) {\n return ERC2771HandlerUpgradeable._msgData();\n }\n\n /**\n * @notice ERC2771 compatible msg.sender getter\n * @return sender msg.sender\n */\n function _msgSender()\n internal\n view\n override(ContextUpgradeable, ERC2771HandlerUpgradeable, UpdatableOperatorFiltererUpgradeable, NFTCollectionSignature)\n returns (address sender)\n {\n sender = ERC2771HandlerUpgradeable._msgSender();\n }\n\n /**\n * @dev ERC-2771 specifies the context as being a single address (20 bytes).\n */\n function _contextSuffixLength() internal view override(ContextUpgradeable, ERC2771HandlerUpgradeable) returns (uint256) {\n return ERC2771HandlerUpgradeable._contextSuffixLength();\n }\n\n /**\n * @notice actually updates the variables that store the personalization traits per token.\n * @dev no checks are done on input validations. Calling functions are expected to do them\n * @param tokenId the ID for the token to personalize\n * @param personalizationMask the personalization mask that will be applied\n */\n function _updateTokenTraits(uint256 tokenId, uint256 personalizationMask) internal {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n $.personalizationTraits[tokenId] = personalizationMask;\n emit Personalized(_msgSender(), tokenId, personalizationMask);\n emit MetadataUpdate(tokenId);\n }\n\n /**\n * @notice verifies it the provided address is a smart contract (by code size)\n * @dev can be bypassed if called from contract constructors\n * @param account account address to verify if it is a contract\n */\n function _isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n return account.code.length > 0;\n }\n\n /**\n * @notice updates the base token URI for the contract\n * @param baseURI an URI that will be used as the base for token URI\n */\n function _setBaseURI(string calldata baseURI) internal {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (bytes(baseURI).length == 0) {\n revert InvalidBaseTokenURI(baseURI);\n }\n emit BaseURISet(_msgSender(), $.baseTokenURI, baseURI);\n $.baseTokenURI = baseURI;\n }\n\n /**\n * @notice update the treasury address\n * @param _treasury new treasury address to be saved\n */\n function _setTreasury(address _treasury) internal {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (_treasury == address(0)) {\n revert InvalidTreasury(_treasury);\n }\n emit TreasurySet(_msgSender(), $.mintTreasury, _treasury);\n $.mintTreasury = _treasury;\n }\n\n /**\n * @notice updates which address is allowed to execute the mint function.\n * @dev also resets default mint price\n * @param _minterToken the address that will be allowed to execute the mint function\n */\n function _setAllowedExecuteMint(IERC20Metadata _minterToken) internal {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (!_isContract(address(_minterToken))) {\n revert InvalidAllowedToExecuteMint(_minterToken);\n }\n emit AllowedExecuteMintSet(_msgSender(), $.allowedToExecuteMint, _minterToken);\n $.allowedToExecuteMint = _minterToken;\n }\n\n /**\n * @notice updates maximum supply\n * @param _maxSupply maximum amount of tokens that can be minted\n */\n function _setMaxSupply(uint256 _maxSupply) internal {\n NFTCollectionStorage storage $ = _getNFTCollectionStorage();\n if (_maxSupply == 0) {\n revert LowMaxSupply(0, $.totalSupply);\n }\n if (_maxSupply < $.totalSupply) {\n revert LowMaxSupply(_maxSupply, $.totalSupply);\n }\n emit MaxSupplySet(_msgSender(), $.maxSupply, _maxSupply);\n $.maxSupply = _maxSupply;\n }\n\n /**\n * @notice taken from ERC721Upgradeable because it is declared private.\n * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the\n * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n */\n function _checkOnERC721ReceivedImpl(address from, address to, uint256 tokenId, bytes memory data) private {\n if (to.code.length > 0) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n if (retval != IERC721Receiver.onERC721Received.selector) {\n revert ERC721InvalidReceiver(to);\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert ERC721InvalidReceiver(to);\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n }\n }\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/nft-collection/NFTCollectionSignature.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.26;\n\nimport {ECDSA} from \"@openzeppelin/contracts-5.0.2/utils/cryptography/ECDSA.sol\";\n\n/**\n * @title NFTCollectionSignature\n * @author The Sandbox\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice Signatures accepted by the NFTCollection\n * @dev We have a set of different signatures to be backward compatible with previous collections\n * @dev We must be sure that all the signatures are different and cannot be reused by different methods, so,\n * @dev we added an extra constant string to reveal to distinguish it from the mint signature.\n * @dev mint: ['address', 'uint256', 'address', 'uint256']\n * @dev reveal: ['address', 'uint256', 'address', 'uint256', 'string']\n * @dev personalize: ['address', 'uint256', 'address', 'uint256', 'uint256', 'uint256']\n * @dev waveMint: ['address', 'uint256', 'uint256', 'uint256', 'address', 'uint256']\n */\nabstract contract NFTCollectionSignature {\n enum SignatureType {\n Unused,\n Mint,\n Personalization,\n Reveal,\n WaveMint\n }\n\n struct NFTCollectionSignatureStorage {\n\n /**\n * @notice all signatures must come from this specific address, otherwise they are invalid\n */\n address signAddress;\n\n /**\n * @notice map used to mark if a specific signatureId was used\n * values are 0 (default, unused) and 1 (used)\n * Used to avoid a signature reuse\n */\n mapping(uint256 => SignatureType) signatureIds;\n }\n\n /**\n * @notice Event emitted when the signer address was set or changed\n * @dev emitted when setSignAddress is called\n * @param operator the sender of the transaction\n * @param oldSignAddress old signer address that is allowed to create mint signatures\n * @param newSignAddress new signer address that is allowed to create mint signatures\n */\n event SignAddressSet(address indexed operator, address indexed oldSignAddress, address indexed newSignAddress);\n\n /**\n * @notice The operation failed because signature is invalid or it was already used\n * @param signatureId the ID of the provided signature\n */\n error InvalidSignature(uint256 signatureId);\n\n /**\n * @notice The operation failed because the signAddress is wrong\n * @param signAddress signer address that is allowed to create mint signatures\n */\n error InvalidSignAddress(address signAddress);\n\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.NFTCollectionSignature\n bytes32 internal constant NFT_COLLECTION_SIGNATURE_STORAGE_LOCATION =\n 0x40778db7ee4c29e622e04906f2c4ade86f805ca9734a7b64bb0f84f333357900;\n\n function _getNFTCollectionSignatureStorage() private pure returns (NFTCollectionSignatureStorage storage $) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n $.slot := NFT_COLLECTION_SIGNATURE_STORAGE_LOCATION\n }\n }\n\n /**\n * @notice return the address from which all signatures must come from this specific address, otherwise they are invalid\n */\n function signAddress() external view returns (address) {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n return $.signAddress;\n }\n\n /**\n * @notice return true if the signature id was used\n * @param signatureId signing signature ID\n */\n function getSignatureType(uint256 signatureId) external view returns (SignatureType) {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n return $.signatureIds[signatureId];\n }\n\n /**\n * @notice updates the sign address.\n * @param _signAddress new signer address to be set\n */\n function _setSignAddress(address _signAddress) internal {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n if (_signAddress == address(0)) {\n revert InvalidSignAddress(_signAddress);\n }\n emit SignAddressSet(_msgSender(), $.signAddress, _signAddress);\n $.signAddress = _signAddress;\n }\n\n /**\n * @notice checks that the provided signature is valid, while also taking into\n * consideration the provided address and signatureId.\n * @param wallet address to be used in validating the signature\n * @param signatureId signing signature ID\n * @param signature signing signature value\n */\n function _checkAndSetMintSignature(\n address wallet,\n uint256 signatureId,\n bytes calldata signature\n ) internal {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n if ($.signatureIds[signatureId] != SignatureType.Unused\n || _getMintSignature(wallet, signatureId, address(this), block.chainid, signature) != $.signAddress) {\n revert InvalidSignature(signatureId);\n }\n $.signatureIds[signatureId] = SignatureType.Mint;\n }\n\n /**\n * @notice checks that the provided signature is valid, while also taking into\n * consideration the provided address and signatureId.\n * @param wallet address to be used in validating the signature\n * @param amount number of token to mint\n * @param waveIndex the index of the wave that is used to mint\n * @param signatureId signing signature ID\n * @param signature signing signature value\n */\n function _checkAndSetWaveMintSignature(\n address wallet,\n uint256 amount,\n uint256 waveIndex,\n uint256 signatureId,\n bytes calldata signature\n ) internal {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n if ($.signatureIds[signatureId] != SignatureType.Unused\n || _getWaveMintSignature(wallet, amount, waveIndex, signatureId, address(this), block.chainid, signature) != $.signAddress) {\n revert InvalidSignature(signatureId);\n }\n $.signatureIds[signatureId] = SignatureType.WaveMint;\n }\n\n /**\n * @notice checks that the provided signature is valid, while also taking into\n * consideration the provided address and signatureId.\n * @param wallet address to be used in validating the signature\n * @param signatureId signing signature ID\n * @param signature signing signature value\n */\n function _checkAndSetRevealSignature(\n address wallet,\n uint256 signatureId,\n bytes calldata signature\n ) internal {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n if ($.signatureIds[signatureId] != SignatureType.Unused\n || _getRevealSignature(wallet, signatureId, address(this), block.chainid, signature) != $.signAddress) {\n revert InvalidSignature(signatureId);\n }\n $.signatureIds[signatureId] = SignatureType.Reveal;\n }\n\n\n /**\n * @notice checks that the provided personalization signature is valid, while also taking into\n * consideration the provided address and signatureId.\n * @param wallet address to be used in validating the signature\n * @param signatureId signing signature ID\n * @param signature signing signature value\n * @param tokenId what token to personalize\n * @param personalizationMask a mask where each bit has a custom meaning in-game\n */\n function _checkAndSetPersonalizationSignature(\n address wallet,\n uint256 tokenId,\n uint256 personalizationMask,\n uint256 signatureId,\n bytes calldata signature\n ) internal {\n NFTCollectionSignatureStorage storage $ = _getNFTCollectionSignatureStorage();\n if ($.signatureIds[signatureId] != SignatureType.Unused ||\n _getPersonalizationSignature(\n wallet,\n signatureId,\n address(this),\n block.chainid,\n tokenId,\n personalizationMask,\n signature\n ) != $.signAddress) {\n revert InvalidSignature(signatureId);\n }\n $.signatureIds[signatureId] = SignatureType.Personalization;\n }\n\n\n /**\n * @notice validates signature\n * @param wallet wallet that was used in signature generation\n * @param signatureId id of signature\n * @param contractAddress contract address that was used in signature generation\n * @param chainId chain ID for which the signature was generated\n * @param signature signature\n * @return address that validates the provided signature\n */\n function _getMintSignature(\n address wallet,\n uint256 signatureId,\n address contractAddress,\n uint256 chainId,\n bytes calldata signature\n ) internal pure returns (address) {\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encode(wallet, signatureId, contractAddress, chainId))\n )\n ),\n signature\n );\n }\n\n /**\n * @notice validates signature\n * @param wallet wallet that was used in signature generation\n * @param signatureId id of signature\n * @param contractAddress contract address that was used in signature generation\n * @param chainId chain ID for which the signature was generated\n * @param signature signature\n * @return address that validates the provided signature\n */\n function _getRevealSignature(\n address wallet,\n uint256 signatureId,\n address contractAddress,\n uint256 chainId,\n bytes calldata signature\n ) internal pure returns (address) {\n /// @dev the string \"reveal\" is to distinguish it from the minting signature.\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encode(wallet, signatureId, contractAddress, chainId, \"reveal\"))\n )\n ),\n signature\n );\n }\n\n /**\n * @notice validate personalization mask\n * @param wallet wallet that was used in signature generation\n * @param signatureId id of signature\n * @param contractAddress contract address that was used in signature generation\n * @param chainId chain ID for which the signature was generated\n * @param tokenId token ID for which the signature was generated\n * @param personalizationMask a mask where each bit has a custom meaning in-game\n * @param signature signature\n * @return address that validates the provided signature\n */\n function _getPersonalizationSignature(\n address wallet,\n uint256 signatureId,\n address contractAddress,\n uint256 chainId,\n uint256 tokenId,\n uint256 personalizationMask,\n bytes calldata signature\n ) internal pure returns (address) {\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(\n abi.encode(\n wallet,\n signatureId,\n contractAddress,\n chainId,\n tokenId,\n personalizationMask\n )\n )\n )\n ),\n signature\n );\n }\n\n /**\n * @notice validate a mint signature that includes a waveIndex\n * @param wallet wallet that was used in signature generation\n * @param amount number of token to mint\n * @param waveIndex the index of the wave that is used to mint\n * @param signatureId id of signature\n * @param contractAddress contract address that was used in signature generation\n * @param chainId chain ID for which the signature was generated\n * @param signature signature\n * @return address that validates the provided signature\n */\n function _getWaveMintSignature(\n address wallet,\n uint256 amount,\n uint256 waveIndex,\n uint256 signatureId,\n address contractAddress,\n uint256 chainId,\n bytes calldata signature\n ) internal pure returns (address) {\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(\n abi.encode(\n wallet,\n amount,\n waveIndex,\n signatureId,\n contractAddress,\n chainId\n )\n )\n )\n ),\n signature\n );\n }\n\n /**\n * @notice ERC2771 compatible msg.sender getter\n * @return sender msg.sender\n */\n function _msgSender() internal view virtual returns (address);\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/nft-collection/UpdatableOperatorFiltererUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable one-contract-per-file\npragma solidity 0.8.26;\n\n/**\n * @title UpdatableOperatorFiltererUpgradeable\n * @author The Sandbox\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice This contract would subscribe or copy or just to the subscription provided or just register to\n * default subscription list\n * @dev This contract is the upgradeable version of the OpenSea implementation\n * https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/OperatorFilterer.sol\n * and adapted to the 0.5.9 solidity version\n * To avoid an extra IOperatorFilterRegistry file for a code that is deprecated the interface is added below\n */\nabstract contract UpdatableOperatorFiltererUpgradeable {\n struct UpdatableOperatorFiltererUpgradeableStorage {\n /**\n * @notice the registry filter\n */\n IOperatorFilterRegistry operatorFilterRegistry;\n }\n\n /// @custom:storage-location erc7201:thesandbox.storage.avatar.nft-collection.UpdatableOperatorFiltererUpgradeable\n bytes32 internal constant UPDATABLE_OPERATOR_FILTERER_UPGRADABLE_STORAGE_LOCATION =\n 0x71a93d37b91262fe5ff5f64b534078b04fa3ca1f04b63abeac7b60ede712e800;\n\n function _getUpdatableOperatorFiltererUpgradeableStorage() private pure returns (UpdatableOperatorFiltererUpgradeableStorage storage $) {\n // solhint-disable-next-line no-inline-assembly\n assembly {\n $.slot := UPDATABLE_OPERATOR_FILTERER_UPGRADABLE_STORAGE_LOCATION\n }\n }\n\n /**\n * @notice emitted when a registry is set\n * @param operator the sender of the transaction\n * @param oldRegistry address of the old registry\n * @param newRegistry address of the new registry to set\n */\n event OperatorRegistrySet(address indexed operator, IOperatorFilterRegistry indexed oldRegistry, address indexed newRegistry);\n\n /**\n * @notice emitted when the contract is registered into the registry\n * @param operator the sender of the transaction\n * @param registry address of the registry to set\n * @param subscriptionOrRegistrant address to subscribe or copy entries from\n * @param subscribe should it subscribe\n */\n event ContractRegistered(\n address indexed operator,\n IOperatorFilterRegistry indexed registry,\n address indexed subscriptionOrRegistrant,\n bool subscribe\n );\n\n /**\n * @notice the caller is not the operator\n * @param operator that does the call\n */\n error OperatorNotAllowed(address operator);\n\n /**\n * @notice the registry is not configured\n * @param operator that does the call\n */\n error RegistryNotSet(address operator);\n\n /**\n * @notice this contract is already registered\n * @param operator that does the call\n */\n error AlreadyRegistered(address operator);\n\n /**\n * @notice Used in approval operations to check if the operator is allowed to call this contract\n * @param operator The address receiving the approval\n */\n modifier onlyAllowedOperatorApproval(address operator) virtual {\n _checkIsOperatorAllowed(address(this), operator);\n _;\n }\n\n /**\n * @notice Used in transfer from operations to check if the sender of the token is allowed to call this contract\n * @param from the sender of the token\n */\n modifier onlyAllowedOperator(address from) virtual {\n // Allow spending tokens from addresses with balance (from == _msgSender())\n // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred\n // from an EOA.\n if (from != _msgSender()) {\n _checkIsOperatorAllowed(address(this), _msgSender());\n }\n _;\n }\n\n /**\n * @notice return the operatorFilterRegistry address\n */\n function operatorFilterRegistry() external view returns (IOperatorFilterRegistry) {\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\n return $.operatorFilterRegistry;\n }\n\n /**\n * @notice Register this contract into the registry\n * @param subscriptionOrRegistrantToCopy address to subscribe or copy entries from\n * @param subscribe should it subscribe\n */\n function _register(address subscriptionOrRegistrantToCopy, bool subscribe) internal {\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\n IOperatorFilterRegistry registry = $.operatorFilterRegistry;\n bool isContract = address(registry).code.length > 0;\n if (!isContract) {\n revert RegistryNotSet(_msgSender());\n }\n if (registry.isRegistered(address(this))) {\n revert AlreadyRegistered(_msgSender());\n }\n\n if (subscribe) {\n registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);\n } else if (subscriptionOrRegistrantToCopy != address(0)) {\n registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);\n } else {\n registry.register(address(this));\n }\n emit ContractRegistered(_msgSender(), registry, subscriptionOrRegistrantToCopy, subscribe);\n }\n\n /**\n * @notice sets filter registry address deployed in test\n * @param registry the address of the registry\n * @dev address(0) disables the registry\n */\n function _setOperatorRegistry(address registry) internal {\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\n emit OperatorRegistrySet(_msgSender(), $.operatorFilterRegistry, registry);\n $.operatorFilterRegistry = IOperatorFilterRegistry(registry);\n }\n\n /**\n * @notice Check if the operator is allowed for the given registrant\n * @param registrant address of the registrant\n * @param operator operator address to check\n */\n function _checkIsOperatorAllowed(address registrant, address operator) internal view {\n UpdatableOperatorFiltererUpgradeableStorage storage $ = _getUpdatableOperatorFiltererUpgradeableStorage();\n // Check registry code length to facilitate testing in environments without a deployed registry.\n IOperatorFilterRegistry registry = $.operatorFilterRegistry;\n if (address(registry).code.length > 0) {\n /* solhint-disable no-empty-blocks */\n try registry.isOperatorAllowed(registrant, operator) returns (bool retval) {\n if (retval) {\n return;\n }\n } catch (bytes memory) {}\n /* solhint-enable no-empty-blocks */\n revert OperatorNotAllowed(operator);\n }\n }\n\n /**\n * @notice ERC2771 compatible msg.sender getter\n * @return sender msg.sender\n */\n function _msgSender() internal view virtual returns (address);\n}\n\n/**\n * @title IOperatorFilterRegistry\n * @author Opensea\n * @custom:security-contact contact-blockchain@sandbox.game\n * @notice Based on the opensea registry implementation, added here to be used specifically and\n * @notice just once in UpdatableOperatorFiltererUpgradeable\n * @dev see: https://github.com/ProjectOpenSea/operator-filter-registry/tree/main\n */\ninterface IOperatorFilterRegistry {\n /**\n * @notice Returns true if an address has registered\n * @param addr the address to check if it is registered\n */\n function isRegistered(address addr) external returns (bool);\n\n /**\n * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns\n * true if supplied registrant address is not registered.\n * @param registrant the address of the contract to check for (usually address(this))\n * @param operator the operator to check if it is registered for this registrant\n */\n function isOperatorAllowed(address registrant, address operator) external view returns (bool);\n\n\n /**\n * @notice Registers an address with the registry and \"subscribes\" to another address's filtered operators and codeHashes.\n * @param registrant the address of the contract to check for (usually address(this))\n * @param subscription address to subscribe to\n */\n function registerAndSubscribe(address registrant, address subscription) external;\n\n /**\n * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another\n * address without subscribing.\n * @param registrant the address of the contract to check for (usually address(this))\n * @param registrantToCopy address to copy entries from\n */\n function registerAndCopyEntries(address registrant, address registrantToCopy) external;\n\n /**\n * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.\n * @param registrant the address of the contract to check for (usually address(this))\n */\n function register(address registrant) external;\n}\n\n" + }, + "@sandbox-smart-contracts/avatar/contracts/raffleold/contracts/PeopleOfCrypto.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts-0.8/token/ERC1155/IERC1155.sol\";\nimport \"@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-0.8/token/ERC721/IERC721.sol\";\nimport \"@openzeppelin/contracts-0.8/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts-0.8/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol\";\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol\";\n\n/* solhint-disable max-states-count */\ncontract PeopleOfCrypto is ERC721EnumerableUpgradeable, OwnableUpgradeable, ReentrancyGuard {\n uint256 public constant MAX_SUPPLY = 8_430;\n\n event TogglePaused(bool _pause);\n event Personalized(uint256 _tokenId, uint256 _personalizationMask);\n\n uint256 public waveType = 0;\n uint256 public waveMaxTokens;\n uint256 public waveMaxTokensToBuy;\n uint256 public waveSingleTokenPrice;\n uint256 public waveTotalMinted;\n\n uint256 public erc1155Id;\n address public contractAddress;\n\n mapping(address => mapping(uint256 => uint256)) public waveOwnerToClaimedCounts;\n mapping(uint256 => uint256) public personalizationTraits; // stores the personalization for a tokenId\n uint256 public indexWave;\n uint256 public paused;\n\n mapping(uint256 => uint256) private signatureIds;\n mapping(uint256 => uint256) private availableIds;\n\n address public allowedToExecuteMint;\n address public sandOwner;\n address public signAddress;\n string public baseTokenURI;\n\n function initialize(\n string memory baseURI,\n string memory _name,\n string memory _symbol,\n address payable _sandOwner,\n address _signAddress\n ) public initializer {\n __ERC721_init(_name, _symbol);\n __Ownable_init_unchained();\n setBaseURI(baseURI);\n require(_sandOwner != address(0), \"Sand owner is zero address\");\n sandOwner = _sandOwner;\n signAddress = _signAddress;\n }\n\n function setupWave(\n uint256 _waveType,\n uint256 _waveMaxTokens,\n uint256 _waveMaxTokensToBuy,\n uint256 _waveSingleTokenPrice,\n address _contractAddress,\n uint256 _erc1155Id\n ) external onlyOwner {\n require(_waveType < 3 && _waveMaxTokens > 0 && _waveMaxTokensToBuy > 0, \"Invalid configuration\");\n if (_waveType != 0) {\n require(_contractAddress != address(0x0), \"Invalid contract address\");\n }\n require(_waveMaxTokensToBuy <= _waveMaxTokens, \"Invalid supply configuration\");\n\n waveType = _waveType;\n waveMaxTokens = _waveMaxTokens;\n waveMaxTokensToBuy = _waveMaxTokensToBuy;\n waveSingleTokenPrice = _waveSingleTokenPrice;\n waveTotalMinted = 0;\n contractAddress = _waveType == 0 ? address(0) : _contractAddress;\n erc1155Id = _waveType == 2 ? _erc1155Id : 0;\n indexWave++;\n }\n\n function price(uint256 _count) public view virtual returns (uint256) {\n return waveSingleTokenPrice * _count;\n }\n\n function chain() public view returns (uint256) {\n return block.chainid;\n }\n\n function checkWaveNotComplete(uint256 _amount) internal view returns (bool) {\n return _amount > 0 && waveTotalMinted + _amount <= waveMaxTokens;\n }\n\n function checkLimitNotReached(address _wallet, uint256 _amount) internal view returns (bool) {\n return\n waveOwnerToClaimedCounts[_wallet][indexWave - 1] + _amount <= waveMaxTokensToBuy &&\n totalSupply() + _amount <= MAX_SUPPLY;\n }\n\n function checkMintAllowed(address _wallet, uint256 _amount) public view returns (bool) {\n return checkWaveNotComplete(_amount) && checkLimitNotReached(_wallet, _amount);\n }\n\n function mint(\n address _wallet,\n uint256 _amount,\n uint256 _signatureId,\n bytes memory _signature\n ) external nonReentrant {\n require(indexWave > 0, \"Contract is not configured\");\n require(_msgSender() == allowedToExecuteMint, \"Not allowed\");\n require(paused == 0, \"Contract is paused\");\n require(signatureIds[_signatureId] == 0, \"signatureId already used\");\n require(\n checkSignature(_wallet, _signatureId, address(this), block.chainid, _signature) == signAddress,\n \"Signature failed\"\n );\n\n signatureIds[_signatureId] = 1;\n\n require(checkWaveNotComplete(_amount), \"Wave completed\");\n require(checkLimitNotReached(_wallet, _amount), \"Max allowed\");\n\n if (waveType == 1) {\n require(IERC721(contractAddress).balanceOf(_wallet) > 0, \"No NFT\");\n } else if (waveType == 2) {\n require(IERC1155(contractAddress).balanceOf(_wallet, erc1155Id) > 0, \"No NFT\");\n }\n\n uint256 _price = price(_amount);\n if (_price > 0) {\n SafeERC20.safeTransferFrom(IERC20(_msgSender()), _wallet, sandOwner, _price);\n }\n\n waveOwnerToClaimedCounts[_wallet][indexWave - 1] += _amount;\n\n waveTotalMinted += _amount;\n\n for (uint256 i = 0; i < _amount; i++) {\n uint256 tokenId = getRandomToken(_wallet, totalSupply());\n _safeMint(_wallet, tokenId);\n }\n }\n\n function checkSignature(\n address _wallet,\n uint256 _signatureId,\n address _contractAddress,\n uint256 _chainId,\n bytes memory _signature\n ) public pure returns (address) {\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encode(_wallet, _signatureId, _contractAddress, _chainId))\n )\n ),\n _signature\n );\n }\n\n function checkPersonalizationSignature(\n address _wallet,\n uint256 _signatureId,\n address _contractAddress,\n uint256 _chainId,\n uint256 _tokenId,\n uint256 _personalizationMask,\n bytes memory _signature\n ) public pure returns (address) {\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(\n abi.encode(\n _wallet,\n _signatureId,\n _contractAddress,\n _chainId,\n _tokenId,\n _personalizationMask\n )\n )\n )\n ),\n _signature\n );\n }\n\n // Thx Cyberkongs VX <3\n function getRandomToken(address _wallet, uint256 _totalMinted) private returns (uint256) {\n uint256 remaining = MAX_SUPPLY - _totalMinted;\n uint256 rand =\n uint256(keccak256(abi.encodePacked(_wallet, block.difficulty, block.timestamp, remaining))) % remaining;\n uint256 value = rand;\n\n if (availableIds[rand] != 0) {\n value = availableIds[rand];\n }\n\n if (availableIds[remaining - 1] == 0) {\n availableIds[rand] = remaining - 1;\n } else {\n availableIds[rand] = availableIds[remaining - 1];\n }\n\n return value;\n }\n\n function personalizationOf(uint256 _tokenId) external view returns (uint256) {\n return personalizationTraits[_tokenId];\n }\n\n function toggleSale() external onlyOwner {\n paused = paused == 0 ? 1 : 0;\n emit TogglePaused(paused == 1);\n }\n\n function personalize(\n uint256 _signatureId,\n bytes memory _signature,\n uint256 _tokenId,\n uint256 _personalizationMask\n ) external {\n require(ownerOf(_tokenId) == _msgSender(), \"You must be the owner of the token in order to personalize it\");\n\n require(signatureIds[_signatureId] == 0, \"SignatureId already used\");\n require(\n checkPersonalizationSignature(\n _msgSender(),\n _signatureId,\n address(this),\n block.chainid,\n _tokenId,\n _personalizationMask,\n _signature\n ) == signAddress,\n \"Signature failed\"\n );\n\n signatureIds[_signatureId] = 1;\n\n personalizationTraits[_tokenId] = _personalizationMask;\n emit Personalized(_tokenId, _personalizationMask);\n }\n\n function setAllowedExecuteMint(address _address) external onlyOwner {\n allowedToExecuteMint = _address;\n }\n\n function setSandOwnerAddress(address _owner) external onlyOwner {\n sandOwner = _owner;\n }\n\n function _baseURI() internal view virtual override returns (string memory) {\n return baseTokenURI;\n }\n\n function setBaseURI(string memory baseURI) public onlyOwner {\n baseTokenURI = baseURI;\n }\n\n function setSignAddress(address _signAddress) external onlyOwner {\n signAddress = _signAddress;\n }\n}\n" + }, + "@sandbox-smart-contracts/avatar/contracts/raffleold/contracts/Raffle.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts-0.8/token/ERC1155/IERC1155.sol\";\nimport \"@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts-0.8/token/ERC20/utils/SafeERC20.sol\";\nimport \"@openzeppelin/contracts-0.8/token/ERC721/extensions/ERC721Enumerable.sol\";\nimport \"@openzeppelin/contracts-0.8/access/Ownable.sol\";\nimport \"@openzeppelin/contracts-0.8/utils/cryptography/ECDSA.sol\";\nimport \"@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol\";\n\n// @author: Miinded x The Sandbox\n\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// //\n// //\n// //\n// =#*++#*=++: .*#******++-. :*%@%%= .:. //\n// %@* +@@- :%@@@..:+@@%: +@@+ .@@@- //\n// :@@@: #. =****. .**+ :+*+- :+*+- .****+*+-. #@@% :@@@. :+#++: :+*+=.-= *@@* +# //\n// *@@@#- =@@@+ +@. #@@. %%: #@@: %@- =@@@ .+@@+ #@@% #@@* *@@. +@+ *@@: -@@: =@@@. //\n// +@@@@@#=.:# @@@@= -# #@@- +@@. *@@= +@@:=@@@ #@@- #@@% +@@% *@@+ :@@= +@@+ -= @@@% - - //\n// .=--=+%@@@@@# @@@@@- -#:@@@ +@@*.@@@ +@@*=@@@ +@@+ +@@@@% +@@@.@@@: :@@% @@@: :+@@@# =@%*+=+#% //\n// -+##*-.+@@@@- @#=@@@:-#=@@% *@@%-@@@ *@@%=@@@ #@@- %@@% +@@@:@@@. =@@@-@@@.-+*##*-+@@@# #@++@@@@: //\n// +*:..-@@@. *@@@.@# +@@@+#-@@@ :@%@#:@@@ :@%@#=@@@ =@@+ #@@% *@@%.@@@: .@#@%:@@@. #*@@%+-@@@% #- =@@@ //\n// =# *@@+ #@@:@# *@@@# %@@. - #@- %@@: - *@-=@@@=+=- #@@% #@@* *@@= : =@= %@@= . -@= @@@@ .. -@@% //\n// +* %@%. +@# @# #@@% .%@* :@= .@@# .@+ =@@@ #@@% .@@@. *@%. .%+ .%@% *# -@@@- *@@= //\n// .@. :++. :@#.+@@- -@@@= +%#=+. =%#=*: =@@@ #@@% #@%: :*#=+: +%@**= +@@% @@# //\n// .*= :*%= ..::::::::.. =+*%= . -%@@@::=%#- -@@%-.#@* //\n// .====+*=. .-=+*#%@@@%#*+===-----====--: . * -=----===--===++===--::. =*#*=. //\n// . .=*%@@@@%*=-. .:-- =@* .:::::.. ..:-+*#@@@%#*+=-:. .- //\n// ---==++*%@@@@%#+: :-=*+-:. .:=+#%@@@@@@%#**+++====-: //\n// ::::. := .-=+**##*+=. //\n// //\n// //\n// //\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n/* solhint-disable max-states-count */\ncontract Raffle is ERC721Enumerable, Ownable, ReentrancyGuard {\n uint256 public constant MAX_SUPPLY = 10_000;\n\n event TogglePaused(bool _pause);\n\n uint256 public waveType = 0;\n uint256 public waveMaxTokens;\n uint256 public waveMaxTokensToBuy;\n uint256 public waveSingleTokenPrice;\n uint256 public waveTotalMinted;\n\n uint256 public erc1155Id;\n address public contractAddress;\n\n mapping(address => mapping(uint256 => uint256)) public waveOwnerToClaimedCounts;\n uint256 public indexWave;\n uint256 public paused;\n\n mapping(uint256 => uint256) private signatureIds;\n mapping(uint256 => uint256) private availableIds;\n\n address public allowedToExecuteMint;\n address public sandOwner;\n address public signAddress;\n string public baseTokenURI;\n\n constructor(\n string memory baseURI,\n string memory _name,\n string memory _symbol,\n address payable _sandOwner,\n address _signAddress\n ) ERC721(_name, _symbol) {\n setBaseURI(baseURI);\n sandOwner = _sandOwner;\n signAddress = _signAddress;\n }\n\n function setupWave(\n uint256 _waveType,\n uint256 _waveMaxTokens,\n uint256 _waveMaxTokensToBuy,\n uint256 _waveSingleTokenPrice,\n address _contractAddress,\n uint256 _erc1155Id\n ) external onlyOwner {\n require(_waveType < 3 && _waveMaxTokens > 0 && _waveMaxTokensToBuy > 0, \"Invalid configuration\");\n if (_waveType != 0) {\n require(_contractAddress != address(0x0), \"Invalid contract address\");\n }\n require(_waveMaxTokensToBuy <= _waveMaxTokens, \"Invalid supply configuration\");\n\n waveType = _waveType;\n waveMaxTokens = _waveMaxTokens;\n waveMaxTokensToBuy = _waveMaxTokensToBuy;\n waveSingleTokenPrice = _waveSingleTokenPrice;\n waveTotalMinted = 0;\n contractAddress = _waveType == 0 ? address(0) : _contractAddress;\n erc1155Id = _waveType == 2 ? _erc1155Id : 0;\n indexWave++;\n }\n\n function price(uint256 _count) public view virtual returns (uint256) {\n return waveSingleTokenPrice * _count;\n }\n\n function chain() public view returns (uint256) {\n return block.chainid;\n }\n\n function checkWaveNotComplete(uint256 _amount) internal view returns (bool) {\n return _amount > 0 && waveTotalMinted + _amount <= waveMaxTokens;\n }\n\n function checkLimitNotReached(address _wallet, uint256 _amount) internal view returns (bool) {\n return\n waveOwnerToClaimedCounts[_wallet][indexWave - 1] + _amount <= waveMaxTokensToBuy &&\n totalSupply() + _amount <= MAX_SUPPLY;\n }\n\n function checkMintAllowed(address _wallet, uint256 _amount) public view returns (bool) {\n return checkWaveNotComplete(_amount) && checkLimitNotReached(_wallet, _amount);\n }\n\n function mint(\n address _wallet,\n uint256 _amount,\n uint256 _signatureId,\n bytes memory _signature\n ) external nonReentrant {\n require(indexWave > 0, \"Contract is not configured\");\n require(_msgSender() == allowedToExecuteMint, \"Not allowed\");\n require(paused == 0, \"Contract is paused\");\n require(signatureIds[_signatureId] == 0, \"signatureId already used\");\n require(\n checkSignature(_wallet, _signatureId, address(this), block.chainid, _signature) == signAddress,\n \"Signature failed\"\n );\n\n signatureIds[_signatureId] = 1;\n\n require(checkWaveNotComplete(_amount), \"Wave completed\");\n require(checkLimitNotReached(_wallet, _amount), \"Max allowed\");\n\n if (waveType == 1) {\n require(IERC721(contractAddress).balanceOf(_wallet) > 0, \"No NFT\");\n } else if (waveType == 2) {\n require(IERC1155(contractAddress).balanceOf(_wallet, erc1155Id) > 0, \"No NFT\");\n }\n\n uint256 _price = price(_amount);\n if (_price > 0) {\n SafeERC20.safeTransferFrom(IERC20(_msgSender()), _wallet, sandOwner, _price);\n }\n\n waveOwnerToClaimedCounts[_wallet][indexWave - 1] += _amount;\n\n waveTotalMinted += _amount;\n\n for (uint256 i = 0; i < _amount; i++) {\n uint256 tokenId = getRandomToken(_wallet, totalSupply());\n _safeMint(_wallet, tokenId);\n }\n }\n\n function checkSignature(\n address _wallet,\n uint256 _signatureId,\n address _contractAddress,\n uint256 _chainId,\n bytes memory _signature\n ) public pure returns (address) {\n return\n ECDSA.recover(\n keccak256(\n abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n keccak256(abi.encode(_wallet, _signatureId, _contractAddress, _chainId))\n )\n ),\n _signature\n );\n }\n\n // Thx Cyberkongs VX <3\n function getRandomToken(address _wallet, uint256 _totalMinted) private returns (uint256) {\n uint256 remaining = MAX_SUPPLY - _totalMinted;\n uint256 rand =\n uint256(keccak256(abi.encodePacked(_wallet, block.difficulty, block.timestamp, remaining))) % remaining;\n uint256 value = rand;\n\n if (availableIds[rand] != 0) {\n value = availableIds[rand];\n }\n\n if (availableIds[remaining - 1] == 0) {\n availableIds[rand] = remaining - 1;\n } else {\n availableIds[rand] = availableIds[remaining - 1];\n }\n\n return value;\n }\n\n function toggleSale() external onlyOwner {\n paused = paused == 0 ? 1 : 0;\n emit TogglePaused(paused == 1);\n }\n\n function setAllowedExecuteMint(address _address) external onlyOwner {\n allowedToExecuteMint = _address;\n }\n\n function setSandOwnerAddress(address _owner) external onlyOwner {\n sandOwner = _owner;\n }\n\n function _baseURI() internal view virtual override returns (string memory) {\n return baseTokenURI;\n }\n\n function setBaseURI(string memory baseURI) public onlyOwner {\n baseTokenURI = baseURI;\n }\n\n function setSignAddress(address _signAddress) external onlyOwner {\n signAddress = _signAddress;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 2000 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/packages/deploy/deployments/polygon/CollectionFactory.json b/packages/deploy/deployments/polygon/CollectionFactory.json index 26cf5b5765..92939ea312 100644 --- a/packages/deploy/deployments/polygon/CollectionFactory.json +++ b/packages/deploy/deployments/polygon/CollectionFactory.json @@ -1,5 +1,5 @@ { - "address": "0x3eF580A4A6B862183558625126bcC186436bfF4a", + "address": "0x3eF580A4A6B862183558625126bcC186436bfF4a", "abi": [ { "anonymous": false,