Skip to content

Solidity API

IPropsERC1155PayToCreate

TokenCreated

solidity
event TokenCreated(address account, uint256 tokenId)

Emitted when a token is created using a signature

Parameters

NameTypeDescription
accountaddressThe address that created the token
tokenIduint256The ID of the newly created token

payToCreate

solidity
function payToCreate(string _metadata, address[] _additionalSplits) external payable

Allows a user to pay to create a new token

Parameters

NameTypeDescription
_metadatastringThe metadata URI for the new token
_additionalSplitsaddress[]Additional addresses to receive a split of the payment

relayPayToCreate

solidity
function relayPayToCreate(address _to, string _metadata, address[] _additionalSplits) external payable

Allows a user to pay to create a new token on behalf of another address

Parameters

NameTypeDescription
_toaddressThe address that will own the new token
_metadatastringThe metadata URI for the new token
_additionalSplitsaddress[]Additional addresses to receive a split of the payment

calculatePayToCreateCost

solidity
function calculatePayToCreateCost(uint256 _quantity) external view returns (uint256)

Calculates the cost to create a specified quantity of tokens

Parameters

NameTypeDescription
_quantityuint256The number of tokens to create

Return Values

NameTypeDescription
[0]uint256The total cost in wei