Standardized modular tooling and SDK for EVM smart accounts.
OpenZeppelin Accounts delivers production-ready ERC-7579 modules and a TypeScript SDK for interacting with smart accounts. Because the modules conform to the ERC-7579 standard they can be installed on any compatible account: including OpenZeppelin's AccountERC7579, Kernel, and the bundled OpenAccount.
| Package | Description |
|---|---|
@openzeppelin-accounts/contracts |
Solidity contracts: OpenAccount, validator modules, executor modules, and multisig primitives |
@openzeppelin-accounts/sdk |
TypeScript SDK: Viem-native account factories and ERC-7579 bundler client actions |
Contracts (Hardhat / Foundry)
npm install @openzeppelin-accounts/contractsSDK
npm install @openzeppelin-accounts/sdk viemThe contracts package provides:
OpenAccount: A production-ready, ERC-4337 and ERC-7579 compliant smart account with EIP-712 signature support and NFT holder capabilities. Deployed viaOpenAccountFactoryat a deterministic address on all major EVM chains:0x9045eF209067701bE7b78AaC216C04Ffa6543330- Validators: Signature validation modules (ECDSA, WebAuthn/passkey).
- Executors: Execution modules for spending limits, social recovery, and more.
- Multisig: ERC-7913-based multisig and weighted multisig modules, including confidential variants.
The SDK wraps Viem's account abstraction primitives with ERC-7579-aware helpers:
toOpenAccount: Creates aSmartAccountinstance for theOpenAccountcontract, supporting both factory-based (counterfactual) and existing-address modes.toERC7579Account: Creates aSmartAccountfor any ERC-7579 account, accepting caller-supplied address and factory args.erc7579Actions: Viem bundler client extension providing typed methods:installModules,uninstallModules,isModuleInstalled,supportsModule,supportsExecutionMode,execute, andaccountId.
import { createPublicClient, http, getContract, encodePacked } from 'viem';
import { mainnet } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';
import { createBundlerClient } from 'viem/account-abstraction';
import { toOpenAccount, erc7579Actions } from '@openzeppelin-accounts/sdk';
import OpenAccountFactoryABI from '@openzeppelin-accounts/contracts/out/OpenAccountFactory.sol/OpenAccountFactory.json' assert { type: 'json' };
const client = createPublicClient({ chain: mainnet, transport: http() });
const signer = privateKeyToAccount('0x<privateKey>');
const factory = getContract({
address: '0x9045eF209067701bE7b78AaC216C04Ffa6543330',
abi: OpenAccountFactoryABI.abi,
client,
});
// Create a smart account backed by an ECDSA validator
const account = await toOpenAccount({
client,
signer,
factory,
moduleTypeIds: ['validator'],
modules: ['0x<ecdsaValidatorAddress>'],
initDatas: [encodePacked(['address'], [signer.address])],
getStubSignature: async () => '0x' + 'ff'.repeat(65),
});
// Extend a bundler client with ERC-7579 actions
const bundlerClient = createBundlerClient({
account,
client,
transport: http('https://bundler.example.com'),
}).extend(erc7579Actions());
// The first user operation deploys the account automatically
const hash = await bundlerClient.execute({
calls: [{ to: '0x<recipient>', data: '0x', value: 0n }],
});Full documentation is available at docs.openzeppelin.com/accounts. Its sources live in docs and are synced to the OpenZeppelin docs site on release.
- Contracts overview: account setup, module installation, factory usage
- SDK overview: account factories, signers, and bundler client setup
- ERC-7579 Actions: full action reference
- OpenAccount parameters: detailed
toOpenAccountparameter reference - API reference: generated from the contracts' NatSpec
This project is maintained by OpenZeppelin. Smart contracts are a nascent technology and carry a high level of technical risk and uncertainty. Using this library is not a substitute for a security audit.
Audit reports are available in packages/contracts/audits, which also lists the contracts that have not been audited yet.
This project has not yet had a stable release. Please report security vulnerabilities by email to security@openzeppelin.com.
Contributions are welcome. Please open an issue or pull request on GitHub.
Released under the MIT License.