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?

2
  • not sure to understand, but what you can do is to create a mapping(address mapping(uint => bool)) where address is the address of the smart contract (NFT), uint is the ID of the token, and bool returns true if free mints have been done for this specific token ID Mar 16 at 7:02
  • There are two contracts. In contract A, people will mint for a fee. In contract B, people will be able to free mint if they have minted from contract A. I can do this. But people can transfer their NFTs to another address and get lots of free mint from contract B this way. How do I prevent this? Mar 16 at 18:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.