Repository: https://github.com/0xanmol/Dynamic-Zerodev-Smart-Wallet-Implementation
Built this to show how Dynamic's embedded wallets work with ZeroDev Account Abstraction for gasless transactions on Base Sepolia and Ethereum Sepolia.
Addresses all the concerns Jeff's team raised:
- NFT Minting with Embedded Wallets - Complete gasless NFT minting functionality
- Multi-chain Support - Works on Base Sepolia and Ethereum Sepolia (expandable to all Dynamic-supported chains)
- Account Abstraction Explained - Clear explanation of how gas fees are handled
- Enhanced Security Features - MFA, passkeys, and social recovery options
- Clear Money Transfer - Simple, intuitive interface for sending ETH between users
- Dynamic Embedded Wallets: Seamless wallet connection and management
- ZeroDev Account Abstraction: Gasless transactions with sponsored gas fees
- NFT Minting: Free NFT minting with real blockchain transactions
- Token Operations: Claim DUSD tokens and send money
- Real-time Balance Tracking: Live balance updates and transaction history
- Modern UI: Clean, responsive interface with dark/light theme support
- Frontend: Next.js 15, React, TypeScript
- Styling: Tailwind CSS, shadcn/ui components
- Blockchain: Dynamic SDK, ZeroDev, Viem
- Network: Base Sepolia testnet
- Smart Contracts: Solidity (ERC721 NFT contract)
- Node.js 18+
- npm or yarn
- Base Sepolia ETH (for testing)
- Dynamic account with ZeroDev integration
-
Clone the repository
git clone https://github.com/0xanmol/Dynamic-Zerodev-Smart-Wallet-Implementation.git cd Dynamic-Zerodev-Smart-Wallet-Implementation -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Add your Dynamic environment ID:
NEXT_PUBLIC_DYNAMIC_ENV_ID=your-environment-id-here
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Connect using Dynamic's embedded wallet
- Automatic smart account deployment via ZeroDev
- Seamless user experience with no gas fees
- Contract: FreeNFT deployed on Base Sepolia
- Address:
0x275068e0610DefC70459cA40d45C95e3DCF50A10 - Features: Free minting, gasless transactions
- Verification: Real transactions on BaseScan
- Claim USDC: Mint test USDC tokens (100 tokens)
- Send Money: Transfer tokens between addresses
- Balance Tracking: Real-time balance updates
- Live transaction tracking
- BaseScan integration for verification
- Success/failure status indicators
- FreeNFT.sol: ERC721 NFT contract for free minting
- Deployed on: Base Sepolia testnet
- Features: Free minting, 1000 max supply
- Dashboard: Main interface with tabbed navigation
- NetworkIndicator: Shows current network and connection status
- BalancesPanel: Displays wallet balances
- NFTMinting: NFT minting interface with real blockchain integration
- TransactionHistory: Live transaction tracking
- Account Abstraction: Smart wallet implementation
- Gasless Transactions: Sponsored gas fees
- User Operations: Proper handling of user operation receipts
- Real Transaction Hashes: Extraction from user operation receipts
- Create a Dynamic account at app.dynamic.xyz
- Set up your environment with ZeroDev integration
- Enable Base Sepolia (Chain ID: 84532)
- Configure auto-deploy for smart accounts
- Add your domain to allowed origins
- Set up ZeroDev project at dashboard.zerodev.app
- Enable Base Sepolia network
- Configure paymaster with sufficient balance
- Set up sponsorship policies
├── app/ # Next.js app directory
├── components/ # React components
│ ├── dashboard.tsx # Main dashboard
│ ├── nft-minting.tsx # NFT minting component
│ ├── balances-panel.tsx # Balance display
│ └── ui/ # shadcn/ui components
├── contracts/ # Smart contracts
│ └── FreeNFT.sol # NFT contract
├── lib/ # Utilities and configurations
│ ├── dynamic.ts # Dynamic SDK setup
│ └── providers.tsx # React providers
└── public/ # Static assets
- Connect Wallet: Test wallet connection flow
- Claim Tokens: Verify USDC token minting
- Mint NFT: Test NFT minting with real blockchain transactions
- Send Money: Test token transfers
- Check BaseScan: Verify transactions on blockchain explorer
- All transactions appear on Base Sepolia BaseScan
- Real transaction hashes are extracted from ZeroDev user operations
- Gas fees are sponsored by ZeroDev paymaster
-
CORS Errors
- Add your domain to Dynamic dashboard allowed origins
- Include both
http://localhost:3000andhttp://localhost:3001
-
Transaction Not Found on BaseScan
- Ensure you're using the real transaction hash from user operation receipt
- Check ZeroDev paymaster balance and configuration
-
Wallet Connection Issues
- Verify Dynamic environment ID is correct
- Check ZeroDev integration in Dynamic dashboard
- Ensure Base Sepolia is enabled
-
Balance Loading Errors
- These are normal during initial connection
- Balances will load once wallet is fully connected
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
- Gasless transactions via ZeroDev sponsorship
- Working NFT minting with contract interaction
- Live transaction tracking and verification
Built with Dynamic + ZeroDev + Next.js