VjkNFT dApp Hero Section.
- React
- Solidity
- OpenZeppelin
- ChainLink
- UniSwap
Our program consists of a group of smart contracts, which automatically interact with a single smart contract: VjkNFT.sol: 0x4A9f1122c1898DE7218B5eF5b49c4EFEB23Db1D6 Goerli
, and a react application to interact with this contract:
Swaper.sol
Contract responsible for swapping ETH for ChainLink token. All automation of our software is done using tools supported by ChainLink. Before starting any process, we need ChainLink Token.APIConsumer.sol
Contract responsible for interviewing Kenny West, and returning us an epic quote, hehe.VRF.sol
Contract responsible for requesting some random numbers using ChainLink VRF, with those numbers, the same contract creates a unique SVG.VjkNFT.sol
Main contract responsible for automating the entire process and storing the entire collection of NFTs and remaining ChainLink tokens.
To interact with our application and create a unique NFT go to: vjknft.web.app.
You can also clone this repository, change contracts in smart_contracts
folder.
You can use our client
application and interact with contracts already deployed on Goerli testnet.
Our application consists of a button to create a new NFT and a section to show all the NFT created in this collection. However, several steps are followed automatically during creation:
1ΒΊ: Require before start to generate nft, swap the amount paid by the user in ETH to ChainLink Token, using Swaper.sol
. After Fund APIConsumer.sol
and VRF.sol
.
2ΒΊ: Request KennyWestAPI quote through a ChainLink API call, get the quoteID
. Request one single SVG via ChainLink VRF, get the svgID
. Mint one tokenID
with those IDs.
3ΒΊ: Create a upkeepID
by tokenID
and finish to mint. Now the user have paid ChainLink and have they set of ID to proove it.
4ΒΊ: ChainLink will keep checking APIConsumer.sol
and VRF.sol
if quote and svg exists.
5ΒΊ: When both contracts finish creating quote
and svg
, our ChainLinkUpKeep will set the tokenURI (link this information with our tokenID
). And after that, cancel upkeep to not spend more ChainLink Token, and send the remaining amount to VjkNFT.sol
.
6ΒΊ: All the ChainLink Token remaining (profit), can be checked contractLinkBalance()
and withdrawn withdrawLink()
.
Our dapp will guide you through the whole process.
The project is still under development and the next updates will focus on the following tasks:
- Contracts - Fully Automated
- Transactions - Gas Optimization
To contribute to VjkNFT, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<message_commit>'
- Push to the original branch:
git push origin VjkNFT / <local>
- Create the pull request.
Alternatively, see the GitHub documentation at how to create a pull request.
This project is under license. See the LICENSE file for more details.