Full stack NFT market place based on Qtum testnet network
Live demo: https://remix.qtum.info/nftmarketplace/
- Web App: React.js
- Solidity development environment: Truffle Qtum Box
- File Storage: IPFS (Pinata)
- Wallet: Qtum Qnekt wallet
When a user lists an NFT for sale, the ownership of the item will be transferred from the creator to the marketplace contract.
When another user purchases an NFT, the purchase price will be transferred from the buyer to the seller and the item will be transferred from the marketplace to the buyer.
The marketplace owner will be able to set a listing fee. This fee will be taken from the seller and transferred to the contract owner upon completion of any sale, enabling the owner of the marketplace to earn recurring revenue from any sale transacted in the marketplace.
The marketplace logic consists of just one ECR721 smart contract
-
Create a qtum wallet
You can use
qnekt
wallet extension or create a qtum web wallet (choose optioncreate from mnemonic
)Save your
mnemonic
for later use. -
Fund your account with testnet qtum coins
Go to qtum testnet faucet and paste the address generated in step 1, to receive some funds.
-
Clone the repo
-
Create an
.env
file with the following variables
REACT_APP_PINATA_KEY= < paste key from https://www.pinata.cloud/ >
REACT_APP_PINATA_SECRET= < paste secret from https://www.pinata.cloud/ >
REACT_APP_QTUM_NETWORK="https://testnet-janus.qiswap.com/api/"
REACT_APP_QTUM_PRIV_KEY= < a private key from a valid Qtum address >
MNEMONIC= < mnemonic seed phrase >
Note: The NMENOMIC
seed phrase from step 1.
-
Deploy smart contract to qtum testnet
Run the following:
truffle migrate --network testnet
-
Verify contract
Go to qtum testnet block explorer and search the address of the contract returned by
truffle migrate
from previous step
Dev environment
npm run start
Production (docker based)
docker build -t qtum/nftstore .
docker run -d -p 3000:3000 --name qtumnft qtum/nftstore
On your Chrome browser go to http://localhost:3000/nftmarketplace
Make sure you have installed the Qtum Qnekt wallet browser extension