Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgrade/foundry-nft-f23
This project consists of two types of NFTs: BuildNFT and MoodNft. The BuildNFT contract allows users to mint NFTs with a specified URI, while the MoodNft contract allows users to mint NFTs that can change moods between happy and sad.
https://github.com/cgrade/foundry-nft-f23
foundry nft nft-collection solidity
Last synced: about 2 months ago
JSON representation
This project consists of two types of NFTs: BuildNFT and MoodNft. The BuildNFT contract allows users to mint NFTs with a specified URI, while the MoodNft contract allows users to mint NFTs that can change moods between happy and sad.
- Host: GitHub
- URL: https://github.com/cgrade/foundry-nft-f23
- Owner: cgrade
- Created: 2024-08-22T00:01:09.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-10T07:59:27.000Z (about 2 months ago)
- Last Synced: 2024-11-10T08:30:04.547Z (about 2 months ago)
- Topics: foundry, nft, nft-collection, solidity
- Language: Solidity
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NFT Minting Project
This project consists of two types of NFTs: BuildNFT and MoodNft. The BuildNFT contract allows users to mint NFTs with a specified URI, while the MoodNft contract allows users to mint NFTs that can change moods between happy and sad.
## Contracts
### BuildNFT
- **Description**: An ERC721 token representing a BuildNFT.
- **Functions**:
- `mintNFT(string memory tokenUri)`: Mints a new NFT with the specified URI.
- `toKenURI(uint256 tokenId)`: Returns the URI for a given token ID.### MoodNft
- **Description**: An ERC721 token representing a Mood NFT that can change moods.
- **Functions**:
- `mintNFT()`: Mints a new Mood NFT with a default mood of HAPPY.
- `flipMood(uint256 tokenId)`: Flips the mood of the NFT between HAPPY and SAD.
- `tokenURI(uint256 tokenId)`: Returns the token URI for a given token ID.## Scripts
### MintBuildNft
- **Description**: Script to mint BuildNFT tokens.
- **Usage**: Call the `run()` function to mint a new BuildNFT.### MintMoodNft
- **Description**: Script to mint MoodNFT tokens.
- **Usage**: Call the `run()` function to mint a new MoodNFT.### DeployNFT
- **Description**: Script to deploy the BuildNFT contract.
- **Usage**: Call the `run()` function to deploy the contract.### DeployMoodNft
- **Description**: Script to deploy the MoodNft contract.
- **Usage**: Call the `run()` function to deploy the contract.## Testing
The project includes tests for both the BuildNFT and MoodNft contracts. Use the following commands to run the tests:
```bash
forge test
```## Installation
To install the necessary dependencies, run:
```bash
npm install
```## License
This project is licensed under the MIT License.