Problem
A creator want to put several works on sale but does not want to pay for all the minting-gas-costs up front. Only if a buyer actually wants to buy a work, they should pay for the gas. The creator should be correctly set as the Cryptomedia's creator, but the newly minted token should be directly assigned to the first buyer. Furthermore, the price for that token should be paid during this transaction also.
Possible Solution
Introduce a new function:
function mintAndBuyWithSig(
address creator,
address buyer,
uint256 amount,
address currency,
MediaData memory data,
IMarket.BidShares memory bidShares,
EIP712Signature memory sig
)
And the following MintAndBuyWithSig:
{
MintAndBuyWithSig: [
{ name: 'tokenURI', type: 'string' },
{ name: 'metadataURI', type: 'string' },
{ name: 'creatorShare', type: 'uint256' },
{ name: 'amount', type: 'uint256' },
{ name: 'currency', type: 'address' },
{ name: 'nonce', type: 'uint256' },
{ name: 'deadline', type: 'uint256' },
]
}
Like this it will be possible to mint and buy a Cryptomedia in one transaction. The creator has still the possibility to set the price.