initialize(address,string,string,string,address,address,uint128,uint128,address) :
This function is the initializer for the contract. It sets up the contract's name, symbol, contractURI, trustedForwarders, saleRecipient, royaltyRecipient, royaltyBps, platformFeeBps, and platformFeeRecipient. It also sets up the default admin role, minter role, transfer role, and transfer role for address 0. Finally, it sets the owner of the contract to the default admin. (autogenerated documentation)
contractType() :
This function returns a bytes32 value that represents the type of the contract. It does this by simply returning the value of the MODULE_TYPE constant, which is set when the contract is deployed. (autogenerated documentation)
contractVersion() :
This function returns the version of the contract. It does this by returning the value of the constant variable VERSION, which is declared outside of the function. (autogenerated documentation)
owner() :
This function returns the address of the owner of the contract. It does this by checking if the owner has the default admin role, and if so, returning the owner's address. If the owner does not have the default admin role, it returns a zero address. (autogenerated documentation)
uri(uint256) :
This function returns a tokenURI for a given tokenId. It does this by looping through the baseURIIndices array and comparing the given tokenId to each index. If the tokenId is less than the index, the function returns a string containing the baseURI at that index and the tokenId as a string. If the tokenId is not found, the function returns an empty string. (autogenerated documentation)
supportsInterface(bytes4) :
This function checks whether a given contract supports a given interface. It does this by first checking if the given interface is supported by the super contract, and then checking if the interface is the same as the IERC2981Upgradeable interface. If either of these checks returns true, the function returns true, otherwise it returns false. (autogenerated documentation)
royaltyInfo(uint256,uint256) :
This function calculates the royalty amount for a given tokenId and salePrice. It does this by first retrieving the recipient address and royalty rate (in basis points) for the tokenId from the getRoyaltyInfoForToken function. It then calculates the royalty amount by multiplying the salePrice by the royalty rate and dividing it by the maximum basis points (MAX_BPS). The recipient address and royalty amount are then returned. (autogenerated documentation)
lazyMint(uint256,string) :
This function allows the minter role to mint a batch of tokens with a single transaction. It takes in an amount of tokens to mint and a base URI for the tokens as parameters. It then sets the nextTokenIdToMint to the baseURIIndex, which is the startId plus the amount of tokens to mint. It then stores the baseURI in the baseURI mapping and pushes the baseURIIndex to the baseURIIndices array. Finally, it emits an event to indicate that the tokens have been lazily minted. (autogenerated documentation)
claim(address,uint256,uint256,address,uint256,bytes32[],uint256) :
This function allows a user to claim a certain number of tokens with a given token ID. It requires the user to provide a proof of ownership of the tokens, as well as a payment in a specified currency. The function then verifies the proof and payment, and if successful, transfers the tokens to the specified receiver. It also emits an event to notify other users of the successful claim. (autogenerated documentation)
setClaimConditions(uint256,bool) :
This function sets the claim conditions for a given token ID. It takes in an array of ClaimCondition objects, a token ID, and a boolean value to reset the claim eligibility. It then stores the claim conditions in the claimCondition mapping, and updates the currentStartId and count values. It also checks that the startTimestamp of each condition is in ascending order, and that the maxClaimableSupply is not exceeded. If the resetClaimEligibility boolean is set to true, it will delete any existing conditions and reset the claim eligibility. Finally, it emits an event to signal that the claim conditions have been updated. (autogenerated documentation)
collectClaimPrice(uint256,address,uint256,uint256) :
This function collects the claim price for a given token. It takes in four parameters: the quantity to claim, the currency, the price per token, and the token ID. It then calculates the total price by multiplying the quantity to claim by the price per token. It then calculates the platform fees by multiplying the total price by the platform fee BPS and dividing it by the maximum BPS. If the currency is the native token, it requires that the message value is equal to the total price. It then transfers the platform fees to the platform fee recipient and the remaining total price to either the primary sale recipient or the sale recipient associated with the token ID. (autogenerated documentation)
transferClaimedTokens(address,uint256,uint256,uint256) :
This function is used to transfer tokens that have been claimed by a user. It takes in four parameters: the address of the recipient, the condition ID, the token ID, and the quantity of tokens being claimed. It then updates the supplyClaimed value of the condition ID for the token ID, updates the limitLastClaimTimestamp for the condition ID and sender, and increments the walletClaimCount for the token ID and sender. Finally, it calls the _mint function to mint the specified quantity of tokens to the recipient. (autogenerated documentation)
verifyClaim(uint256,address,uint256,uint256,address,uint256,bool) :
This function is used to verify a claim for a given token. It checks that the currency and price per token specified are valid, that the quantity claimed is greater than 0 and does not exceed the quantity limit per transaction (if specified), that the total supply claimed does not exceed the maximum claimable supply, that the total supply does not exceed the maximum total supply, and that the wallet claim count does not exceed the maximum wallet claim count. It also checks that the last claim timestamp is 0 or that the current block timestamp is greater than the next valid claim timestamp. (autogenerated documentation)
verifyClaimMerkleProof(uint256,address,uint256,uint256,bytes32[],uint256) :
This function is used to verify a Merkle proof for a claim condition. It takes in the condition ID, the claimant's address, the token ID, the quantity, the Merkle proofs, and the maximum quantity per transaction as parameters. It first checks if the Merkle root is not equal to 0, and if so, it uses the MerkleProof.verify function to verify the proofs. It then checks if the proof has already been claimed, and if the quantity is less than or equal to the maximum quantity per transaction. If all these checks pass, the function returns true and the index of the Merkle proof. (autogenerated documentation)
s function getActiveClaimConditionId(uint256) :
This function gets the active claim condition ID for a given token ID. It does this by looping through the claimCondition list for the given token ID, and checking the start timestamp of each condition against the current block timestamp. If the current block timestamp is greater than the start timestamp, the condition ID is returned. If no active condition is found, the function reverts. (autogenerated documentation)
getPlatformFeeInfo() :
This function returns the address of the platform fee recipient and the platform fee rate (in basis points) for the contract. The platform fee rate is a percentage of the total amount of a transaction that is charged as a fee. The platform fee recipient is the address that will receive the fee. (autogenerated documentation)
getDefaultRoyaltyInfo() :
This function is used to retrieve the default royalty information for a particular contract. It returns a tuple containing the address of the royalty recipient and the royalty rate (in basis points). The royalty rate is a 16-bit unsigned integer, which is used to represent a percentage rate. The royalty rate is calculated by dividing the royalty rate by 10,000. (autogenerated documentation)
getRoyaltyInfoForToken(uint256) :
This function retrieves the royalty information for a given token ID. It takes in a uint256 _tokenId as an argument and returns a tuple containing the address of the royalty recipient and the royalty rate in basis points (bps). If the royalty recipient for the given token ID is not set, the function will return the default royalty recipient and royalty rate set in the contract. (autogenerated documentation)
getClaimTimestamp(uint256,uint256,address) :
This function retrieves the timestamp of the last claim made by a particular address for a particular token and condition. It also calculates the next valid claim timestamp based on the wait time between claims set for the condition. The function takes in three parameters: the token ID, the condition ID, and the address of the claimant. It returns two values: the last claim timestamp and the next valid claim timestamp. The function uses the claimCondition mapping to access the last claim timestamp and the wait time between claims for the condition. If the addition of the last claim timestamp and the wait time between claims results in an overflow, the next valid claim timestamp is set to the maximum value of a uint256. (autogenerated documentation)
getClaimConditionById(uint256,uint256) :
This function retrieves a ClaimCondition struct from the claimCondition mapping, based on the provided tokenId and conditionId. The claimCondition mapping is a mapping of uint256 to a struct containing an array of ClaimCondition structs. The function takes the provided tokenId and conditionId as parameters, and uses them to access the corresponding ClaimCondition struct from the array. The function then returns the retrieved ClaimCondition struct. (autogenerated documentation)
s function setWalletClaimCount(uint256,address,uint256) :
This function sets the wallet claim count for a given token ID and claimant address. It requires the caller to have the DEFAULT_ADMIN_ROLE, and emits an event when the wallet claim count is updated. The wallet claim count is stored in a mapping, which is a data structure that stores key-value pairs. The key is the token ID and claimant address, and the value is the wallet claim count. (autogenerated documentation)
setMaxWalletClaimCount(uint256,uint256) :
This function sets the maximum number of claims that can be made for a given token. It takes two parameters, the token ID and the count, and stores the count in the maxWalletClaimCount mapping. It then emits an event to notify other contracts that the maximum claim count has been updated. (autogenerated documentation)
setMaxTotalSupply(uint256,uint256) :
This function sets the maximum total supply of a given token. It takes two parameters, a token ID and a maximum total supply, and updates the maxTotalSupply mapping with the given values. It then emits an event to notify other contracts that the maximum total supply has been updated. (autogenerated documentation)
setPrimarySaleRecipient(address) :
This function sets the primary sale recipient address for the contract. It can only be called by the default admin role, and it updates the primarySaleRecipient variable with the address passed in as an argument. It also emits an event to notify that the primary sale recipient has been updated. (autogenerated documentation)
setSaleRecipientForToken(uint256,address) :
This function allows the DEFAULT_ADMIN_ROLE to set the sale recipient for a given token ID. It takes in two parameters, a uint256 _tokenId and an address _saleRecipient. It then sets the saleRecipient mapping for the given token ID to the given address. Finally, it emits an event to signal that the sale recipient for the token has been updated. (autogenerated documentation)
setDefaultRoyaltyInfo(address,uint256) :
This function sets the default royalty recipient and royalty rate for the contract. It can only be called by the DEFAULT_ADMIN_ROLE, and requires that the royalty rate is less than or equal to the MAX_BPS. If these conditions are met, the royaltyRecipient and royaltyBps variables are set to the provided values, and an event is emitted to notify of the change. (autogenerated documentation)
setRoyaltyInfoForToken(uint256,address,uint256) :
This function sets the royalty information for a given token. It takes in three parameters: the token ID, the recipient address, and the royalty rate in basis points (bps). The function requires that the royalty rate is less than or equal to the maximum allowed royalty rate (MAX_BPS). If this requirement is met, the function stores the royalty information in the royaltyInfoForToken mapping. Finally, the function emits an event to signal that the royalty information has been set. (autogenerated documentation)
setPlatformFeeInfo(address,uint256) :
This function sets the platform fee recipient and platform fee bps for the contract. It requires that the platform fee bps is less than or equal to the maximum bps (10000). It then sets the platform fee bps as a uint16 and sets the platform fee recipient to the address provided. Finally, it emits an event to indicate that the platform fee info has been updated. (autogenerated documentation)
setOwner(address) :
This function sets the owner of the contract to a new address. It requires that the new owner has the DEFAULT_ADMIN_ROLE, and emits an OwnerUpdated event with the old and new owner addresses. The new owner address is then stored in the _owner variable. (autogenerated documentation)
setContractURI(string) :
This function sets the contractURI variable to the value of the _uri parameter. It can only be called by an account with the DEFAULT_ADMIN_ROLE. (autogenerated documentation)
burn(address,uint256,uint256) :
This function allows the owner of an ERC1155 token or an approved operator to burn a specific token. It takes three parameters: the address of the account, the ID of the token, and the amount of the token to be burned. The function checks that the caller is either the owner of the token or an approved operator, and then calls the _burn() function to burn the specified token. (autogenerated documentation)
burnBatch(address,uint256[],uint256[]) :
This function allows the owner of a contract or an approved user to burn a batch of tokens. It takes in three parameters: an address of the account, an array of ids of the tokens to be burned, and an array of values of the tokens to be burned. The function then calls the _burnBatch() function, which is responsible for burning the tokens. The _burnBatch() function checks that the caller is either the owner of the contract or an approved user, and then burns the tokens. (autogenerated documentation)
_beforeTokenTransfer(address,address,address,uint256[],uint256[]) :
This function is an override of the _beforeTokenTransfer function in the ERC20 contract. It is used to check that the transfer of tokens is allowed. It checks that the operator, from, and to addresses have the TRANSFER_ROLE, and that the total supply of tokens is updated when tokens are transferred from or to address(0). (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)