Documentation Index
Fetch the complete documentation index at: https://seilabs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This comprehensive guide demonstrates how to integrate thirdweb’s EIP-7702 Account Abstraction SDK into your application. EIP-7702 represents the next generation of account abstraction, allowing Externally Owned Accounts (EOAs) to temporarily function as smart contracts, enabling gasless transactions and advanced wallet features without requiring users to migrate to new wallet addresses.What This Guide Covers
- Understanding EIP-7702
- Setting up a React application with thirdweb’s EIP-7702 implementation
- Implementing social logins with smart account features
- Creating gasless transaction experiences on Sei Network
Prerequisites
Before starting, ensure you have:- Node.js v18+ installed
- Basic knowledge of React and TypeScript
- A thirdweb account with API key from thirdweb Dashboard
- For Mainnet: An active thirdweb Pay As You Go subscription ($5/month minimum) for gas sponsorship
What is EIP-7702?
EIP-7702 is an Ethereum Improvement Proposal that introduces native account abstraction by allowing EOAs to temporarily delegate execution to smart contracts. This approach offers several advantages over traditional ERC-4337 implementations:- Same Address: Users keep their existing EOA address—no migration to a new smart contract wallet required
- Native Protocol Support: Built into the protocol layer, not requiring external bundler infrastructure
- Lower Gas Costs: More efficient than ERC-4337 since it doesn’t need separate UserOperation bundling
- Temporary Delegation: EOAs can temporarily act as smart contracts for a single transaction, then revert to normal behavior
- Backward Compatible: Works with existing wallets and infrastructure without breaking changes
Sei Network Configuration
Testnet:- RPC URL:
https://evm-rpc-testnet.sei-apis.com - Chain ID: 1328
- Block Explorer: Seiscan Testnet
- RPC URL:
https://evm-rpc.sei-apis.com - Chain ID: 1329
- Block Explorer: Seiscan
Step 1: Deploy a Storage Contract
For this example, we’ll deploy a simple Storage contract that stores and retrieves numbers. This will demonstrate gasless transactions and smart account features with EIP-7702.Storage Contract (Solidity)
Step 2: Project Setup
Create a New Project
Install Dependencies
Install and Configure Tailwind CSS
Install Tailwind CSS and its dependencies:tailwind.config.js:
src/index.css with:
Configure Environment Variables
Create a.env file in your project root:
Enable Gas Sponsorship (Production)
For mainnet gas sponsorship:- Visit thirdweb Dashboard Billing
- Subscribe to the Pay As You Go plan ($5/month minimum)
- Enable gas sponsorship in your project settings
Step 3: Configure Vite
Create or updatevite.config.ts:
Step 4: Configure thirdweb Client
Createsrc/client.ts:
Step 5: Setup ThirdwebProvider
First, updatesrc/main.tsx to include the ThirdwebProvider:
Step 6: EIP-7702 Smart Account Implementation
Now replacesrc/App.tsx with the complete EIP-7702 implementation.
Key Configuration:
The executionMode configuration enables EIP-7702 features:
mode: "EIP7702"- Enables EIP-7702 account abstraction (EOA acts as smart contract temporarily)sponsorGas: true- Enables gasless transactions (thirdweb pays gas on behalf of users)
Step 7: Package Configuration
Update yourpackage.json:
Step 8: Run the Application
Start Development Server
Test EIP-7702 Features
- Open
http://localhost:5173in your browser - Connect using any social login (Google, email, etc.)
- Observe the automatic smart account creation (no gas required!)
- Test gasless storage operations:
- Store the predefined value (37) using the “Store 37” button
- Store custom numbers using the “Store Custom Number” button
- Read stored values displayed in the interface
- Monitor console for transaction hashes and status updates
- Thirdweb Dashboard: View more details in your thirdweb dashboard
Troubleshooting
Network Issues
If experiencing connectivity problems:- Check the thirdweb status page
- Verify your API key is active and has sufficient credits
- Ensure you’re connected to the correct network (Chain ID 1329 for mainnet, 1328 for testnet)
Transaction Verification
After a successful transaction, you can verify it on the block explorer:- Mainnet: Seiscan
- Testnet: Seiscan Testnet
Resources
thirdweb Documentation & Tools
- thirdweb Portal: Comprehensive SDK documentation
- EIP-7702 Documentation: Official thirdweb EIP-7702 guide
- thirdweb Dashboard: Manage projects and API keys
- GitHub Repository: Source code and examples
- Developer Blog: Latest updates and tutorials
- EIP-7702 Specification: Official Ethereum Improvement Proposal