EncodeType
EncodeType
Struct needed for endodeType and encodeData, see https://eips.ethereum.org/EIPS/eip-712#definition-of-encodetype
Structs
TokenVoucher
struct TokenVoucher {
bytes32 tokenURI;
uint256 price;
uint256 endTime;
uint256 tokenId;
uint256 ERC1155Value;
uint256 salt;
address buyer;
address ERC1271Account;
address royaltyRecipient;
uint96 royaltyBps;
uint96[] commissionBps;
address[] commissionRecipients;
}Properties
tokenURI
bytes32
the IPFS hash of the metadata
price
uint256
endTime
uint256
salt for when the signed voucher should expire, if no expiration is needed, salt should be type(uint256).max i.e. 2**256 - 1, or anything above 2^32, i.e. 4294967296, i.e. voucher expires after 2106 (in 83 years time)
tokenId
uint256
the id of the token to sell
ERC1155Value
uint256
salt
uint256
salt for the signature, to prevent replay attacks, also because it is the only way to make the same voucher unique, or else it would not be possible to sign the same encodeData twice because the signature is voided after lazyBuy is executed The voucher is not voided after lazyMint because it is not supposed to be used more than once; enforced in ERC721Metadata_URI-_mint() to avoid repolay attacks
buyer
address
if not empty, indicates that the voucher is for a specific address
ERC1271Account
address
if not empty, indicates that the signer is a contract that implements ERC1271
royaltyRecipient
address
royaltyBps
uint96
royalty basis points. Will be ignored in lazyBuy, while it must be used in lazyMint
commissionBps
uint96[]
array of commission basis points, i.e. 10000 = 100%, commissionBps.length must be the same as commissionRecipients.length
commissionRecipients
address[]
array of commission recipients
MarketplaceVoucher
Properties
price
uint256
endTime
uint256
salt for when the signed voucher should expire, if no expiration is needed, salt should be type(uint256).max i.e. 2**256 - 1, or anything above 2^32, i.e. 4294967296, i.e. voucher expires after 2106 (in 83 years time)
tokenId
uint256
the tokenId will be ignored in lazyMint, because it will be _owners.length while it must beused in lazyBuy
ERC1155Value
uint256
salt
uint256
salt for the signature, to prevent replay attacks, also because it is the only way to make the same voucher unique, or else it would not be possible to sign the same encodeData twice because the signature is voided after lazyBuy is executed The voucher is not voided after lazyMint because it is not supposed to be used more than once; enforced in ERC721Metadata_URI-_mint() to avoid repolay attacks
collection
address
buyer
address
if not empty, indicates that the voucher is for a specific address, and that the voucher
ERC1271Account
address
if not empty, indicates that the signer is a contract that implements ERC1271
commissionBps
uint96[]
array of commission basis points, i.e. 10000 = 100%, commissionBps.length must be the same as commissionReceivers.length
commissionReceivers
address[]
array of commission receivers
Last updated