I'm facing a challenge with my NFT marketplace project. How I can create NFTs with the rule that those NFTs can only be sold on our own platform but others. Technically is possible, however, I need some help here.
Thank you.
Yes this possible For that you have to maintain a mapping or some sort of logic on smart contract level to keep track of whether to and from address belong to your ERC 721 contract or not.
transferFrom(from, to, tokenId)
Like when someone mints NFT on your smart contract you can save the address of the minter. And at the time of selling of you can have a condition at the start of transferFrom like.
require(to == exists[to], "Warning, You are selling outside of the contract")
mapping can be something of like this. mapping(address => address) exists;