Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
ERC721Minter Mintable NFT Contract
copy icon

ERC721Minter Mintable NFT Contract

ERC721Minter.sol allows for the creation and management of unique, non-fungible tokens, providing a secure and decentralized way to represent ownership of digital assets. (autogenerated description)

*Visit desktop site to download or deploy

Last Publish

Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Source Code
owner() :
Returns the address of the current owner.
paused() :
Returns true if the contract is paused, and false otherwise.
renounceOwnership() :
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership(address) :
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
mint(uint256,uint256) :
This function mints NFTs for the caller, pays referral fees if applicable, and transfers payment to the bank. (autogenerated documentation)
addReferal(address) :
This function adds a referral address to a mapping and emits an event. It uses a counter to assign a unique ID to each referral. (autogenerated documentation)
getReferalIdByAddress(address) :
This function returns the referral ID associated with a given address by looking it up in a mapping. (autogenerated documentation)
nextReferalId() :
This function returns the current referral ID tracker value. It works by calling the "current" function on the "_referalIdTracker" variable. (autogenerated documentation)
setRounds(uint256[],uint256[]) :
This function sets the supplies and prices for each funding round, and can only be called by the contract owner. (autogenerated documentation)
setBank(address) :
This function sets the address of the bank and can only be called by the contract owner. (autogenerated documentation)
_setReferalFraction(uint256) :
This private function sets the referral fee fraction for an ERC721Minter contract, ensuring it does not exceed the sale price. (autogenerated documentation)
pause() :
This function pauses the contract and can only be called by the owner. It uses the _pause() function from the OpenZeppelin library. (autogenerated documentation)
unpause() :
This function unpauses the contract and allows transactions to occur. It can only be called by the contract owner. (autogenerated documentation)
currentPrice() :
This function returns the current price of the asset by fetching the price from the current round. (autogenerated documentation)
_setRounds(uint256[],uint256[]) :
This function sets the supply and price for each round of token minting, ensuring they have the same length and storing them in an array. (autogenerated documentation)
_currentRoundIndex() :
This function returns the index of the current round based on the total supply of NFTs minted, by iterating through all rounds. (autogenerated documentation)
_referalFee(uint256) :
This function calculates the referral fee based on the price and referral fraction, using simple multiplication and division. (autogenerated documentation)
_feeDenominator() :
This function returns a constant value of 10000 as the denominator for calculating fees. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i ERC721Minter
copy icon





Last Publish


Solidity Compiler




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