initialize(address,string,string,string,address,uint256) :
This function is the initializer for the ERC-721 contract. It sets up the default admin, name, symbol, contract URI, trusted forwarders, royalty recipient, and royalty BPS. It also sets up the default admin role, minter role, transfer role, unwrap role, and asset role. Finally, it sets up the owner of the contract. This function is called when the contract is deployed and ensures that all the necessary information is set up correctly. (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 is a getter function that returns the version of the contract. It is a pure function, meaning that it does not modify the state of the contract and does not interact with the blockchain. It simply returns the value of the constant variable VERSION, which is a uint8 (unsigned 8-bit integer) that stores the version of the contract. (autogenerated documentation)
tokenURI(uint256) :
This function returns the URI of a given token ID. It works by calling the getUriOfBundle() function, which takes the token ID as an argument and returns the corresponding URI. (autogenerated documentation)
supportsInterface(bytes4) :
This function is used to check if a contract supports a given interface. It does this by comparing the given interfaceId to the interfaceIds of the contracts that the contract supports (ERC1155Receiver, ERC721Upgradeable, IERC165, and IERC2981Upgradeable). If the given interfaceId matches any of the supported interfaceIds, the function returns true, otherwise it returns false. (autogenerated documentation)
wrap(string,address) :
This function wraps a set of tokens into a single token. It takes an array of tokens to wrap, a URI for the wrapped token, and an address of the recipient as parameters. It first checks that the sender has the MINTER_ROLE and that the assetContracts of the tokens to wrap have the ASSET_ROLE. It then assigns a tokenId to the wrapped token and stores the tokens to wrap, the URI, and the tokenId in the contract. It then safely mints the wrapped token to the recipient and emits an event to indicate that the tokens have been wrapped. (autogenerated documentation)
unwrap(uint256,address) :
This function allows a user to unwrap a Non-Fungible Token (NFT) and release the associated tokens to a specified recipient. It requires that the caller is approved for unwrapping and that the token ID is valid. The function then burns the NFT and releases the associated tokens to the recipient. Finally, it emits an event to signal that the tokens have been unwrapped. (autogenerated documentation)
s function getWrappedContents(uint256) :
This function retrieves the contents of a bundle of tokens, given a token ID. It does this by first getting the total number of tokens in the bundle, then looping through each token and adding it to an array of tokens. The array is then returned. (autogenerated documentation)
s function _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. This is used to determine if the message sender is allowed to set the contract URI. (autogenerated documentation)
_beforeTokenTransfer(address,address,uint256) :
This function is an override of the _beforeTokenTransfer function in the ERC721 contract. It is used to check if the sender and receiver of a token transfer have the TRANSFER_ROLE permission. If the sender and receiver do not have the TRANSFER_ROLE permission, the transfer is not allowed. This function is called before a token transfer is executed, and it ensures that only authorized users are able to transfer tokens. (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)