How to restrict NFT minting using the dApp only
I'm building a dApp using React and node.js which would allow my NFT collection tokens(ERC721) to be minted. I want to restrict so that users can only mint token using my Built dApp and not allowed to mint interacting directly with smart contract.
I'm aware I need to sign the mint transaction request and verify it in the contract to make sure the mint transaction request was done by the contract owner.
However I'm unclear how to exactly sign the request in React Dapp and then verify it in the Solidity contract function.
Solution 1:
So you want your user to sign a mint transaction request through you dApp to then be able to mint an NFT? But if you check that the mint request comes from the contract owner, then only you will be able to mint a new token, is that what you want? But even if you impose an intermediary mint request before the actual mint, this won't prevent users from making a mint request by interacting directly with the smart contract and not your dApp. I'm not sure what you are looking for is feasible, to be honest.