https://github.com/hardworking-toptal-dev/nft-smart-contract-solidity
https://github.com/hardworking-toptal-dev/nft-smart-contract-solidity
nft-smart-contract solidity typescript
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/hardworking-toptal-dev/nft-smart-contract-solidity
- Owner: hardworking-toptal-dev
- Created: 2024-05-08T17:04:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-08T17:04:54.000Z (about 2 years ago)
- Last Synced: 2025-03-28T15:50:03.645Z (about 1 year ago)
- Topics: nft-smart-contract, solidity, typescript
- Language: TypeScript
- Homepage:
- Size: 1.08 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
1 . Clone this repo:
```sh
g
```
2 . Change into the directory:
```sh
cd hardhat-nft-smart-contract
```
3 . Install dependencies:
```sh
npm install
```
4 . Set up environment variables:
```sh
cp .env.example .env
```
Replace 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 `hiddenMetadataUri` with yours
## Commands
### Test
```sh
npx hardhat test
```
### Deploy
1 . `Network: hardhat(default)`:
```sh
npx hardhat deploy
```
2 . `Network: localhost`:
```sh
npx hardhat node
```
Launch another terminal and run the following command:
```sh
npx hardhat deploy --network localhost
```
3 . `Network: rinkeby/mainnet/mumbai/polygon`:
```sh
npx deploy --network
```
4 . `Tags`:
Deploying without the `--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:
```sh
npx hardhat deploy --network rinkeby --tags updateFrontEnd
```
> The tag name is set at the bottom of the deploy script file.
> Using Hardhat Network and running only `deploy/02-update-front-end.ts` will result in an error.
### Scripts
1 . Open allowlist sale:
```sh
npm run open-allowlist -- --network
```
2 . Open public sale:
```sh
npm run open-public -- --network
```
3 . Close sales:
```sh
npm run close -- --network
```
4 . Reveal collection:
```sh
npm run reveal -- --network
```