This is a basic implementation of the token ERC-721 using Hardhat.
- Create a new
.env
file insolidity-nft
folder and add these:
ALCHEMY_API_KEY_URL="" // Get this from your Alchemy project (https://dashboard.alchemyapi.io/)
PRIVATE_KEY="" // In Metamask, go to Account Details > Export Private Key
- Run these lines in a command line:
npx hardhat compile
npx hardhat run scripts/deploy.js --network rinkeby
If it worked, the contract address should be printed.
A sample contract was deployed to Rinkeby: https://rinkeby.etherscan.io/address/0x9C9807e02B9600fBF1B249F3cacFc4728fd3BfF4