Dagora PowerPlus NFT Wizard
PowerPlusNFT
PowerPlusNFT is ERC721A contract that is ownable, has royalties, and a pre-sale.
This contract is used as a template for creating new NFT contracts.
Params
baseURI
The base URI for all tokens.
baseExtension
The file extension of the metadata can be set to nothing.
default value is json
royaltyRecipient
The address that will receive the royalties.
isPaused
Boolean to determine if the contract is paused.
default value is true, contract is paused on deployment.
preSaleActive
Boolean to determine if the contract is in the pre-sale period.
default value is true, contract is in presale state on deployment.
merkleRoot
The merkle root for the allowList.
bulkBuyLimit
The maximum number of tokens that can be minted in a single transaction.
maxAllowListAmount
The maximum number of tokens that can be minted in a single transaction for a whitelist address.
this is used during the whitelist period.
mintPrice
The cost to mint a token.
presaleMintPrice
The cost to mint a token during the presale period.
maxSupply
The maximum number of tokens that can be minted.
Minted
AllowListMinted
BaseURIChanged
BaseExtensionChanged
MintCostChanged
presaleMintPriceChanged
BulkBuyLimitChanged
MaxAllowListAmountChanged
PausedToggled
PreSaleToggled
RoyaltysChanged
allowListMintCount
Mapping to track the number of tokens minted for each address during presale.
constructor
The constructor for the contract.
Parameters
isNotPaused
Modifier to check if the contract is paused.
isValidMerkleProof
Modifier to check the address is allowed to mint during the presale period.
check the proof provided against the root stored in the contract.
Parameters
isPublicSale
a modifier to check if the contract is in the public sale period.
isPreSale
a modifier to check if the contract is in the presale period.
mintNFT
Fcuntion to mint nfts.
this function is used during the public sale period.
Parameters
presaleMintNFT
Function to mint nfts during the presale period.
Parameters
reserveTokens
Function to mint nfts during the presale period.
this function is used to mint tokens for the team.
Parameters
tokenURI
returns the token URI for a given token.
Parameters
togglePaused
Function to toggle the paused state of the contract.
togglePresale
OnlyOwner Function to toggle the presale state of the contract.
setBaseURI
OnlyOwner Function to set the base URI for the token URIs.
Parameters
setBaseExtension
OnlyOwner Function to set the base extension for the token URIs.
Parameters
setMintPrice
OnlyOwner Function to set the mint cost during the public sale period.
this function is used to set the mint cost during the public sale period.
Parameters
setPresaleMintPrice
OnlyOwner Function to set the mint cost during the presale period.
Parameters
setBulkBuyLimit
OnlyOwner Function to set the bulk buy limit per transaction, during the public sale period.
Parameters
setMaxAllowListAmount
OnlyOwner Function to set the max allow list amount per address, during the presale period.
Parameters
setMerkleRoot
OnlyOwner Function to set the merkle root for the presale.
this function is used to set the merkle root for the presale, this is used to verify the merkle proof and check if a address is included.
Parameters
setRoyalties
Function to set the royalties for the contract.
Parameters
withdrawETH
OnlyOwner Function to withdraw ETH from the contract.
withdrawERC20
OnlyOwner function to withdraw ERC20 tokens from the contract.
Parameters
supportsInterface
_beforeTokenTransfers
internal override function that is called before any token transfer.
this function will revert if the contract is paused, pausing transfers of tokens.
Parameters
typeOf
function that returns the dagora contract type
Return Values
version
function that returns the dagora contract version
Return Values
_startTokenId
internal function that handles that starting tokenId of the collection
Return Values
Last updated