A modern NFT Marketplace demo application showcasing the usage of multicoyn-sdk - a Web3 payment SDK for multichain crypto payments.
- π¨ Modern UI/UX - Beautiful responsive design with dark/light theme support
- π Web3 Integration - Seamless wallet connection via RainbowKit
- π NFT Marketplace - Browse, view details, and purchase NFTs
- π³ Multi-Payment Options - Pay with Metamask or Multicoyn SDK
- π Real-time Data - Live blockchain data fetching with wagmi hooks
- π± Responsive Design - Works perfectly on desktop and mobile devices
- β‘ Fast Development - Powered by Vite for instant HMR
- Node.js 18+
- npm, yarn, or pnpm
- MetaMask or any Web3 wallet
-
Clone the repository
git clone https://github.com/nicholaspai/multicoyn-quick-start.git cd multicoyn-quick-start -
Install dependencies
npm install # or yarn install # or pnpm install
-
Configure WalletConnect Project ID
Get your project ID from WalletConnect Cloud and update
src/wagmi.ts:export const config = getDefaultConfig({ appName: "Multicoyn NFT Marketplace", projectId: "YOUR_PROJECT_ID", // Replace with your project ID chains: [liskSepolia], ssr: false, });
-
Start the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:5173
multicoyn-quick-start/
βββ src/
β βββ assets/ # Static assets (images, icons)
β βββ components/ # React components
β β βββ icons/ # SVG icon components
β β βββ CategoryTabs.tsx
β β βββ CustomConnectButton.tsx
β β βββ Header.tsx
β β βββ NFTCard.tsx
β β βββ NFTDetailSidebar.tsx
β β βββ SearchBar.tsx
β β βββ Sidebar.tsx
β βββ context/ # React context providers
β β βββ ThemeContext.tsx
β βββ contracts/ # Smart contract configs & ABIs
β β βββ abis.ts
β β βββ config.ts
β βββ hooks/ # Custom React hooks
β β βββ useERC20.ts
β β βββ useMarketplace.ts
β β βββ useNFT.ts
β βββ utils/ # Utility functions
β β βββ format.ts
β β βββ metadata.ts
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
β βββ wagmi.ts # Wagmi configuration
β βββ index.css # Global styles
βββ package.json
βββ vite.config.ts
βββ tsconfig.json
The marketplace is deployed on Lisk Sepolia testnet:
| Contract | Address |
|---|---|
| Marketplace | 0x6381858ddC6bBcb758C23608636f53f1C577E4e2 |
| Mock NFT | 0xd5B14514255B6a6B23930A9D779414D59aA4D64b |
| USDT | 0x5734cD44e4DEe7Ec47a00d89a432d9a545a093fC |
| IDRX | 0xEF226b25263F1688cD370b558f6e3B89975F097E |
// Lisk Sepolia Testnet
{
id: 4202,
name: "Lisk Sepolia",
rpcUrls: ["https://rpc.sepolia-api.lisk.com"],
blockExplorer: "https://sepolia-blockscout.lisk.com"
}- Frontend Framework: React 19 with TypeScript
- Build Tool: Vite 7
- Styling: Tailwind CSS 4
- Web3 Libraries:
- wagmi - React Hooks for Ethereum
- viem - TypeScript Interface for Ethereum
- RainbowKit - Wallet connection UI
- TanStack Query - Data fetching & caching
The app uses RainbowKit for seamless wallet connection:
import { CustomConnectButton } from "./components";
function MyComponent() {
return <CustomConnectButton />;
}import { useGetAllMarketNFTs } from "./hooks/useMarketplace";
import { CONTRACTS } from "./contracts/config";
function NFTList() {
const { data: nfts } = useGetAllMarketNFTs(CONTRACTS.MOCK_NFT);
return (
<div>
{nfts?.map((nft) => (
<NFTCard key={nft.tokenId} {...nft} />
))}
</div>
);
}import { useBuyNFT } from "./hooks/useMarketplace";
import { useApproveToken } from "./hooks/useERC20";
function BuyButton({ listingId, price, paymentToken }) {
const { buyNFT } = useBuyNFT();
const { approve } = useApproveToken(paymentToken);
const handleBuy = async () => {
// First approve token spending
await approve(CONTRACTS.MARKETPLACE, price);
// Then buy the NFT
buyNFT(listingId);
};
return <button onClick={handleBuy}>Buy NFT</button>;
}The app supports both dark and light themes. Toggle between themes using the sidebar button:
import { useTheme } from "./context/ThemeContext";
function ThemeToggle() {
const { theme, toggleTheme } = useTheme();
return (
<button onClick={toggleTheme}>
{theme === "dark" ? "βοΈ Light Mode" : "π Dark Mode"}
</button>
);
}| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
Built with β€οΈ using multicoyn-sdk