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 !