I want to make a 721 contract, which can be minted at the specified time, but cannot be traded during the minting time. Is there any simple way to achieve this?
Hi, welcome to the community~
I think one way to achieve this is by utilizing a time lock mechanism that restricts transfers or trades of the NFT until a specific time has passed.
For example:
contract TimelockedNFT {
uint256 public unlockTime; // Time when trading is allowed
constructor(uint256 _unlockTime) {
unlockTime = _unlockTime;
}
function transferFrom(address from, address to, uint256 tokenId) public {
require(block.timestamp >= unlockTime, "Trading is not allowed yet");
XXX;
}
}