Getting Started
Getting started to add ERC-4337 compatible smart accounts to your application easily.
Once set, your application will:
- Let users connect to their smart account using any personal wallet, including in-app wallets for easy onboarding.
- Automatically deploy individual account contracts for your users when they do their first onchain transaction.
- Handle all transaction gas costs via the thirdweb paymaster.
You will require an API key to use thirdweb's infrastructure services such as the bundler and paymaster.
Obtain an API key from the thirdweb dashboard Settings page.
The API key lets you access thirdweb's bundler and paymaster infrastructure, which is required for smart accounts to operate and optionally enable gasless transactions.
Learn more about creating an API key and restricting which contracts the smart account can interact with here.
The easiest way to get started with account abstraction is to use the ConnectButton component. Simply add the
accountAbstraction
property with the desired chain and whether to sponsor gas for your users.With this property, all connected wallets will be automatically converted to smart accounts. The connected wallet will be the admin wallet of the smart account.
Once setup, you can use the rest of the Connect React SDK to deploy contracts, perform transactions, and manipulate smart accounts like any other wallet.
You can also use the connection hooks and functions to connect to your smart accounts and build your fully custom UI.
See the Build your own UI guide for more information.
Learn by example with these open-source demos:
A reference implementation to create and interact with smart accounts.