How to Build a Gasless Web3 App
What do I need to build a gasless app?
What do I need to build a gasless app?
Building a gasless Web3 app requires:
You’ll also need:
| Component | Purpose | Biconomy Solution |
|---|---|---|
| Smart Account | Account abstraction enabled wallet | Nexus Smart Account |
| Execution Environment | Handles transaction orchestration, gas sponsorship, and cross-chain execution | MEE (Modular Execution Environment) |
| SDK | Developer integration | AbstractJS SDK |
Biconomy’s MEE provides all the functionality of traditional ERC-4337 bundlers and paymasters in a unified, easier-to-use package. Instead of configuring separate bundler and paymaster services, MEE handles everything automatically.
- A Biconomy dashboard account for API keys
- A sponsorship policy (who/what to sponsor)
- Frontend integration (React, Vue, vanilla JS, etc.)
How do I set up my project for gasless transactions?
How do I set up my project for gasless transactions?
Step 1: Install dependenciesStep 2: Get API keys from Biconomy Dashboard
- Go to dashboard.biconomy.io
- Create a new project
- Get your MEE API key
- Configure sponsorship policies
MEE (Modular Execution Environment) replaces the need to configure separate bundlers and paymasters. It provides all ERC-4337 functionality plus cross-chain capabilities in a single, unified interface.
How do I send a gasless transaction?
How do I send a gasless transaction?
Once configured, sending gasless transactions is simple with MEE:For contract interactions:MEE automatically handles gas sponsorship based on your dashboard configuration.
How do I integrate with popular wallet connectors?
How do I integrate with popular wallet connectors?
With Privy (Recommended for embedded wallets):With RainbowKit/wagmi:
How do I configure sponsorship policies?
How do I configure sponsorship policies?
Sponsorship policies control who and what gets sponsored. Configure in the Biconomy Dashboard:Dashboard Configuration:Policy Examples:Sponsor all transactions (development):Sponsor with spending limits:
- Navigate to MEE sponsorship settings
- Set spending limits (per transaction, total)
MEE handles gas sponsorship (traditionally done by ERC-4337 paymasters) as part of its unified execution environment. You configure policies in the dashboard, and MEE applies them automatically.
How do I handle the first-time user experience?
How do I handle the first-time user experience?
For first-time users, the smart account needs to be deployed. MEE handles this automatically:Best practices for onboarding:
How do I batch multiple operations?
How do I batch multiple operations?
Batch operations save gas and improve UX with MEE:Real-world example - NFT mint with approval:
How do I estimate and display costs?
How do I estimate and display costs?
Even for gasless transactions, showing users what’s happening builds trust:UI Example:
How do I handle errors gracefully?
How do I handle errors gracefully?
Common errors and how to handle them:Implement retry logic:
What's a complete example of a gasless app?
What's a complete example of a gasless app?
Here’s a complete gasless NFT minting app using MEE:
MEE provides all the functionality of traditional ERC-4337 bundlers and paymasters in a single, unified interface. No need to configure separate bundler URLs or paymaster URLs.