ERC-4337 Smart Accounts

All of thirdweb's smart accounts are EIP-4337 smart contract accounts with role-based permission control.

Users can deploy a smart accounts for individual use, and app developers can issue smart accounts to their users programmatically.

thirdweb's smart accounts have the following features by default:

  • Have multiple owners
  • Execute transactions (single and batched).
  • Send and receive native tokens.
  • Send and receive ERC-721 and ERC-1155 NFTs.
  • Multicall-able.
  • Store contract metadata.

thirdweb offers the following three different kinds of account factories:

UpgradeabilityNon-upgradeableAccount upgrades controlled centrally by the parent account factory admin.
User personaDeveloper wants to issue simple smart accounts to their users. They do not anticipate that users wallets will need any feature upgrades.Developer wants to issue smart accounts to their users. They do anticipate feature upgrades to user wallets, and want to push upgrades to user wallets for seamless/invisible UX for upgrades.

Simple smart accounts

Account.sol & AccountFactory.sol

The Account contract is a simple smart account that comes with all the basic benefits of account abstraction, along with the mentioned default features.

App developers can issue Account smart accounts programmatically by deploying an AccountFactory smart contract.

The Account smart contract is non-upgradeable. Developers should use this wallet if they do not anticipate making any future upgrades to their users’ wallets.

Managed smart accounts

ManagedAccount.sol & ManagedAccountFactory.sol

The ManagedAccount smart account is an upgradeable smart contract written in the dynamic contract pattern.

App developers can issue ManagedAccount smart accounts programmatically by deploying a ManagedAccountFactory smart contract.

The admin of the ManagedAccountFactory contract can push upgrades to all ManagedAccount that it creates. This admin does not require any permissions on the ManagedAccount smart accounts to do so. An upgrade to the features of ManagedAccount applies to all ManagedAccount smart accounts created by the factory. This is the right wallet for developers who anticipate pushing upgrades to their users’ wallets.

Example use case of push upgrades:

An app wants its user wallets to only be able to own NFTs within its ecosystem. This would be an upgrade to the smart account's onERC721Received and onERC1155Received transfer hooks.

The app can enforce this behaviour by pushing this upgrade to its user wallets.