![ai-nft](https://private-user-images.githubusercontent.com/106417552/257915060-59a7e84b-2eea-445a-9b65-aec2db8a7ebd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5MDg2MDIsIm5iZiI6MTcyMzkwODMwMiwicGF0aCI6Ii8xMDY0MTc1NTIvMjU3OTE1MDYwLTU5YTdlODRiLTJlZWEtNDQ1YS05YjY1LWFlYzJkYjhhN2ViZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QxNTI1MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lY2RiNjczZmQzMWQwN2E2ZTk2OTIxMGNlNzFhYTNjMDc2YTdlMzgyNjczZTQ5MGFkZGE0YjZhNzQyZDVhZTE4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.P7H1jQjan5TQIzTGET0BhZdYWF1bQwJFrHBfextH10U)
GeniusMintAI is a decentralized application that allows users to mint NFTs by providing a description that Stable Diffusion v2 converts into an image. The NFTs are minted on the Sepolia testnet and stored on IPFS using NFT.Storage. The smart contract is deployed to the sepolia testnet.
- 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
$ npm install
Before running any scripts, you'll want to create a .env file with the following values (see .env.example):
- REACT_APP_HUGGING_FACE_API_KEY=""
- REACT_APP_NFT_STORAGE_API_KEY=""
You'll need to create an account on Hugging Face, visit your profile settings, and create a read access token.
You'll also need to create an account on NFT.Storage, and create a new API key.
$ npx hardhat test
$ npx hardhat node
In a separate terminal execute:
$ npx hardhat run ./scripts/deploy.js --network localhost
$ npm run start
- Setup environment variables
You'll want to set your SEPOLIA_RPC_URL
and PRIVATE_KEY
as environment variables. You can add them to a .env
file, similar to what you see in .env.example
.
PRIVATE_KEY
: The private key of your account (like from metamask). NOTE: FOR DEVELOPMENT, PLEASE USE A KEY THAT DOESN'T HAVE ANY REAL FUNDS ASSOCIATED WITH IT.- You can learn how to export it here.
SEPOLIA_RPC_URL
: This is url of the goerli testnet node you're working with. You can get setup with one for free from Alchemy
Optionally, add your ETHERSCAN_API_KEY
if you want to verify your contract on Etherscan.
- Get testnet ETH
Head over to faucets.chain.link and get some tesnet ETH. You should see the ETH show up in your metamask.
- Deploy
npx hardhat run scripts/deploy.js --network sepolia
If you appreciated this, feel free to follow !