claimGobbler(bytes32[]) :
This function allows a user to claim a gobbler from a mintlist. It first checks if the minting period has started, if the user has already claimed a gobbler, and if the proof provided is valid. If all of these conditions are met, it emits an event to indicate that the gobbler has been claimed, and then calls the _mint() function to mint the gobbler to the user. (autogenerated documentation)
mintFromGoo(uint256,bool) :
This function allows a user to purchase a Gobbler from the Goo token contract. It takes in two parameters, a maximum price and a boolean value to indicate whether the user wants to use their virtual balance or not. If the current price of the Gobbler is greater than the maximum price, the transaction will be reverted. If the current price is less than or equal to the maximum price, the user's balance will be updated accordingly (either by decreasing their virtual balance or burning their Goo tokens). The function then emits an event to indicate that the Gobbler has been purchased, and finally calls the _mint function to mint the Gobbler. (autogenerated documentation)
gobblerPrice() :
This function calculates the current price of the Gobbler token. It does this by taking the current timestamp of the block and subtracting the timestamp of when the minting process started. This gives the amount of time since the minting process began. This time is then converted to days and passed to the getVRGDAPrice() function, along with the number of tokens minted from the GOO pool. The getVRGDAPrice() function then calculates the current price of the Gobbler token based on the time since the minting process began and the number of tokens minted from the GOO pool. (autogenerated documentation)
mintLegendaryGobbler(uint256[]) :
This function mints a legendary gobbler for the caller. It takes an array of gobbler IDs as an argument, and uses them to calculate the cost of the legendary gobbler. The cost is determined by the number of gobbler IDs provided, and the function will revert if the number of gobbler IDs is insufficient. The function then burns the provided gobbler IDs, and sets the emission multiple of the newly minted legendary gobbler to twice the sum of the emission multiples of the burned gobblers. The function also updates the user data of the caller, and emits an event to signal the minting of the legendary gobbler. Finally, the function calls the _mint() function (autogenerated documentation)
legendaryGobblerPrice() :
This function calculates the current price of a Legendary Gobbler. It takes into account the start price, the number of Legendary Gobblers sold, and the number of tokens minted from Goo. It then calculates the number of tokens minted since the start of the auction and returns the current price of the Legendary Gobbler. (autogenerated documentation)
requestRandomSeed() :
This function requests a random seed from a randomness provider. It first checks if the current block timestamp is greater than the next reveal timestamp, and if there are any reveals pending. If these conditions are met, it sets the toBeRevealed variable to the difference between the currentNonLegendaryId and the lastRevealedId. It then sets the nextRevealTimestamp to the current timestamp plus one day. Finally, it emits a RandomnessRequested event and returns the random seed from the randomness provider. (autogenerated documentation)
acceptRandomSeed(bytes32,,uint256) :
This function is used to accept a random seed from a randomness provider. It takes two parameters, a bytes32 and a uint256 randomness. The function sets the randomSeed variable in the gobblerRevealsData struct to the uint64 of the randomness parameter. It then sets the waitingForSeed variable to false and emits an event called RandomnessFulfilled with the randomness parameter as the argument. (autogenerated documentation)
upgradeRandProvider() :
This function allows the owner of the contract to upgrade the random number provider. It sets the waitingForSeed flag to false, sets the toBeRevealed value to 0, and subtracts 1 day from the nextRevealTimestamp. Finally, it sets the randProvider to the newRandProvider and emits an event to signal that the randProvider has been upgraded. (autogenerated documentation)
revealGobblers(uint256) :
This function is used to reveal a certain number of gobbler creatures in the game. It takes in a parameter of the number of gobblers to be revealed and then uses a random seed to determine which gobbler creatures will be revealed. It then swaps the indices of the gobbler creatures and updates the emission multiple of the current ID owner. Finally, it emits an event to signal that the gobblers have been revealed. (autogenerated documentation)
tokenURI(uint256) :
This function is used to generate a token URI for a given gobbler ID. It checks if the gobbler ID is within the range of the last revealed ID, the current non-legendary ID, and the first legendary gobbler ID. If the ID is within the range, it will return a string concatenated with the base URI and the gobbler ID. If the ID is not within the range, it will revert with an error message. (autogenerated documentation)
gobble(uint256,address,uint256,bool) :
This function allows a user to "gobble" a non-fungible token (NFT) from a given address. The function takes in four parameters: a gobblerId, the address of the NFT, the ID of the NFT, and a boolean value indicating whether the NFT is an ERC1155 token. The function first checks that the sender of the transaction is the owner of the gobblerId. If not, the transaction reverts. It then checks that the NFT is not from the same address as the contract, to prevent cannibalism. The function then increments the number of copies of the art gobbled by the gobblerId. Finally, the function emits (autogenerated documentation)
gooBalance(address) :
This function calculates the GOO balance of a given user. It does this by taking the user's emission multiple, last balance, and the difference between the current block timestamp and the user's last timestamp, and passing them to the LibGOO.computeGOOBalance() function. This function then calculates the user's GOO balance based on these parameters. (autogenerated documentation)
addGoo(uint256) :
This function allows a user to add a certain amount of goo to their account. It does this by burning the specified amount of goo from the user's account and then updating the user's goo balance by increasing it by the specified amount. (autogenerated documentation)
removeGoo(uint256) :
This function removes a specified amount of goo from the user's balance and sends it to the Gobblers contract. It works by first updating the user's goo balance by decreasing it by the specified amount, and then sending the same amount to the Gobblers contract. (autogenerated documentation)
burnGooForPages(address,uint256) :
This function is used to burn a specified amount of goo from a user's account. It is called by the Pages contract and requires the address of the user and the amount of goo to be burned. The function then calls the updateUserGooBalance function to decrease the user's goo balance by the specified amount. If the caller is not the Pages contract, the transaction will be reverted. (autogenerated documentation)
updateUserGooBalance(address,uint256) :
This function updates the Goo balance of a user. It takes in the user's address, the amount of Goo to be updated, and the type of update (increase or decrease). It then calculates the updated balance by either adding or subtracting the gooAmount depending on the updateType. Finally, it stores the updated balance and timestamp in the user's data and emits an event to notify of the balance update. (autogenerated documentation)
mintReservedGobblers(uint256) :
This function mints a specified number of Gobblers for the team and community reserves. It first checks to make sure that the number of Gobblers minted for reserves does not exceed 1/5 of the total number of Gobblers minted from Goo. If the check passes, it then calls the _batchMint function twice, once for the team reserve and once for the community reserve, and updates the currentNonLegendaryId variable. Finally, it emits an event to signal that the Gobblers have been minted. (autogenerated documentation)
getGobblerEmissionMultiple(uint256) :
This function retrieves the emission multiple associated with a specific gobbler (identified by its gobblerId). It does this by accessing the getGobblerData mapping, which stores the emission multiple associated with each gobblerId. The function returns the emission multiple as a uint256. (autogenerated documentation)
getUserEmissionMultiple(address) :
This function is used to retrieve the emission multiple of a given user from the getUserData mapping. The getUserData mapping is a mapping of user addresses to a struct containing the user's emission multiple, emission rate, and total emissions. The function takes in a user address as an argument and returns the emission multiple associated with that user address. (autogenerated documentation)
transferFrom(address,address,uint256) :
This function is used to transfer a gobbler from one address to another. It requires the address of the sender, the address of the recipient, and the ID of the gobbler to be transferred. The function first checks that the sender is the owner of the gobbler, that the recipient is not the zero address, and that the sender is either the owner of the gobbler, is approved for all transfers, or is the approved recipient of the gobbler. If these checks pass, the function deletes the approved recipient, sets the new owner of the gobbler to the recipient, and updates the user data of both the sender and the recipient. Finally, the function emits a Transfer event. (autogenerated documentation)