Dagora NFT-A-Plus Wizard
NFTAPlus
isPaused
Boolean to determine if the contract is isPaused.
default value is true, contract is isPaused on deployment.
isPresale
Boolean to determine if the contract is in the presale period.
default value is true.
baseURI
The base URI for all tokens.
baseExtension
The file extension of the metadata can be set to nothing.
default value is json
merkleRoot
The merkle root for the allowList, this is used to verify 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
PresaleMinted
BaseURIChanged
BaseExtensionChanged
MintCostChanged
PresaleMintCostChanged
BulkBuyLimitChanged
MaxAllowListAmountChanged
isPausedToggled
PresaleToggled
allowListMintCount
constructor
isNotPaused
Modifier to check if the contract is isPaused.
Throws if the contract is isPaused.
_isPresale
Modifier to check the sale state of the contract.
Throws if the contract is not in the presale period.
isPublicSale
Modifier to check the sale state of the contract.
Throws if the contract is not in the public sale period.
isValidMerkleProof
Modifier to check the proof of the allowList.
Throws if the proof is invalid.
mintNFT
This function is used to mint a token.
this function is only callable when the contract is not paused, and the sale is public.
Parameters
to
address
the address to mint the token to.
amount
uint256
the amount of tokens to mint.
presaleMintNFT
This function is used to mint a token during the presale period.
this function is only callable when the contract is not paused, and the sale is presale.
Parameters
proof
bytes32[]
the merkle proof to check against the stored root.
amount
uint256
the amount of tokens to mint.
reserveTokens
OnlyOwner function to mint tokens.
this function is only callable by the owner of the contract.
Parameters
amount
uint256
the amount of tokens to mint.
tokenURI
returns the tokenURI for a given token.
this function is only callable when the token exists.
Parameters
tokenId
uint256
the tokenID to get the tokenURI for.
setBaseURI
Onlyowner function to set the base URI.
this function is only callable by the owner of the contract.
Parameters
__baseURI
string
the base URI to set.
setBaseExtension
Onlyowner function to set the base extension.
this function is only callable by the owner of the contract.
Parameters
_baseExtension
string
the base extension to set.
setMintPrice
Onlyowner function to set the mint price for the public sale.
this function is only callable by the owner of the contract.
Parameters
_mintPrice
uint256
the mint cost to set.
setPresaleMintPrice
Onlyowner function to set the mint price for the presale.
this function is only callable by the owner of the contract.
Parameters
_presaleMintPrice
uint256
the presale mint cost to set.
setBulkBuyLimit
Onlyowner function to set the bulk buy limit.
this function is only callable by the owner of the contract.
Parameters
_bulkBuyLimit
uint16
the bulk buy limit to set.
setMaxAllowListAmount
Onlyowner function to set the max amount of tokens that can be minted during the presale.
this function is only callable by the owner of the contract.
Parameters
_maxAllowListAmount
uint16
the max amount of tokens that can be minted during the presale.
togglePaused
Onlyowner function to set the paused state of the contract.
this function is only callable by the owner of the contract.
togglePresale
Onlyowner function to set the presale state of the contract.
this function is only callable by the owner of the contract.
withdrawETH
Onlyowner function to withdraw any ETH sent to the contract.
this function is only callable by the owner of the contract.
withdrawERC20
Allows owner to withdraw any ERC20 tokens sent to this contract.
Only Contract Owner can use this function.
Parameters
_tokenAddr
address
The address of the ERC20 token.
_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
from
address
The address of the sender.
to
address
The address of the receiver.
tokenId
uint256
The token ID.
quantity
uint256
The quantity of tokens to transfer.
typeOf
function that returns the dagora contract type
Return Values
[0]
string
the dagora contract type
version
function that returns the dagora contract version
Return Values
[0]
string
the dagora contract version
_startTokenId
internal function that handles that starting tokenId of the collection
Return Values
[0]
uint256
the starting tokenId of the collection eg 1
Last updated