1 . Clone this repo:
g2 . Change into the directory:
cd hardhat-nft-smart-contract3 . Install dependencies:
npm install4 . Set up environment variables:
cp .env.example .envReplace the values of the variables you need in the .env file with yours.
5 . Set up project-config.ts:
- Replace the file paths with yours
- Replace
hiddenMetadataUriwith yours
npx hardhat test1 . Network: hardhat(default):
npx hardhat deploy2 . Network: localhost:
npx hardhat nodeLaunch another terminal and run the following command:
npx hardhat deploy --network localhost3 . Network: rinkeby/mainnet/mumbai/polygon:
npx deploy --network <networkName>4 . Tags:
Deploying without the --tags <tags> option runs all deploy scripts in the deploy directory.
For example, if you want to run only deploy/02-update-front-end.ts using the rinkeby network:
npx hardhat deploy --network rinkeby --tags updateFrontEndThe tag name is set at the bottom of the deploy script file.
Using Hardhat Network and running only
deploy/02-update-front-end.tswill result in an error.
1 . Open allowlist sale:
npm run open-allowlist -- --network <networkName>2 . Open public sale:
npm run open-public -- --network <networkName>3 . Close sales:
npm run close -- --network <networkName>4 . Reveal collection:
npm run reveal -- --network <networkName>