The Role of Smart Contracts in NFTs: A Deep Dive