Collection Token
The per-collection ERC-20 that represents a collection's floor.
Every collection supported by NFTX v4 gets its own CollectionToken, an ERC-20 that is the fungible representation of that ERC-721 collection — the collection's floor token. It's deployed as a minimal-proxy clone per collection, so initialize takes the place of a constructor. Minting and burning are owned by the Locker, which keeps supply backed 1:1 by the NFTs it holds.
Signatures and descriptions below come from the ICollectionToken interface.
initialize
Sets the initial token metadata, registers inherited contracts, and assigns ownership. Called once, at clone deployment.
function initialize(string calldata name_, string calldata symbol_) external;Access: initializer (callable once).
name_
string
The name for the token
symbol_
string
The symbol for the token
Returns: None.
mint
Mints additional collection tokens. Restricted to the owner (the Locker), which mints on deposit.
function mint(address _to, uint _amount) external;Access: onlyOwner. Reverts if _to is the zero address.
_to
address
The recipient of the minted token
_amount
uint
The number of tokens to mint
Returns: None.
setMetadata
Updates the token's name and symbol — a safety valve for malformed, unintelligible, or offensive metadata. Emits MetadataUpdated.
Access: onlyOwner.
name_
string
The new name for the token
symbol_
string
The new symbol for the token
Returns: None.
burn / burnFrom
Destroys tokens. burn burns from the caller; burnFrom burns from another account, deducting from the caller's allowance.
Access: public. burnFrom reverts if the caller has insufficient allowance.
account
address
The account to burn tokens from (burnFrom only)
value
uint
The amount of tokens to burn
Returns: None.
Last updated
Was this helpful?