Appearance
Solidity API
IPropsERC1155SignatureToCreate
Interface for the PropsERC1155SignatureToCreate facet
signatureToCreate
solidity
function signatureToCreate(string _metadata, bytes _signature, address[] _additionalSplits) external payable returns (uint256)Creates a new token using a signed metadata string
Parameters
| Name | Type | Description |
|---|---|---|
| _metadata | string | The metadata string for the new token |
| _signature | bytes | The signature of the metadata string |
| _additionalSplits | address[] | Additional addresses to receive splits |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | The ID of the newly created token |
relaySignatureToCreate
solidity
function relaySignatureToCreate(address _to, string _metadata, bytes _signature, address[] _additionalSplits) external payable returns (uint256)Allows a relayer to create a new token on behalf of a user
Parameters
| Name | Type | Description |
|---|---|---|
| _to | address | The address to receive the newly created token |
| _metadata | string | The metadata string for the new token |
| _signature | bytes | The signature of the metadata string |
| _additionalSplits | address[] | Additional addresses to receive splits |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | The ID of the newly created token |
setApprovedSigners
solidity
function setApprovedSigners(address[] _signers, bool _approved) externalAdds or removes approved signers
Parameters
| Name | Type | Description |
|---|---|---|
| _signers | address[] | The addresses of signers to update |
| _approved | bool | Whether to approve or remove the signers |
isApprovedSigner
solidity
function isApprovedSigner(address _signer) external view returns (bool)Checks if an address is an approved signer
Parameters
| Name | Type | Description |
|---|---|---|
| _signer | address | The address to check |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | True if the address is an approved signer, false otherwise |
ApprovedSignerUpdated
solidity
event ApprovedSignerUpdated(address signer, bool approved)Emitted when an approved signer is added or removed
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signer |
| approved | bool | Whether the signer was approved or removed |
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 |