Appearance
Solidity API
IPropsERC1155PayToCreate
TokenCreated
solidity
event TokenCreated(address account, uint256 tokenId)Emitted when a token is created using a signature
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address that created the token |
| tokenId | uint256 | The ID of the newly created token |
payToCreate
solidity
function payToCreate(string _metadata, address[] _additionalSplits) external payableAllows a user to pay to create a new token
Parameters
| Name | Type | Description |
|---|---|---|
| _metadata | string | The metadata URI for the new token |
| _additionalSplits | address[] | Additional addresses to receive a split of the payment |
relayPayToCreate
solidity
function relayPayToCreate(address _to, string _metadata, address[] _additionalSplits) external payableAllows a user to pay to create a new token on behalf of another address
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | The address that will own the new token |
| _metadata | string | The metadata URI for the new token |
| _additionalSplits | address[] | 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
| Name | Type | Description |
|---|---|---|
| _quantity | uint256 | The number of tokens to create |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | The total cost in wei |