This guide assumes you are using Zerodev as the natively integrated provider. Please refer to our other guides for other providers as needed.
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.
Advanced: You can specify a bundler/paymaster RPC. See specifying a bundler/paymaster RPC for more details.
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.This section is currently React only.
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.Note that there is a delay between loading the page and the ZeroDev kernel client
being available. To ensure that the kernel client is available,
please await one of the following methods:
getAddress()
, getConnectedAccounts()
or getNetwork()
before calling getAccountAbstractionProvider()
.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
This section is currently React only.
[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.This example only applies to Legacy (4337) implementations. With 7702, the smart wallet and signer addresses are the same.
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.ERC20 paymaster requires additional setup beyond the standard sponsored transactions. You’ll need to create the Kernel client manually and handle token approvals.
Key Points for ERC20 Paymaster Implementation:
-
Manual Kernel Client Creation: Unlike standard sponsored transactions, ERC20 paymaster requires creating the kernel client manually using
createEcdsaKernelAccountClientWith7702
orcreateEcdsaKernelAccountClient
. -
ERC20 Approval: The paymaster needs approval to spend the ERC20 tokens for gas. Use
getERC20PaymasterApproveCall
to 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
Make sure to replace
YOUR_ZERODEV_PROJECT_ID
with your actual ZeroDev project ID. You can find this in your ZeroDev dashboard.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?
Yes, but not today with Dynamic. We are working on developing new flows to make managing existing EOA wallets with SCWs a smooth transition.
What networks are supported for deploying smart contract wallets?
What networks are supported for deploying smart contract wallets?
It depends which provider you choose. For example, with ZeroDev you have the following options:
- 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?
Each provider will handle things differently, so it’s always better to check
directly with them. For example, with ZeroDev you can’t change the network
after deployment. With Alchemy, it might be possible in a roundabout way.
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?
With Dynamic, you will need to use either ZeroDev or Alchemy. If you have
alternative AA providers, please reach out via our
slack.
What pricing package includes this feature?
What pricing package includes this feature?
This is an advanced feature, but there is
no additional cost from Dynamic beyond the advanced tier itself. The providers
do take a transaction fee, which you can see on their respective pricing
pages.
What does private beta mean in this context, what should I expect?
What does private beta mean in this context, what should I expect?
We are adding customers one at a time for a few weeks, after which we’ll open
it up to the general public as GA.
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?
Private keys are managed by the EOA, not the SCW. Every SCW has a Signer, or
Owner, which is the EOA.
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?
The only way the SCW can be recovered is if the EOA is recovered. The SCW is a
smart contract, and the EOA is the owner of the SCW. If the EOA is lost, the
SCW is lost.
Are your smart contract wallets non-custodial?
Are your smart contract wallets non-custodial?
It’s a common misconception that AA wallets are inherently non-custodial. In fact, whether a wallet is AA or not has nothing to do with whether it’s custodial. It’s the signers that determine whether a wallet is custodial.That is, if you use a non-custodial signer such as local private keys to manage your AA wallet, then it’s non-custodial. At the same time, if you use a custodial key provider such as Fireblocks to manage your AA wallet, then it’s custodial.In any case, whoever has custody over the signers has custody over the wallet.
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?
We have wrapped our providers so you get all the benefit, and more. For
example, we handle the transaction hashing so it’s user friendly and are able
to show the SCW in our widgets and connectors.