relevant tag icon
Hashlips NFT Sale with Reveal
copy icon
HashLips
• version 1.0.0
ERC721
NFT
Sale
Whitelist
Pausable
Reveal

Hashlips NFT Sale with Reveal

NFT and Sale. Supports the following features: -User whitelisting -Mint Cap -Pause/Unpause Sale -Configurable Cost -NFT reveal

*Visit desktop site to download or deploy

Version

1.0.0

Creator

HashLips

Recent Use

🍞 0x7Ff3 saved
🥐 0x77eA downloaded

Last Publish

10/22/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
_baseURI() :
This function returns the baseURI of the contract. The baseURI is a string that is used to identify the contract and is set when the contract is deployed. It is an internal view function, meaning that it can be accessed from within the contract, but not from outside. It is also a virtual override, meaning that it can be overridden by a derived contract. (autogenerated documentation)
mint(address,uint256) :
This function allows the owner of the contract to mint a certain amount of tokens and send them to a specified address. The function requires that the mint amount is greater than 0, that the total supply of tokens does not exceed the maximum supply, and that the sender is either the owner of the contract or is whitelisted and has sent enough ether to cover the cost of minting the tokens. If these conditions are met, the function will loop through the mint amount and call the _safeMint function to mint the tokens and send them to the specified address. (autogenerated documentation)
walletOfOwner(address) :
This function returns an array of uint256 values that represent the token IDs owned by a given address. It does this by first getting the number of tokens owned by the address using the balanceOf() function, then looping through each token and adding the token ID to the array using the tokenOfOwnerByIndex() function. (autogenerated documentation)
tokenURI(uint256) :
This function returns a URI for a given tokenId. It first checks if the tokenId exists, and if it does, it checks if the token has been revealed. If the token has been revealed, it returns a URI composed of the baseURI, the tokenId, and the baseExtension. If the token has not been revealed, it returns the notRevealedUri. (autogenerated documentation)
reveal() :
This function allows the owner of the contract to set the boolean variable "revealed" to true. This can be used to reveal the contents of a contract, such as the address of the owner, or any other information that was previously hidden. (autogenerated documentation)
setCost(uint256) :
This function allows the owner of the contract to set the cost of the contract. It takes in a uint256 value as an argument and sets the cost of the contract to that value. (autogenerated documentation)
setmaxMintAmount(uint256) :
This function allows the owner of the contract to set the maximum amount of tokens that can be minted. It takes in a uint256 value as an argument and sets the maxMintAmount variable to that value. This ensures that the total supply of tokens does not exceed the maximum amount set by the owner. (autogenerated documentation)
setNotRevealedURI(string) :
This function allows the owner of the contract to set the notRevealedUri variable to a given string. This variable is used to store a URI that is not revealed to the public. (autogenerated documentation)
setBaseURI(string) :
This function allows the owner of the contract to set a new base URI. The base URI is a string that is stored in the contract's memory and is used to identify the contract. The function takes in a string as an argument and sets the baseURI variable to the new string. (autogenerated documentation)
setBaseExtension(string) :
This function allows the owner of the contract to set a new base extension for the contract. The base extension is a string that is used to identify the contract. The function takes in a string memory _newBaseExtension as an argument and sets the baseExtension variable to the value of _newBaseExtension. (autogenerated documentation)
pause(bool) :
This function allows the owner of the contract to pause or unpause the contract. When the contract is paused, no further transactions can be made. The function takes a boolean parameter, which is used to set the paused state of the contract. If the parameter is set to true, the contract is paused, and if it is set to false, the contract is unpaused. (autogenerated documentation)
whitelistUser(address) :
This function allows the owner of the contract to whitelist a user by their address. It sets the value of the whitelisted mapping for the user's address to true, indicating that the user has been whitelisted. (autogenerated documentation)
removeWhitelistUser(address) :
This function removes a user from the whitelist. It takes in an address of the user to be removed as an argument and sets the value of the whitelisted mapping for that user to false. This function can only be called by the owner of the contract. (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 balance of the contract. 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)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i Hashlips-NFT-Sale-with-Reveal
copy icon

Recent Use

🍞 0x7Ff3 saved
🥐 0x77eA downloaded

Last Publish

10/22/2022

Version

1.0.0

Creator

HashLips

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