State Variables
_tokenIdCounter
TOKEN_ADMIN_ROLE
handlerAddress
baseUri
Base Contract URIFunctions
constructor
Constructor sets paramsName | Type | Description |
---|---|---|
_name | string | Name of the token |
_symbol | string | Symbol of the token |
_tokenAdmin | address | Token Admin address |
_baseUri | string |
_baseURI
Function to return baseUri for contractName | Type | Description |
---|---|---|
<none> | string | baseUri URI link to NFT metadata |
setBaseURI
this is called in the constructor and can be called to update URI metadata pointer Function to set URI for contract.Name | Type | Description |
---|---|---|
_baseUri | string | URI to the metadata file(s) for the contract |
safeMint
Add appAdministratorOnly modifier to restrict minting privilages Function is payable for child contracts to override with priced mint function. Function mints new a new token to caller with tokenId incremented by 1 from previous minted token.Name | Type | Description |
---|---|---|
to | address | Address of recipient |
_beforeTokenTransfer
Function called before any token transfers to confirm transfer is within rules of the protocolName | Type | Description |
---|---|---|
from | address | sender address |
to | address | recipient address |
tokenId | uint256 | Id of token to be transferred |
batchSize | uint256 | the amount of NFTs to mint in batch. If a value greater than 1 is given, tokenId will represent the first id to start the batch. |
supportsInterface
Returns true if this contract implements the interface defined byinterfaceId
. See the corresponding
https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
to learn more about how these ids are created.
This function call must use less than 30 000 gas.
getHandlerAddress
This function returns the handler addressName | Type | Description |
---|---|---|
<none> | address | handlerAddress |
connectHandlerToToken
This function does not check for zero address. Zero address is a valid address for this function’s purpose. Function to connect Token to previously deployed Handler contractName | Type | Description |
---|---|---|
_deployedHandlerAddress | address | address of the currently deployed Handler Address |