smartWallet
Creates a ERC4337 smart wallet based on a admin account.
Smart wallets are smart contract wallets that enable multiple benefits for users:
Sponsor gas fees for transactions
Multiple owners
Session keys
Batch transactions
Predictable addresses
Programmable features
Learn more about account abstraction
Connect to a smart wallet
To connect to a smart wallet, you need to provide an admin account as the personalAccount
option.
Any wallet can be used as an admin account, including an in-app wallets.
The sponsorGas
option is used to enable sponsored gas for transactions automatically.
Using a custom account factory
You can pass a custom account factory to the smartWallet
function to use a your own account factory.
Configuring the smart wallet
You can pass options to the smartWallet
function to configure the smart wallet.
Refer to SmartWalletOptions for more details.
@wallet