ERC1155Royalty

ERC1155Royalty

Git Source

Inherits: ERC2981, ERC1155

Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment information.

Functions

_burn

Burns a specific token.

This override additionally clears the royalty information for the token.

function _burn(address _from, uint256 _tokenId, uint256 _value) internal virtual override;

Parameters

Name
Type
Description

_from

address

The owner of the token.

_tokenId

uint256

The token ID to burn.

_value

uint256

The amount of tokens to burn.

_mint

Mints a new token.

msg.sender cannot be assigned as royalty recipient because of lazy minting it may be the buyer. Therefore it is necessary to pass royalty information as raw bytes in order to keep the function signature unchanged.

Parameters

Name
Type
Description

_to

address

The address to mint the token to.

_tokenId

uint256

The token ID; the child/derived contract is responsible for calculating it.

_value

uint256

The amount of tokens to mint.

_data

bytes

The raw bytes of the royalty information and tokenURI, the first 32 bytes are the tokenURI.

Last updated