ERC721A Architecture
ERC721A Smart Contract
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 | contract metadata uri |
5 | _tokenMetadataURI | token metadata uri |
6 | _allowBuy | toggle for api mints |
7 | _maxPerTransaction | max amount an address can buy |
8 | _addresses |
|
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). |
Function Name | Visibility | Mutability | Description |
---|---|---|---|
name | Public | - | Returns the name of the token |
totalMinted | Public | - | Returns total tokens minted |
symbol | Public | - | Returns the symbol of the token |
tokenURI | Public | - | Returns the uri for a specific 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 uri's 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 |