This is a simple proof of implementation for tron based marketplace
This application is built with Solidity, React, Tailwind CSS.
The smart contracts is written by Solidity with tronbox deployed on nile testnet.
Tron link wallet and @tronweb3/tronwallet-adapter-react-hooks are used to get the job done.
Context is used to handle the global state management.
- [NodeJS][node] v14 or greater
- [npm][npm] v6 or greater
- [tronbox][solc] v0.8.18
To verify things are set up properly, you can run this:
node --version
npm --version
tronbox- Frontend
npm install- Smart Contracts
npm install
npm install tronbox -g
tronbox --download-compiler 0.8.18- Frontend
npm run build- Smart Contracts
tronbox compile
tronbox migrate --network nileThe verified smart contracts tracking url is https://nile.tronscan.org/#/contract/TDgGM4t5RFL4obFHht8fcsED299m8huywA/code
- Frontend
npm run start- List product with name, description, price and image (Images are uploaded to IPFS using Pinata).
- Purchase products by sending TRX to owner.
- Transfer ownership without sending TRX.
- Withdraw transaction fees from smart contracts to marketplace owner.
- Calculate platform fee (default: 5%).
- Update platform fee by only owner.
- All digital assets can be tokenized using TRC721 to enhance the ownership and security.
- To implement combination of on-chain and off-chain functionality, we can build backend server and database.
- In frontend, we can apply customized CART and checkout pages to ensure better UX.
Abrahan Gerardo Marcano Rios 05/15/2023