Appearance
Solidity API
PropsERC1155PayToCreateInternal
Internal contract for ERC1155 token with burn-to-create functionality
Inherits from multiple contracts to combine various functionalities
_executePayToCreate
solidity
function _executePayToCreate(address _to, string _metadata, address[] _additionalSplits) internal returns (uint256 totalFee, address[] recipients, uint256[] feeAmounts)Executes the pay-to-create process
Creates a new token for a fee, 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 |
_calculateCost
solidity
function _calculateCost(uint256 _quantity) internal view returns (uint256 totalCost)Calculates the total cost for creating a specific quantity of tokens
Parameters
| Name | Type | Description |
|---|---|---|
| _quantity | uint256 | The number of tokens to create |
Return Values
| Name | Type | Description |
|---|---|---|
| totalCost | uint256 | The total cost for creating the specified quantity of tokens |
_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 |