Enable Gasless Transactions
- Gasless transactions
- Batched transactions
- Full account recovery for both the embedded wallet “key” and the smart wallet
Let's create an app that creates smart wallets for our users.
These smart wallets will require a “personal wallet” to access and initialize the wallet. For this personal wallet, we will of course use an embedded wallet.
From the user's perspective, they will log in with their email or social account. Under the hood, an embedded wallet is created for them, and then a smart wallet is created and initialized using the embedded wallet.
When the user connects a wallet by entering their email, they will be able to view & interact with their smart wallet:
View a fully functioning project on GitHub:
Source Code is open-source. You can view the source code and contribute to it on GitHub
1. Deploy an Account Factory
Select the appropriate thirdweb smart wallet type for your app:
2. Enable smart wallets in your app
To enable smart wallets in your app, you need to add
smartWallet() to the list of supported wallets in the
This will create an embedded wallet and a smart wallet for the user. The smart wallet will be initialized with the embedded wallet as the owner.
Pass your deployed
factoryAddress to the
smartWallet() function. This will allow the smart wallet to be be deployed only when the user sends their first transaction.
You can sponsor transactions simply by passing
gasless: true to the
smartWallet() function. This will allow the smart wallet to send transactions without the user needing to hold any ETH.