relevant tag icon
Moonbirds NFT
copy icon
Moonbirds.xyz
• version 1.0.0
NFT
ERC721A
Staking

Moonbirds NFT

They're a collection of 10,000 utility-enabled PFPs that feature a richly diverse and unique pool of rarity-powered traits. What's more, each Moonbird unlocks private club membership and additional benefits the longer you hold them. We call it nesting – because, obviously.

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0x0a67 saved
🥐 0x4DBD downloaded
🥖 0x77CA downloaded
🥨 0x77CA downloaded
🥯 0x46a8 downloaded
🥞 0x46a8 downloaded
🧀 0x3041 downloaded
🍖 0x3041 saved
🍗 0x3041 saved
🥩 0x77eA downloaded

Last Publish

10/19/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
tokenURI(uint256) :
function tokenURI(uint256 tokenId) external view returns (string memory)This function is part of the ERC721ACommon interface and is used to return a URI for a given tokenId. This URI can be used to access information about the token, such as its name, description, and other metadata. The URI is typically a URL that points to a web page or other resource that contains the token information. (autogenerated documentation)
_handlePurchase(address,uint256,bool) :
This function is an internal override function that handles a purchase of the token. It takes in an address to send the tokens to, the number of tokens to send, and a boolean value. It then calls the _safeMint function to mint the tokens and send them to the specified address. Finally, it checks that the total supply of the token is less than or equal to 10,000. (autogenerated documentation)
mintPublic(address,bytes32) :
This function mints a public token to a specified address. It requires a valid signature from the signers, which is verified using the signaturePayload and usedMessages parameters. If the signature is valid, the _purchase function is called to mint the token to the specified address. (autogenerated documentation)
alreadyMinted(address,bytes32) :
This function checks if a given address and nonce have already been used to mint a token. It does this by generating a message from the given address and nonce, and then checking if that message has already been used in the past. If the message has already been used, the function returns true, otherwise it returns false. (autogenerated documentation)
signaturePayload(address,bytes32) :
This function is used to create a payload for a signature. It takes an address and a bytes32 nonce as parameters and returns a bytes memory. The payload is created by encoding the address and nonce using the ABI (Application Binary Interface) encoding. This payload can then be used to create a signature. (autogenerated documentation)
setPROOFMintingOpen(bool) :
This function allows the owner of the contract to open or close the minting of PROOF tokens. When the minting is open, users can mint new tokens. When the minting is closed, users cannot mint new tokens. This function works by setting the boolean variable proofMintingOpen to either true or false, depending on the value of the parameter open. (autogenerated documentation)
mintPROOF(uint256[]) :
This function allows users to mint PROOF tokens. It takes an array of uint256 values as an argument, which represent the token IDs of the PROOF tokens to be minted. The function then calls the reducePROOFPool() function to reduce the pool of available PROOF tokens. Finally, it calls the redeemedPROOF.redeem() function to redeem the tokens and the _handlePurchase() function to handle the purchase. (autogenerated documentation)
proofClaimsRemaining(uint256) :
This function checks the number of claims remaining for a given token ID. It requires that the token ID is less than 1000, and then returns the number of claims remaining for that token ID by subtracting the number of claims already made from 2. (autogenerated documentation)
mintUnclaimed(address,uint256) :
This function allows the owner of the contract to mint unclaimed tokens to a specified address. It takes two parameters, the address to which the tokens should be sent and the number of tokens to be minted. The function reduces the PROOF pool by the number of tokens minted. The function then calls the _handlePurchase function to complete the minting process. (autogenerated documentation)
nestingPeriod(uint256) :
This function checks whether a given tokenId is currently in a nesting period. If it is, it returns true, the current nesting period, and the total nesting period. It does this by checking the nestingStarted mapping for the given tokenId, and if it is not 0, it calculates the current nesting period by subtracting the block timestamp from the start time. It then adds the current nesting period to the total nesting period stored in the nestingTotal mapping. (autogenerated documentation)
safeTransferWhileNesting(address,address,uint256) :
This function is used to safely transfer a token from one address to another while nesting. It first checks that the sender is the owner of the token, and then sets the nestingTransfer variable to 2. This indicates that the transfer is taking place while nesting. The function then calls the safeTransferFrom function to transfer the token from the from address to the to address. Finally, the nestingTransfer variable is set back to 1. (autogenerated documentation)
_beforeTokenTransfers(uint256,uint256) :
This function is an internal view override that is used to check if a token transfer is valid. It takes in two addresses, a start token ID, and a quantity as parameters. It then iterates through the token IDs from the start token ID to the start token ID plus the quantity, and checks if the nestingStarted value for each token ID is 0 or if the nestingTransfer is 2. If either of these conditions are not met, it will throw an error. This function is used to ensure that token transfers are valid and that the nestingStarted values are correct. (autogenerated documentation)
setNestingOpen(bool) :
This function sets the boolean value of the "nestingOpen" variable to either true or false. It can only be called by the contract owner, and is used to control whether or not the contract is open for nesting. (autogenerated documentation)
toggleNesting(uint256) :
This function allows an approved or owner user to toggle the nesting status of a token with a given tokenId. If the nestingStarted value for the tokenId is 0, then the function will check if nesting is open and set the nestingStarted value to the current block timestamp. This will emit a Nested event. If the nestingStarted value is not 0, then the function will add the difference between the current block timestamp and the nestingStarted value to the nestingTotal value for the tokenId and set the nestingStarted value to 0. This will emit an Unnested event. (autogenerated documentation)
toggleNesting(uint256[]) :
This function is used to toggle the nesting status of a given set of token IDs. It takes an array of token IDs as an argument and loops through each one, calling the toggleNesting() function for each one. This function will change the nesting status of the token IDs from true to false, or vice versa. (autogenerated documentation)
expelFromNest(uint256) :
This function is used to expel a token from its nest. It requires that the caller has the EXPULSION_ROLE permission. It checks to make sure that the token is currently nested, and then adds the amount of time the token has been nested to the nestingTotal variable. It then sets the nestingStarted variable to 0, and emits two events - Unnested and Expelled. (autogenerated documentation)
_baseURI() :
This function is used to retrieve the base URI of a token. It is an internal function that overrides the BaseTokenURI function from the ERC721A standard. It returns a string memory containing the base URI of the token. (autogenerated documentation)
setRenderingContract() :
This function allows the owner of the contract to set the address of a token URI generator contract. This function takes in an ITokenURIGenerator contract as an argument and sets the address of the contract to the renderingContract variable. This allows the contract to access the token URI generator contract and use its functions. (autogenerated documentation)
setRoyaltyInfo(address,uint96) :
This function sets the royalty information for a given address. It takes two parameters: an address of the receiver and a uint96 feeBasisPoints. The function is only accessible to the owner of the contract and sets the default royalty for the given address. The feeBasisPoints parameter is used to calculate the royalty fee that will be paid to the receiver. (autogenerated documentation)
supportsInterface(bytes4) :
This function is used to check if a contract supports a given interface. It takes a bytes4 interfaceId as an argument and returns a boolean value indicating whether the contract supports the interface or not. The function calls the supportsInterface() function from the ERC721ACommon, ERC2981, and AccessControlEnumerable contracts to check if the interface is supported. If any of the contracts returns true, the function will return true, otherwise it will return false. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i Moonbirds-Core
copy icon

Recent Use

🍞 0x0a67 saved
🥐 0x4DBD downloaded
🥖 0x77CA downloaded
🥨 0x77CA downloaded
🥯 0x46a8 downloaded
🥞 0x46a8 downloaded
🧀 0x3041 downloaded
🍖 0x3041 saved
🍗 0x3041 saved
🥩 0x77eA downloaded

Last Publish

10/19/2022

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.