ERC-721a contract
Constructor
constructor(
string memory __name,
string memory __symbol,
uint256 _price,
uint256 _maxSupply,
string memory _contractMetadataURI,
string memory _tokenMetadataURI,
bool _allowBuy,
uint256 _maxPerTransaction,
Addresses memory _addresses
) ERC721A('', '') {...}
Index | Name | Description |
---|---|---|
0 | __name | Token Name |
1 | __symbol | Token Symbol |
2 | _price | Token Price |
3 | _maxSupply | Token Max Supply |
4 | _contractMetadataURI | The URI of the Metadata for the Contract |
5 | _tokenMetadataURI | The URI of the Metadata for an individual Token |
6 | _allowBuy | Toggle for API-based mints |
7 | _maxPerTransaction | Maximum amount of NFTs a single address can purchase |
8 | _addresses | Array of: - Customer Address - Collection Owner Address - Authorization Address - Purchase Token Address (if using crypto) - HyperMint Manager Primary Royalty Address - Customer Primary Royalty Address - Secondary Royalty Address |
Functions
Legend
Field | Meaning |
---|---|
🛠 | Function can modify state |
💵 | Function is payable |
Public | public functions can be called internally from within the contract or externally via messages |
External | External functions are part of the contract interface, which means they can be called from other contracts and via transactions. An external function f cannot be called internally (i.e. f() does not work, but this.f() works) |
Description
Function Name | Visibility | Mutability | Description |
---|---|---|---|
name | Public | - | Returns name of the token |
totalMinted | Public | - | Returns total tokens minted |
symbol | Public | - | Returns the symbol of the contract |
tokenURI | Public | - | Returns the URI for the tokenId |
getTokenInfo | External | - | Returns the current price, supply and max supply of the token |
royaltyInfo | External | - | Returns the royalty receiver and amount for each secondary sale |
supportsInterface | Public | - | Returns true if this contract implements the interface defined by interfaceId |
setNameAndSymbol | External | 🛠 | Modifies the token name and/or token symbol |
setMetadataURIs | External | 🛠 | Modifies the URIs for the contract and token |
setDates | External | 🛠 | Modifies public sale start and end dates |
setTokenData | External | 🛠 | Modifies token price, max supply and max amount of tokens can be purchased per transaction |
setAddresses | External | 🛠 | Modifies addresses |
setAllowBuy | External | 🛠 | Toggles buy on/off |
setRoyalty | External | 🛠 | Modifies primary royalty for minting and/or secondary royalty |
mintBatch | External | 🛠 | Performs a batch mint of x tokens to y addresses |
buyAuthorised | External | 💵 | Buys X amount of tokens in private sale |
buy | External | 💵 | Buys X amount of tokens in public sale |
_buy | External | 🛠 | - Processes a buy of X tokens for a total price Y - Immediately sweeps proceeds from the contract - Mints X tokens to the buyer |
transferContractOwnership | External | 🛠 | Transfers ownership of the Contract Manager role |
startTokenId | External | - | Overrides the start tokenId for mints |
Architecture
Feedback
Something not quite right, unclear or can't find what you are looking for? Please let us know at support.moonpay.com and we will get back to you as soon as we can.
Updated 9 months ago