This guide covers migrating from ZeroDev EIP-7702 gasless to native
sponsorship. Both keep the user on their embedded EOA at the same address —
what changes is the connector/extension, the send API, and the on-chain 7702
delegation target. Migrating from ERC-4337 smart-contract accounts is not
covered here.
What changes
| ZeroDev (EIP-7702) | Native gas sponsorship | |
|---|---|---|
| In code | ZeroDevSmartWalletConnectors (React) / ZeroDevExtension (React Native) | removed |
| Sponsored send | via ZeroDev | React: sendSponsoredTransaction (@dynamic-labs-sdk/evm)React Native: client.ethereumGasless.send |
| 7702 delegate (on-chain) | ZeroDev Kernel implementation | Dynamic/Fireblocks: 0x0000Fb7702036ff9f76044a501ac1aA74cbab16b |
Before you start (dashboard)
These apply to both React and React Native and can’t be done in code.Enable native EVM gas sponsorship
In your environment, go to Sponsor Gas → Dynamic Native Sponsorship and
turn on Sponsor Network Fees (EVM). After changing the dashboard, reload
so the SDK picks it up. From the SDK you can gate your UI on the enabled
check — React:
isEvmGasSponsorshipEnabled() from @dynamic-labs-sdk/evm;
React Native: await client.ethereumGasless.isEnabled().Migrate your code
Keep ZeroDev wired up until native sponsored sends work — remove it last.- React
- React Native
Using
@dynamic-labs/sdk-react-core. Today you have
ZeroDevSmartWalletConnectors from @dynamic-labs/ethereum-aa in your
walletConnectors, and send via
primaryWallet.connector.getAccountAbstractionProvider({ withSponsorship: true }).Install @dynamic-labs-sdk/evm and @dynamic-labs-sdk/client, pinned to the
exact @dynamic-labs-sdk/client version your @dynamic-labs/sdk-react-core
already resolves (check
node_modules/@dynamic-labs/sdk-react-core/node_modules/@dynamic-labs-sdk/client/package.json,
or your lockfile) so the package manager keeps a single client instance.Register the EVM wallet provider
@dynamic-labs/sdk-react-core builds the underlying
@dynamic-labs-sdk/client but drives embedded wallets through the legacy
connector system — it never registers a new-SDK wallet provider. Register
the EVM WaaS provider yourself, once, after the SDK loads, by calling
addEvmExtension() from @dynamic-labs-sdk/evm. It binds to the client
DynamicContextProvider already created.Send sponsored transactions
Use EIP-7702 delegation is activated automatically on the first sponsored send.
sendSponsoredTransaction from @dynamic-labs-sdk/evm with the EVM
wallet account. Read the account imperatively with getWalletAccounts()
from @dynamic-labs-sdk/client — it resolves the same client the provider
registered.Remove the ZeroDev connector
Once your sends go through native sponsorship, remove
ZeroDevSmartWalletConnectors from your walletConnectors, and disable
ZeroDev in the dashboard.Gotchas
- The user’s address doesn’t change. Both ZeroDev and native sponsorship delegate the same embedded EOA via EIP-7702 — only the delegation target moves. Once a wallet has re-delegated to Dynamic on its first native send, don’t route that user back through a ZeroDev send.
- Headless apps must disable the confirmation UI, or sends hang on an unrendered modal.
- React: register the EVM provider with
addEvmExtension()once after the SDK loads, or sends throwNo wallet provider found with key: dynamicwaasevm:embeddedWallet. Don’t use the@dynamic-labs-sdk/react-hookshooks in asdk-react-coreapp — they need the new-SDK<DynamicProvider>and throwMissingProviderError. Read the account withgetWalletAccounts().