Table of Contents
This is a submission for StackUp's OpenStack NFT Marketplace Bounty.
- user can connect wallet to marketplace
- user can give approves marketplace to transfer NFT
- user can list own NFTs for sale
- user can buy listed NFTs
-
First, click on "Connect Wallet" on the upper right corner.
-
After connected, you will be able to see "List NFT" button on the upper right corner. Click on it to open List Item form.
-
Fill in contract address and id for the NFT to be listed, then click "Next".
-
Wait for NFT to be loaded and fill up the selling price before submitting the form. You will be prompted to approve marketplace to transfer NFT and the transaction to list item.
-
First, click on "Connect Wallet" on the upper right corner.
-
After connected, you will be able to see "Buy Now" button on NFT listed that are still available. Click on the button and approve the transaction to buy item.
-
OpenZeppelin as framework to build secure smart contract
-
Hardhat for unit testing & deployment of Solidity smart contract
-
Polygon Mumbai as EVM testnet for the smart contract
-
Next.js as framework for frontend web app development
-
Mantine for building beautiful, responsive & accessible components
-
Thirdweb SDK and Ethersjs for connecting to user wallet & interacting with the testnet
-
Firebase for hosting frontend app
- Install Node.js 18
- Clone the repo
git clone https://github.com/teyweikiet/stackup-openstack-nft-marketplace-bounty.git
- Go to backend directory
cd backend
- Install NPM packages
npm install
- Create .env and modify accordingly
- Get polygonscan api key here. [how-to]
- To get wallet's private key in Metamask
cp .env.example .env
- Compile and deploy smart contract to polygon mumbai
npm run compile
npm run deploy:mumbai
- Get the address from console and use it for env in frontend
- Go to frontend directory
cd frontend
- Install NPM packages
npm install
- Create .env and modify accordingly
cp .env.example .env