FilStore is a decentralized marketplace built on Filecoin that allows users to create, buy, and sell both regular products and NFTs. The platform combines traditional e-commerce functionality with NFT capabilities.
-
Product Management
- Create products with name, description, price, and images
- Support for both regular products and NFTs
- Product ownership tracking
-
NFT Integration
- Mint NFTs for products
- Transfer NFT ownership upon purchase
- Store metadata and image URIs
-
User Features
- Purchase products with cryptocurrency
- View owned products
- Track purchase history
The project's core is the FilStore.sol smart contract which implements:
- ERC721 standard for NFTs
- Product creation and management
- Purchase functionality
- Ownership tracking
- Withdrawal capabilities
createProduct: Create a new product (can be NFT or regular)purchaseProduct: Buy a productwithdraw: Owner can withdraw collected fundsgetUserProducts: View products owned by a usergetProduct: Get product details
-
Smart Contract
- Solidity ^0.8.20
- OpenZeppelin Contracts
- Hardhat for development
-
Frontend
- Next.js
- Chakra UI
- Wagmi for Web3 integration
- Viem for Ethereum interaction
- Install dependencies:
npm install- Configure environment variables:
Create a
.envfile with:
CALIBRATION_RPC_URL=your_rpc_url
PRIVATE_KEY=your_private_key
- Compile contracts:
npx hardhat compile- Deploy to Calibration Network:
npm run deployCurrently deployed on Filecoin Calibration Network for testing.
MIT License