- Solidity (Writing Smart Contracts & Tests)
- Javascript (React & Testing)
- Hardhat (Development Framework)
- Ethers.js (Blockchain Interaction)
- React.js (Frontend Framework)
- NFT.Storage (Connection to IPFS)
- Hugging Face (AI Models)
- Install NodeJS
git clone https://github.com/devx15/AI_NFT_Generator.git
- Install node.js from the link given below: 'https://nodejs.org/en/download'
- Run the the following command in CMD/Terminal
$ npm install
- This command will download npm and all its dependencies.
'.env' file stores private tokens which are required to identify the user. Here we would be storing two tokens created from Hugging Face and NFT Storage.
-
Create an account on 'Huggging Face' website
Settings ACCESS TOKENS -
Create a personal token and copy the token in .env file in the following format **REACT_APP_HUGGING_FACE_API_KEY="---Copy HERE---"
NEW TOKEN SHOW TOKENS -
Create an account on NFT.Storage : 'https://nft.storage/login/'
-
Create a personal token and copy the token in .env file in the following format REACT_APP_NFT_STORAGE_API_KEY="---Copy HERE---"
Hardhat is used to run and compile the solidity code. Follow these steps for setting up hardhat:
- Install the hardhat packages by running the following command on CMD/Terminal
$ npm install --save-dev hardhat
- Run a test
$ npx hardhat test
- After successful run initiate the Hardhat Node by using the following command on CMD/Terminal
$ npx hardhat node
- Twenty accounts and their private keys would be generated.
- Copy any private key from one of them.
-
Download and create an account on Metamask 'https://metamask.io/download/'
-
After creating an account import an account by pasting the private key copied earlier.
Settings ACCESS TOKENS -
Click on add network and add network manually, configure the network accordingly.
$ npx hardhat run ./scripts/deploy.js --network localhost
$ npm run start
- After deploying, a webpage would appear.
- Click on connect button.
- Now your setup is complete, create your NFT.......
Example 1 | Example 2 |
---|---|