Skip to content

Solidity API

PropsERC1155BurnToCreateInternal

Internal contract for ERC1155 token with burn-to-create functionality

Inherits from multiple contracts to combine various functionalities

_executeBurnToCreate

solidity
function _executeBurnToCreate(address _to, string _metadata, address[] _additionalSplits) internal

Executes the burn-to-create process

Burns required tokens, creates a new token, and mints it to the recipient

Parameters

NameTypeDescription
_toaddressAddress to receive the newly created token
_metadatastringMetadata for the new token
_additionalSplitsaddress[]

_currentTokenIndex

solidity
function _currentTokenIndex() internal view returns (uint256)

Gets the current token index

Return Values

NameTypeDescription
[0]uint256The current token index

_setNumBurnTokensRequired

solidity
function _setNumBurnTokensRequired(uint256 _numBurnTokensRequired) internal

Sets the number of tokens required to burn for creating a new token

Parameters

NameTypeDescription
_numBurnTokensRequireduint256The number of tokens required to burn

_setBurnTokenIndex

solidity
function _setBurnTokenIndex(uint256 _burnTokenIndex) internal

Sets the index of the token to be burned

Parameters

NameTypeDescription
_burnTokenIndexuint256The index of the token to be burned

_setTokenRoyaltyIfAvailable

solidity
function _setTokenRoyaltyIfAvailable(uint256 tokenId, address receiver) internal

Sets the royalty for a token if the function exists using the _getDefaultRoyaltyBips function

Parameters

NameTypeDescription
tokenIduint256The ID of the token to set the royalty for
receiveraddressThe address to receive royalties