MegaEth & Dynamic (with EIP-7702)
Enabling MegaEth
Dynamic supports MegaEth from Day 0, simply enable it in the EVM networks section of the dashboard and you’re good to go! We also support 7702 by default on MegaEth in partnership with Zerodev, learn how to enable that below.
Setup MegaEth for 7702
ZeroDev Account
Sign up for a free account at https://dashboard.zerodev.app/ and create a project, configure your project name and network (please use MegaEth for this example) and copy your new ZeroDev project ID.
Enable in Dynamic
In the EVM section of your Dynamic Dashboard, toggle on MegaEth and click Save.
Now, go to the Account Abstraction section, enable ZeroDev and paste in your ZeroDev project id.
Choose who gets a SCW
On the same configuration page as the step above, you’ll see there are two different types of configuration for issuing smart contract wallets (SCWs) in Dynamic - the wallet level and the user level.
- Wallet level
Choose whether to issue SCWs to all wallets, only to embedded wallets, or use EIP-7702. Choose 7702 here.
- User level
Choose whether to issues SCWs to all your users (existing included next time they log in), or just new users.
Choose if your users see both the signer and smart wallet
On the same configuration page as the 2 steps above, you’ll see there is a setting for how the Dynamic SDK treats the signer and the smart wallet - only the smart wallet or both the smart wallet and signer.
- Show Smart Wallet Only
Only allows you to interact with the smart wallet directly.
- Show Smart Wallet & Signer
Treats the smart wallet and signer as separate wallets which you can switch between.
Enable Dynamic-powered embedded wallets + Email
Back in your Dynamic Dashboard, go to the Embedded Wallets section and enable Dynamic-powered embedded wallets.
Lastly, in the Log in & User Profile section, enable Email sign up (optionally, enable social sign up and configure oauth)
Install the packages in your app
Initialize the Dynamic Context Provider
Pass ZeroDevSmartWalletConnectors
along with EthereumWalletConnectors to the WalletConnectors Array of your context provider.
Kernel Interaction
Currently to interact with the wallet, you will need to interact directly with the kernel, we will do this in a new component:
Full Example
Was this page helpful?