Appearance
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) internalExecutes the burn-to-create process
Burns required tokens, creates a new token, and mints it to the recipient
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | Address to receive the newly created token |
| _metadata | string | Metadata for the new token |
| _additionalSplits | address[] |
_currentTokenIndex
solidity
function _currentTokenIndex() internal view returns (uint256)Gets the current token index
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | The current token index |
_setNumBurnTokensRequired
solidity
function _setNumBurnTokensRequired(uint256 _numBurnTokensRequired) internalSets the number of tokens required to burn for creating a new token
Parameters
| Name | Type | Description |
|---|---|---|
| _numBurnTokensRequired | uint256 | The number of tokens required to burn |
_setBurnTokenIndex
solidity
function _setBurnTokenIndex(uint256 _burnTokenIndex) internalSets the index of the token to be burned
Parameters
| Name | Type | Description |
|---|---|---|
| _burnTokenIndex | uint256 | The index of the token to be burned |
_setTokenRoyaltyIfAvailable
solidity
function _setTokenRoyaltyIfAvailable(uint256 tokenId, address receiver) internalSets the royalty for a token if the function exists using the _getDefaultRoyaltyBips function
Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 | The ID of the token to set the royalty for |
| receiver | address | The address to receive royalties |