0

I want to give free mints to people who owns an NFT from another collection. I can do it through importing interface of another contract and calling the balanceOf function with the related address, but when I do that, people can transfer their NFTs to different address after minting, then mint countlessly considering that they can transfer the NFT they minted as much as they can from the first contract to another address and keep getting free mints.

How do I prevent this issue?

I believe getting a snapshot of the holders at the moment, and just letting those people free mint. So, I will need lots of addresses for that. I can get them, but how do I give them to permission to free mint, let's say 200 addresses? Do I need to type them one by one? I don't think so... Do I need to import their addresses to another, new contract then call that new contract from my new collection?

1 Answers1

0

well, you can create an off chain merkle tree and use that to verify if some address will have a free mint, but it will probably make your mint function more gas expensive, maybe could be cheaper for the user if you use roles, where you give the list of user a role that let's them free mint and if you want to give them only one free mint you can revoke their role after that

jhonny
  • 805
  • 4
  • 10