initialize(address,string,string,string,address,address,uint128,uint128,address) :
This function is the initializer for the ERC721A contract. It sets up the contract by setting up the ERC2771 context, ERC721A parameters, signature minting, contract URI, owner, roles, platform fee info, royalty info, and primary sale recipient. It also sets up the default admin role and the minter and transfer roles, and assigns the default admin as the minter and transfer role. The function takes in parameters such as the default admin address, the name and symbol of the token, the contract URI, an array of trusted forwarders, the sale recipient, the royalty recipient, the royalty basis points, the platform fee basis points, and the platform fee recipient. (autogenerated documentation)
tokenURI(uint256) :
This function returns a string representing the URI of a token. It takes in a uint256 tokenId as an argument and uses it to retrieve the batchId associated with the token. It then checks if the batch is encrypted and returns a string containing the base URI and either the tokenId or "0" depending on whether the batch is encrypted or not. (autogenerated documentation)
supportsInterface(bytes4) :
This function is used to check whether a given contract supports a given interface. It takes in a bytes4 interfaceId as an argument and returns a boolean value indicating whether the contract supports the interface or not. The function first checks if the contract supports the interface using the super.supportsInterface() function, and then checks if the interfaceId matches the interfaceId of the IERC2981Upgradeable interface. If either of these checks returns true, the function returns true, otherwise it returns false. (autogenerated documentation)
contractType() :
This function is a pure function that returns a bytes32 value representing the type of contract. In this case, the function returns the bytes32 value "SignatureDrop", which indicates that the contract is a SignatureDrop contract. This function does not modify any state variables and simply returns the type of contract. (autogenerated documentation)
contractVersion() :
This function is a pure function that returns the version of the contract as a uint8. It does not modify any state variables and does not interact with any external contracts. It simply returns the version of the contract as a uint8. (autogenerated documentation)
lazyMint(uint256,string) :
This function is an override of the lazyMint() function from the ERC-721 standard. It allows for the minting of a batch of tokens with a single call. The function takes in three parameters: an amount of tokens to mint, a base URI for the tokens, and a data payload. The data payload is decoded to extract an encrypted URI and a provenance hash. If both of these values are present, the encrypted data is set for the batch of tokens being minted. Finally, the function calls the super.lazyMint() function to mint the batch of tokens. (autogenerated documentation)
reveal(uint256) :
This function is used to reveal the token URI associated with a given token index. It takes two parameters, the index of the token and a key. It first retrieves the batch ID associated with the given token index, then uses the batch ID and the key to generate the token URI. It then sets the encrypted data associated with the batch ID to an empty string and sets the base URI to the revealed URI. Finally, it emits an event to indicate that the token URI has been revealed. (autogenerated documentation)
mintWithSignature() :
This function is used to mint tokens with a signature. It takes two parameters, a MintRequest and a signature, and returns the address of the signer. It first checks if there are enough tokens to mint, then processes the request and collects the price for the tokens. It then sets up the royalty information for the token if necessary, and finally mints the tokens to the specified address. (autogenerated documentation)
s function _beforeClaim(uint256,uint256,) :
This function is an internal view override that is used to check if the sender of the transaction is a trusted forwarder or the message sender is the same as the transaction originator. If the sender is a trusted forwarder or the message sender is the same as the transaction originator, then the function will check if the current index plus the quantity is less than or equal to the next token id to be lazy minted. If this is true, then the function will proceed. (autogenerated documentation)
_collectPriceOnClaim(address,uint256,address,uint256) :
This function is used to collect the price of a token when it is claimed. It takes in the address of the primary sale recipient, the quantity of tokens to be claimed, the currency of the token, and the price per token. It then calculates the total price of the tokens being claimed, and the platform fees associated with the transaction. If the currency is the native token, it checks that the amount sent is equal to the total price. Finally, it transfers the platform fees to the platform fee recipient, and the remaining amount to the primary sale recipient. (autogenerated documentation)
_transferTokensOnClaim(address,uint256) :
This function is used to transfer tokens on claim. It takes two parameters, an address of the recipient and the quantity of tokens being claimed. It then sets the startTokenId to the currentIndex and calls the _safeMint function to mint the specified amount of tokens to the recipient address. (autogenerated documentation)
_isAuthorizedSigner(address) :
This function checks if the given address is authorized to sign transactions on behalf of the contract. It does this by checking if the given address has the minterRole, which is a predefined role that is assigned to authorized signers. If the address has the minterRole, the function returns true, otherwise it returns false. (autogenerated documentation)
_canSetPlatformFeeInfo() :
This function checks if the message sender has the default admin role and returns a boolean value indicating whether they do or not. This is used to determine if the sender has permission to set the platform fee information. (autogenerated documentation)
_canSetPrimarySaleRecipient() :
This function checks if the message sender has the default admin role and returns a boolean value indicating whether they do or not. This is used to determine if the message sender is allowed to set the primary sale recipient. (autogenerated documentation)
_canSetOwner() :
This function checks if the message sender has the default admin role. It does this by calling the hasRole() function, which takes in the default admin role and the message sender as parameters. If the message sender has the default admin role, the function returns true, otherwise it returns false. (autogenerated documentation)
_canSetRoyaltyInfo() :
This function checks if the message sender has the default admin role and returns a boolean value indicating whether they do or not. This is used to determine if the sender has permission to set royalty information. (autogenerated documentation)
_canSetContractURI() :
This function checks if the message sender has the default admin role and returns a boolean value indicating whether they do or not. It is used to determine if the message sender has permission to set the contract URI. (autogenerated documentation)
_canSetClaimConditions() :
This function checks if the message sender has the default admin role and returns a boolean value indicating whether they do or not. It is used to determine if the sender has permission to set claim conditions. (autogenerated documentation)
_canLazyMint() :
This function checks if the sender of the current message has the minter role. It does this by calling the hasRole() function, which takes two parameters: the role to check for and the address of the sender. If the sender has the minter role, the function returns true, otherwise it returns false. (autogenerated documentation)
totalMinted() :
This function returns the total number of tokens that have been minted by the contract. It does this by subtracting the starting token ID from the current index, which is the ID of the last token that was minted. (autogenerated documentation)
nextTokenIdToMint() :
This function returns the next token ID that will be minted. It works by returning the value of the nextTokenIdToLazyMint variable, which is the next token ID that will be minted. (autogenerated documentation)
burn(uint256) :
This function is used to burn a specific token with the given tokenId. It works by calling the _burn() function with the tokenId and a boolean value of true. This will remove the token from circulation and decrease the total supply of the token. (autogenerated documentation)
_beforeTokenTransfers(address,address,uint256,uint256) :
This function is an override of the _beforeTokenTransfers function in the ERC721 contract. It is used to check if the sender and receiver of a token transfer have the transferRole permission. If either the sender or receiver do not have the transferRole permission, the transfer is reverted. This function also allows the transferRole permission to be granted to the address 0, which allows the contract owner to transfer tokens without needing the transferRole permission. (autogenerated documentation)
_dropMsgSender() :
This function is an internal view virtual override that returns the address of the message sender. It works by overriding the _msgSender() function, which is used to retrieve the address of the message sender. (autogenerated documentation)
_msgSender() :
This function is used to retrieve the address of the sender of the current message. It works by calling the _msgSender() function from the ERC2771ContextUpgradeable contract, which returns the address of the sender. (autogenerated documentation)
_msgData() :
This function is used to retrieve the data associated with a given message call. It works by calling the _msgData() function from the ERC2771ContextUpgradeable contract, which returns the data associated with the message call as a byte array. (autogenerated documentation)