This project includes 5 small tasks:
-
Wallet Connection
-
Uploading JPEG File and Minting it as NFT
-
List the minted NFT in OpenSea Marketplace
-
Create a Token Gated Access
-
Build a simple DEX
Run these commands to clone the repository and install dependencies.
cd blockchain_assignment
git clone git@github.com:sheilashehu/blockchain_challenge.git
yarn install
cd my-app
yarn dev
Prerequisite:
- Install the Metamask Wallet extension in your browser.
- Make sure you have enough test tokens (Rinkeby Test Network)
- Connect with Metamask Wallet (If connected, you will be redirected to the NFT Minter)
- Choose a file and fill out the name and description.
- Upload the file to IPFS Decentralized Database and wait for alert confirmation.
- Click MINT button to mint NFT and wait for alert confirmation.
- After the confirmation is received, you should be able to see the transaction in Rinkeby Etherscan. You will also be able to find the NFT in OpenSea Test Marketplace.
- After the transaction is performed, you may click on the 'Load Dex' button to access DEX and perform transactions.
CP Token Address: 0x29533859D43e92b3A46A1d42d5E35D8e731A38F2
- Initially, you have to deposit eth test tokens to DEX and add import CP token to your Metamask Wallet assets, using the above contract address.
- Next, you can exchange eth by placing a market order.
- The exchange rate will be based on existing limit orders in the SELL/BUY Order Book.
- You should also be able to place your own limit orders in the DEX marketplace.
- Finally, you can withdraw either Eth or CP Tokens to your Metamask Wallet.
Metamask Wallet
Hardhat - development framework
React Js / NextJs - front end framework
Solidity - ethereum smart contract language
JavaScript - logic front end and testing smart contracts
ethers.js - library interact with ethereum nodes
Alchemy - connection to ethereum network
Open Zeppelin - smart contract libraries