The forgeContract is responsible for minting NFT's and in the arguments we have a token name and amount, why do we have a public hash key for minting NFT?
1 Answer
The reason you have to provide a public key hash to mint an NFT is to verify that any future NFTs minted under the same policy are originating from the same private key. The public key is a cryptographic identifier that only the developer/creator with access to the private key is able to reliably generate. See Wikipedia's entry on Public/Asymmetric Key Cryptography for a good primer.
Deeper dive: "NFTs" are created using Cardano Native Scripts that declare: "this was minted by a specific secret key, [optionally before a specific expiration time], belonging to the NFT creator". When you generate your policy ID for a Cardano NFT, that policy ID is actually hashed based off of the public key you are seeing in that minting script. So long as the Cardano nodes agree that "this is the way we mint NFTs", no one will be able to create a new NFT under the creator's specific policy ID without the private key corresponding to that public key hash you are seeing.