-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Hi
This isn't an issue per-say but worth mentioning it in the article as it could be over looked. The LazyMinter.js has to live on the backend and the minter has to be a private key that lives on the backend. This isn't immediately obvious. So the minter (backend private key) would sign the voucher. Someone might read the article and think the signer used in the LazyMinter.js is the creator which would live on the frontend in Metamask for example. I know this is stated in LazyMinter.js but it's easily over looked.
A little block explaining that its a backend key (minter) that signs vouchers would be nice. I had to look at the unit tests to realise that the minter was signer and reach the above conclusion.
I also think the creator should be added to the voucher.
struct NFTVoucher {
uint256 tokenId;
uint256 minPrice;
string uri;
bytes signature;
address creator
}
then
_mint(voucher.creator, voucher.tokenId);
Right now the "creator" would be the minter which isn't actually true. This all assumes that we want some third party (a marketplace like opensea) to deploy the LazyNFT.sol and not the creator because alas if the creator has to deploy LazyNFT.sol it wouldn't be saving them money.