A React-based web application for minting and transferring NFTs across multiple blockchain networks using ZetaChain's cross-chain infrastructure.
- Multi-Chain NFT Minting: Mint NFTs on Ethereum Sepolia and Base Sepolia
- Cross-Chain Transfers: Seamlessly transfer NFTs between supported chains
- Wallet Integration: Support for multiple wallet providers via EIP-6963 and Dynamic wallet
- Local Storage: NFT metadata and transfer history stored locally
- Real-time Updates: Live tracking of transfer status and blockchain confirmations
- Ethereum Sepolia (Chain ID: 11155111)
- Base Sepolia (Chain ID: 84532)
This application requires you to deploy your own Universal NFT contracts. The contract addresses in the code are examples only and implement owner-only minting restrictions.
You MUST follow the ZetaChain Universal NFT tutorial to:
- Deploy Universal NFT contracts on Ethereum Sepolia and Base Sepolia
- Connect the contracts for cross-chain communication
- Update the contract addresses in
src/constants/contracts.ts
Without deploying your own contracts, you won't be able to mint or transfer NFTs using this example.
- Node.js 18+ and yarn
- A Web3 wallet (MetaMask, WalletConnect, etc.)
- Testnet ETH on Ethereum Sepolia and Base Sepolia for gas fees
- Clone the repository:
git clone <repository-url>
cd vibecoding-nft-fe
- Install dependencies:
yarn install
- Start the development server:
yarn dev
- Open your browser and navigate to
http://localhost:5173
- Connect your wallet to the application
- Select your desired network (Ethereum Sepolia or Base Sepolia)
- Click "Mint NFT" to create a new NFT with metadata
- Confirm the transaction in your wallet
- Your NFT will appear in the NFT list once minted
- View your minted NFTs in the main interface
- Select a destination chain from the dropdown
- Click "Transfer" to initiate a cross-chain transfer
- Approve the transaction to allow the bridge contract to transfer your NFT
- Confirm the cross-chain transfer transaction
- Monitor the transfer progress in the console logs
- EVMUniversalNFT: Deployed on Ethereum Sepolia and Base Sepolia for NFT minting and cross-chain transfers
- ZRC20 Tokens: Bridge tokens that facilitate cross-chain transfers via ZetaChain infrastructure
- Wallet Integration: Dynamic wallet and EIP-6963 provider support
- Cross-Chain Logic: ZetaChain bridge integration for seamless transfers
- Local Storage: NFT metadata and transfer history persistence
- Error Handling: Comprehensive error handling and user feedback
src/
├── components/ # React components
├── constants/ # Contract addresses and chain configurations
├── contracts/ # Smart contract ABIs and utilities
├── context/ # React context providers
├── hooks/ # Custom React hooks
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── main.tsx # Application entry point
yarn dev
- Start development serveryarn build
- Build for productionyarn preview
- Preview production buildyarn lint
- Run ESLint
The application uses testnet networks by default. To configure for mainnet:
- Update contract addresses in
src/constants/contracts.ts
- Update chain configurations in
src/constants/chains.ts
- Ensure you have the correct network configurations in your wallet
"Transaction execution reverted"
- Ensure you have sufficient gas fees
- Verify you own the NFT you're trying to transfer
- Check that the destination chain is supported
"Failed to get wallet connection"
- Make sure your wallet is connected and unlocked
- Try refreshing the page and reconnecting your wallet
- Check browser console for detailed error messages
"ZRC20 address not found"
- Verify the destination chain is supported
- Check that contract addresses are correctly configured
- Check the browser console for detailed error logs
- Verify your wallet has sufficient testnet tokens
- Ensure you're connected to the correct network
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Cross-chain functionality enabled by ZetaChain