BETA Support for ERC-7579 Modular Smart Accounts

BETA Support for ERC-7579 Modular Smart Accounts

We've been iterating on our next generation smart accounts contracts. They are ERC-7579 compliant modular smart accounts, unlocking the growing catalog of account modules.

This is a BETA release, so expect some changes, but you can already start playing with it on both TypeScript and DotNet SDKs.

We have published 2 contracts to get you started, a modular account factory and a simple validator module.

Stateless Modular Account Factory

A generic, un-opinionated smart account factory that lets you pick a smart account implementation and any default modules you like.

thirdweb: The complete web3 development platform
Build web3 apps easily with thirdweb’s powerful SDKs, audited smart contracts, and developer tools—for Ethereum & 700+ EVM chains. Try now.

Default Validator Module

A simple validator module, with multi owner and session key support.

thirdweb: The complete web3 development platform
Build web3 apps easily with thirdweb’s powerful SDKs, audited smart contracts, and developer tools—for Ethereum & 700+ EVM chains. Try now.

Usage in TypeScript SDK

Once you have deployed both of those contracts, you can use them in the SDK to deploy accounts for you users, using the new Config smart account presets.

 import { sepolia } from "thirdweb/chains";
 import { smartWallet, Config } from "thirdweb/wallets/smart";
 
 const modularSmartWallet = smartWallet(
   Config.erc7579({
     chain: sepolia,
     sponsorGas: true,
     factoryAddress: "0x...", // the 7579 factory address
     validatorAddress: "0x...", // the default validator module address
   }),
 });

You now have a modular smart account wallet instance that you can use with the rest of the SDK as usual.

You can also pass this configuration to the Connect UI components:

<ConnectButton
  client={client}
  accountAbstraction={
    Config.erc7579({
     chain: sepolia,
     sponsorGas: true,
     factoryAddress: "0x...", // the 7579 factory address
     validatorAddress: "0x...", // the default validator module address
    })
  }
/>

Disclaimer

API and contracts are still in BETA - expect breaking changes and frequent updates.

Once stabilized, we will deploy a default factory and validator module on all chains which will be the default in the SDKs.

Looking for feedback

We're releasing this early so we can get some feedback from you, play with it on testnet and let us know what you think!

Happy building! 🛠️