Recommended: JavaScript SDK with React Hooks
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.Dashboard Settings Overview
7702 vs 4337
- Default (7702) — embedded wallet delegates to a smart account at the same address.
- Legacy (4337) — smart account deployed at a different address.
New Users Only vs All Users
- New users only — Issue smart wallets only for users created after this setting is enabled.
- All users — Issue smart wallets for all users. Existing users will receive a smart wallet the next time they log in.
Wallet vs Signer (Legacy - 4337 settings)
- Show Smart Wallet only - Interact only with the smart-contract wallet in the SDK. Users will need to send assets to an external wallet if exporting their key.
- Show Smart Wallet & Signer - Display the smart wallet and signer wallet as separate wallets in the SDK, allowing switching between them to more easily export assets.
Advanced Configuration
You can utilize the full functionality of ZeroDev inside Dynamic - everything from session keys to gas policies. Learn more in the ZeroDev Docs.Delegate to a custom smart account
In order to delegate to a custom smart account, you need to sign the delegation authorization manually like so:Bundled transactions
For advanced use cases like bundling multiple transactions into a single user operation, you can interact directly with the kernel client.Specifying a bundler/paymaster RPC
UseZeroDevSmartWalletConnectorsWithConfig and pass in values for bundlerRpc and paymasterRpc:
Specifying a bundler
To specify a bundler, useZeroDevSmartWalletConnectorsWithConfig and pass in a value for bundlerProvider:
Retrieving the Kernel Client
Using with Viem & Ethers
You can use viem or ethers with account abstraction to sign messages or send sponsored transaction with no extra configuration, it also works with our wagmi integration.Going Further
Once you’ve tested things out and want to deploy to a live network, you will need to do the following:- Add your credit card to ZeroDev under Account Settings > Billing
- Create a new ZeroDev project and select a live network
- Copy your new ZeroDev project id and paste it into your Dynamic Dashboard a. We recommend using your Dynamic Sandbox environment for testing your testnet setup, and using your Dynamic Live environment for production.
Restricting Access to your ZeroDev Project
In order to restrict access to your ZeroDev project id to allow only dynamic to use it you can add dynamic’s static IP address’s to your projects IP allowlist. See Dynamic’s Static IP Addresses for more information.
Examples
[Legacy 4337] Get smart wallet address vs signer address
For Legacy (4337) implementations, the wallet connector will return your smart wallet address, that address will be used in the Dynamic UI and is the main address you will interact with. But you can fetch the signer address by using the wallet connector’s eoaConnector property and then fetching the address there.Signing EIP-7702 Authorization with MFA Pre-Auth
When MFA is required for WaaS signing, you need to authenticate the user before signing the EIP-7702 authorization. This pre-auth flow applies when your ZeroDev smart wallet is backed by a DynamicWaaS EOA. The flow has two steps that must happen in sequence:- Prompt MFA and sign the EIP-7702 authorization
- Execute the transaction using the pre-signed authorization
- A ZeroDev smart wallet must be connected
- The ZeroDev wallet’s EOA must be a DynamicWaaS wallet (
connector.getEOAConnector()?.key === 'dynamicwaas') - Action-Based MFA must be enabled for
WalletWaasSignin your Dashboard security settings
usePromptMfaAuth({ createMfaToken: true })opens the Dynamic MFA UI and stores the token in SDK statesignEip7702Authorization({ chainId })signs the EIP-7702 authorization, automatically consuming the MFA token from stateconnector.setEip7702Auth(auth)stores the signed authorization and recreates the connector’s kernel client with it baked in- Subsequent calls to
getAccountAbstractionProvider()return a kernel client that already includes the pre-signed authorization — no manual kernel client creation needed
promptMfaAuth completes.Using ERC20 Paymaster
When you need to sponsor transactions using ERC20 tokens instead of native gas tokens, you’ll need to use the ERC20 paymaster functionality. This requires creating the Kernel client directly and handling the ERC20 approval for the paymaster.Key Points for ERC20 Paymaster Implementation:
-
Manual Kernel Client Creation: Unlike standard sponsored transactions, ERC20 paymaster requires creating the kernel client manually using
createEcdsaKernelAccountClientWith7702orcreateEcdsaKernelAccountClient. -
ERC20 Approval: The paymaster needs approval to spend the ERC20 tokens for gas. Use
getERC20PaymasterApproveCallto generate the approval call. -
Batched Transactions: Combine the ERC20 approval and your actual transaction into a single user operation using
encodeCalls. -
Prerequisites:
- Your wallet must have sufficient ERC20 tokens to pay for gas
- The ERC20 token must be configured in your ZeroDev paymaster configuration
FAQ
Can I use an existing wallet as a smart contract wallet with account abstraction?
Can I use an existing wallet as a smart contract wallet with account abstraction?
What networks are supported for deploying smart contract wallets?
What networks are supported for deploying smart contract wallets?
- Arbitrum One
- Avalanche
- Base
- Binance Smart Chain
- Ethereum
- Optimism
- Polygon
Can I change the network for a smart contract wallet after it's deployed?
Can I change the network for a smart contract wallet after it's deployed?
What happens if I don't want to use a provider i.e. ZeroDev any more?
What happens if I don't want to use a provider i.e. ZeroDev any more?
What pricing package includes this feature?
What pricing package includes this feature?
What does private beta mean in this context, what should I expect?
What does private beta mean in this context, what should I expect?
How are private keys securely managed and stored for smart contract wallets with account abstraction?
How are private keys securely managed and stored for smart contract wallets with account abstraction?
What is the process for recovering a smart contract wallet in case of key loss or compromise?
What is the process for recovering a smart contract wallet in case of key loss or compromise?
Are your smart contract wallets non-custodial?
Are your smart contract wallets non-custodial?
Why is it better to do this through Dynamic than integrating ZeroDev directly?
Why is it better to do this through Dynamic than integrating ZeroDev directly?