What We’re Building
By the end of this tutorial, your users will be able to:- Log in with email (no seed phrase)
- Execute transactions without holding ETH for gas
- Perform cross-chain operations with one signature
How it works: When a user logs in with Privy, they get an embedded wallet. We upgrade this wallet to a smart account using EIP-7702, then route transactions through Biconomy’s MEE to handle gas payments.
Step 1: Install Dependencies
@privy-io/react-auth— Privy’s React SDK for wallet creation and auth@biconomy/abstractjs— Biconomy’s SDK for smart accounts and MEEviem— Ethereum library for building transactions
Step 2: Configure Privy Provider
Wrap your app with Privy’s provider. The key settings are:Step 3: Access the Embedded Wallet
After a user logs in, get their wallet from Privy:Step 4: Create a Wallet Client
The wallet client is how you’ll sign transactions:Step 5: Sign EIP-7702 Authorization
This step upgrades the EOA to a smart account:What just happened? The user signed a message that says “I authorize my wallet to behave like this smart contract.” Their address stays the same, but now it has smart account capabilities.
Step 6: Create the Smart Account
Now create a Nexus account that can work across multiple chains:Step 7: Create the MEE Client
The MEE client handles transaction execution:Step 8: Execute a Gasless Transaction
Now you can execute transactions where gas is paid in any token:Complete Example
Here’s a full React component putting it all together:Key Takeaways
- Privy creates the wallet — Users log in with email, Privy creates an embedded wallet
- EIP-7702 adds smart features — The wallet gets upgraded without changing address
- MEE handles gas — Transactions are executed with any ERC-20 token for gas
- Cross-chain ready — Add more chains to
chainConfigurationsfor multi-chain ops