mint() :
This function mints a new non-fungible token (NFT) and adds it to the total supply of the contract. It takes in a payment of 0.005 ether from the sender, unless the sender is the owner of the contract. The function then creates a new Word object with a unique identifier, a description, two random numbers, and a value from the wordsValues array. Finally, the function adds the new Word object to the words array and calls the _safeMint function to mint the new NFT to the sender. (autogenerated documentation)
randomNum(uint256,uint256) :
This function generates a random number between 0 and the given modulus (_mod) using a combination of the current block timestamp, the sender's address, a given seed, and a given salt. It does this by taking the keccak256 hash of the combination of these values and then taking the modulus of the result with the given modulus. This ensures that the random number generated is unpredictable and unique. (autogenerated documentation)
buildImage(uint256) :
This function builds an image based on a given token ID. It takes the token ID as an input and uses it to look up the corresponding word in the words mapping. It then uses the background hue, text hue, and value of the word to create an SVG image. The SVG image is then encoded into a Base64 string and returned. (autogenerated documentation)
buildMetadata(uint256) :
This function builds the metadata for a given token ID. It takes in the token ID as an argument and returns a string containing the metadata in a JSON format. The metadata includes the name, description, and image of the token. The image is generated by the buildImage() function, which takes in the token ID and returns a base64 encoded SVG image. The metadata is then encoded in a base64 format and returned as a string. (autogenerated documentation)
tokenURI(uint256) :
This function is used to query the URI of a specific token. It takes in a token ID as an argument and returns a string containing the token's URI. The function first checks to make sure that the token ID exists, and if it does, it calls the buildMetadata() function to generate the token's URI. (autogenerated documentation)
withdraw() :
This function allows the owner of the contract to withdraw funds from the contract. It does this by first calling the payable function of the address 0x943590A42C27D08e3744202c4Ae5eD55c2dE240D with 5% of the contract's balance. If this call is successful, it then calls the payable function of the owner with the remaining balance of the contract. If this call is successful, the owner can withdraw the funds. (autogenerated documentation)