Skip to content

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

NameTypeDescription
_metadatastringThe metadata string for the new token
_signaturebytesThe signature of the metadata string
_additionalSplitsaddress[]Additional addresses to receive splits

Return Values

NameTypeDescription
[0]uint256The 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

NameTypeDescription
_toaddressThe address to receive the newly created token
_metadatastringThe metadata string for the new token
_signaturebytesThe signature of the metadata string
_additionalSplitsaddress[]Additional addresses to receive splits

Return Values

NameTypeDescription
[0]uint256The ID of the newly created token

setApprovedSigners

solidity
function setApprovedSigners(address[] _signers, bool _approved) external

Adds or removes approved signers

Parameters

NameTypeDescription
_signersaddress[]The addresses of signers to update
_approvedboolWhether 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

NameTypeDescription
_signeraddressThe address to check

Return Values

NameTypeDescription
[0]boolTrue 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

NameTypeDescription
signeraddressThe address of the signer
approvedboolWhether the signer was approved or removed

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