nosu-nfts
Version:
ERC721A base contract for Nosu
168 lines (139 loc) • 4.63 kB
Markdown
[](https://opensource.org/licenses/MIT)
[](https://badge.fury.io/js/nosu-nfts)
# nosu-nfts
```
.S_sSSs sSSs_sSSs sSSs .S S.
.SS~YS%%b d%%SP~YS%%b d%%SP .SS SS.
S%S `S%b d%S' `S%b d%S' S%S S%S
S%S S%S S%S S%S S%| S%S S%S
S%S S&S S&S S&S S&S S&S S&S
S&S S&S S&S S&S Y&Ss S&S S&S
S&S S&S S&S S&S `S&&S S&S S&S
S&S S&S S&S S&S `S*S S&S S&S
S*S S*S S*b d*S l*S S*b d*S
S*S S*S S*S. .S*S .S*P S*S. .S*S
S*S S*S SSSbs_sdSSS sSS*S SSSbs_sdSSS
S*S SSS YSSP~YSSY YSS' YSSP~YSSY
```
This repository use [Hardhat](#hardhat) and [Foundry](#foundry) to compile, deploy and test the Solidity Smart Contract.
The contract NosuWorl is inheriting [ERC721A](https://github.com/chiru-labs/ERC721A), [Ownable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol) and using [MerkleProof](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol) to validate OG and WL users.
This repository use NodeJS version 18.
## Directories
- [abi/](./abi/)
- [constants/](./constants/)
- [scripts/](./scripts/)
- [.env.development.sample](./.env.development.sample)
- [.prettierignore](./.prettierignore)
- [.prettierrc](./.prettierrc)
- [.solcover.js](./.solcover.js)
- [awesome-readme.config.js](./awesome-readme.config.js)
- [contractsAddressDeployed.json](./contractsAddressDeployed.json)
- [contractsAddressDeployedHistory.json](./contractsAddressDeployedHistory.json)
- [foundry.toml](./foundry.toml)
- [hardhat.config.js](./hardhat.config.js)
- [hardhat.flat.config.js](./hardhat.flat.config.js)
- [LICENSE](./LICENSE)
- [package-lock.json](./package-lock.json)
- [package.json](./package.json)
- [README.md](./README.md)
- [remappings.txt](./remappings.txt)
## Hardhat
This project use [Hardhat](https://hardhat.org/docs) for compiling the contracts, deployment and testing purposes.
It include:
- The constants use for deployment and testing in [constants/](./constants/)
- The contracts in [contracts/](./contracts/)
- The tests in [test/](./test/)
- The deployment script in [scripts/](./scripts/)
- The Hardhat config in [hardhat.config.js](./hardhat.config.js)
### Hardhat - First step - Install dependencies
```
npm install
```
Or
```
yarn
```
### Hardhat - Compile contract
```
npx hardhat compile
```
### Hardhat - Run all tests
```
npx hardhat test
```
### Hardhat - Run coverage report
```
npx hardhat coverage
```
### Hardhat - Run deployment script
```
npm run deploy-test
```
Or
```
yarn deploy-test
```
## Foundry
This project use [Foundry](https://github.com/foundry-rs/foundry) for compiling the contracts and testing purposes.
It include:
- The contracts in [contracts/](./contracts/)
- The tests in [contracts/test/](./contracts/test/)
- The Foundry config in [foundry.toml](./foundry.toml)
- The Foundry import remappings in [remappings.txt](./remappings.txt)
### Foundry - First step - Install dependencies, install Foundryup and build test data
First, install all npmjs dependencies.
```
npm install
```
Or
```
yarn
```
Second, install Foundry on your system -> [Foundry](https://github.com/foundry-rs/foundry)
This will require to have Rust install -> [Rust](https://www.rust-lang.org/)
Finally, build the test data, by running, this will create a file in contracts/test/shared/testData.t.sol with some tests data for some forge tests to use.
```
npm run build
```
Or
```
yarn build
```
### Foundry - Compile contract
```
forge compile
```
### Foundry - Run all tests
```
forge test
```
## Directory Tree
```
nosu-nfts/
│ .env.development.sample
│ .prettierignore
│ .prettierrc
│ .solcover.js
│ awesome-readme.config.js
│ contractsAddressDeployed.json
│ contractsAddressDeployedHistory.json
│ foundry.toml
│ hardhat.config.js
│ hardhat.flat.config.js
│ LICENSE
│ package-lock.json
│ package.json
│ README.md
│ remappings.txt
└─── abi/
└─── constants/
└─── scripts/
│ NosuWorld.json
│ index.js
│ OG.js
│ README.md
│ WL.js
│ buildAbi.js
│ buildRootAndProofs.js
│ deploy.js
│ README.md
```
## Don't hesitate to contribute to this project.