Phoenix-NFT-MasterCourse

所属分类:IPFS
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-08-04 22:41:11
上 传 者sh-1993
说明:  一个最终的去中心化NFT合同-关于代码中的NFT您需要了解的一切,
(An ultimate decentralized NFT contract - everything you need to know about NFTs in code! ,)

文件列表:
LICENSE (1070, 2023-08-08)
contracts/ (0, 2023-08-08)
contracts/BasicNft.sol (884, 2023-08-08)
contracts/DynamicSvgNft.sol (3297, 2023-08-08)
contracts/RandomIpfsNft.sol (4524, 2023-08-08)
contracts/sublesson/ (0, 2023-08-08)
contracts/sublesson/CallAnything.sol (5748, 2023-08-08)
contracts/sublesson/Encoding.sol (2098, 2023-08-08)
contracts/test/ (0, 2023-08-08)
contracts/test/MockV3Aggregator.sol (123, 2023-08-08)
contracts/test/VRFCoordinatorV2Mock.sol (127, 2023-08-08)
deploy/ (0, 2023-08-08)
deploy/00-deploy-mock.js (964, 2023-08-08)
deploy/01-deploy-basicNft.js (939, 2023-08-08)
deploy/02-deploy-random-ipfs-nft.js (3670, 2023-08-08)
deploy/03-deploy-dynamicSvgNft.js (1483, 2023-08-08)
deploy/04-mint.js (1940, 2023-08-08)
hardhat.config.js (1511, 2023-08-08)
helper-hardhat-config.js (1010, 2023-08-08)
images/ (0, 2023-08-08)
images/dynamicNft/ (0, 2023-08-08)
images/dynamicNft/frown.svg (1082, 2023-08-08)
images/dynamicNft/happy.svg (388, 2023-08-08)
images/randomNft/ (0, 2023-08-08)
images/randomNft/pug.png (5688, 2023-08-08)
images/randomNft/shiba-inu.png (6392, 2023-08-08)
images/randomNft/st-bernard.png (10346, 2023-08-08)
package-lock.json (580076, 2023-08-08)
package.json (1125, 2023-08-08)
test/ (0, 2023-08-08)
test/unit/ (0, 2023-08-08)
test/unit/01-test-basicNft.js (1843, 2023-08-08)
test/unit/03-dynamicSvgnft.test.js (7031, 2023-08-08)
test/unit/randomIpfsNft.test.js (4897, 2023-08-08)
utils/ (0, 2023-08-08)
utils/uploadToPinata.js (1449, 2023-08-08)
utils/verify.js (439, 2023-08-08)

# Phoenix-NFT-MasterCourse This repository contains three Solidity smart contracts that allow you to generate NFTs based on rarity and push them to IPFS. The contracts are designed to work with the Chainlink VRF (Verifiable Random Function) to create unique and random NFTs. Additionally, it includes a basic NFT contract for minting simple NFTs. ## Contracts ### 1. RandomIpfsNft.sol This contract generates NFTs with varying rarities (rare, semi-rare, and common) using Chainlink VRF. Users can pay to mint an NFT, and the owner of the contract can withdraw the Ether received. ### 2. BasicNft.sol This contract allows users to mint simple NFTs without any randomness. Each NFT will have the same URI pointing to an IPFS file. ### 3. DynamicSvgNft.sol This contract generates dynamic SVG NFTs based on the Chainlink price feed. The NFT's appearance changes according to the latest price provided by the Chainlink node. It includes two SVG files for low and high values of the price feed. ## Getting Started ### Prerequisites - Node.js - npm - Hardhat (Ethereum development environment) - Chainlink VRF - IPFS ### Deployment and Testing 1. Clone this repository to your local machine. 2. Install the required dependencies by running `npm install`. 3. Set up and deploy the Chainlink VRF contract on the desired network. 4. Deploy the contracts using the Hardhat deployment scripts: - Use the `RandomIpfsNft` constructor to pass the Chainlink VRF contract address and other required parameters. - For `DynamicSvgNft`, pass the Chainlink price feed address, and the base64-encoded SVG images for low and high values. 5. After deploying the contracts, test their functionalities using the provided test scripts. You can use Hardhat's testing framework or any other testing library you prefer. 6. Mock the Chainlink node to provide specific random numbers and prices for testing various scenarios. ## Manipulating Values for Testing To mock the Chainlink node's response, you can use various testing techniques: 1. Mock Chainlink VRF: - Use Hardhat's mockup feature or deploy a custom mock Chainlink VRF contract to control the random number generation. 2. Mock Chainlink Price Feed: - Use Hardhat's mockup feature or deploy a custom mock Chainlink price feed contract to set specific price values. 3. Use Test Networks: - Deploy the contracts on test networks (e.g., Sepolia, Rinkeby) to interact with real Chainlink nodes and observe real-world responses. ## Disclaimer Always exercise caution when deploying smart contracts and handling real funds. Consider security best practices and consult with blockchain experts if necessary. ## License This project is licensed under the MIT License. See the [LICENSE](https://github.com/chidubesteve/Phoenix-NFT-MasterCourse/blob/master/LICENSE) file for details.

近期下载者

相关文件


收藏者