@@ -24,6 +24,7 @@ import { foundry } from "viem/chains"
2424import {
2525 type KernelVersion ,
2626 to7702KernelSmartAccount ,
27+ to7702SimpleSmartAccount ,
2728 toKernelSmartAccount ,
2829 toThirdwebSmartAccount
2930} from "../../permissionless/accounts"
@@ -243,7 +244,7 @@ export const getSimpleAccountClient = async <
243244 "0.8" : entryPoint08Address
244245 }
245246
246- return toSimpleSmartAccount < entryPointVersion > ( {
247+ return toSimpleSmartAccount ( {
247248 client : getPublicClient ( anvilRpc ) ,
248249 entryPoint : {
249250 address : entryPointMapping [ entryPoint . version ] ,
@@ -253,6 +254,18 @@ export const getSimpleAccountClient = async <
253254 } )
254255}
255256
257+ export const get7702SimpleAccountClient = async <
258+ entryPointVersion extends "0.8"
259+ > ( {
260+ anvilRpc,
261+ privateKey
262+ } : AAParamType < entryPointVersion > ) => {
263+ return to7702SimpleSmartAccount ( {
264+ client : getPublicClient ( anvilRpc ) ,
265+ owner : privateKeyToAccount ( privateKey ?? generatePrivateKey ( ) )
266+ } )
267+ }
268+
256269export const getLightAccountClient = async <
257270 entryPointVersion extends "0.6" | "0.7"
258271> ( {
@@ -527,6 +540,21 @@ export const getCoreSmartAccounts = (): Array<{
527540 supportsEntryPointV08 : true ,
528541 isEip1271Compliant : false
529542 } ,
543+ {
544+ name : "Simple + EIP-7702" ,
545+ getSmartAccountClient : async ( conf : AAParamType < EntryPointVersion > ) =>
546+ getBundlerClient ( {
547+ account : await get7702SimpleAccountClient (
548+ conf as AAParamType < "0.8" >
549+ ) ,
550+ ...conf
551+ } ) ,
552+ supportsEntryPointV06 : false ,
553+ supportsEntryPointV07 : false ,
554+ supportsEntryPointV08 : true ,
555+ isEip7702Compliant : true ,
556+ isEip1271Compliant : false
557+ } ,
530558 {
531559 name : "Kernel 0.2.1" ,
532560 getSmartAccountClient : async ( conf : AAParamType < EntryPointVersion > ) =>
@@ -746,7 +774,9 @@ export const getCoreSmartAccounts = (): Array<{
746774 getSmartAccountClient : async ( conf : AAParamType < EntryPointVersion > ) =>
747775 getBundlerClient ( {
748776 account : await getKernelEcdsaClient ( {
749- ...( conf as AAParamType < "0.6" | "0.7" > ) ,
777+ entryPoint : ( conf as AAParamType < "0.6" | "0.7" > ) . entryPoint ,
778+ anvilRpc : conf . anvilRpc ,
779+ privateKey : conf . privateKey ,
750780 version : "0.3.3" as KernelVersion < "0.6" | "0.7" > ,
751781 eip7702 : true
752782 } ) ,
@@ -757,7 +787,9 @@ export const getCoreSmartAccounts = (): Array<{
757787 ) =>
758788 getSmartAccountClient ( {
759789 account : await getKernelEcdsaClient ( {
760- ...( conf as AAParamType < "0.6" | "0.7" > ) ,
790+ entryPoint : ( conf as AAParamType < "0.6" | "0.7" > ) . entryPoint ,
791+ anvilRpc : conf . anvilRpc ,
792+ privateKey : conf . privateKey ,
761793 version : "0.3.3" as KernelVersion < "0.6" | "0.7" > ,
762794 eip7702 : true
763795 } ) ,
@@ -766,7 +798,7 @@ export const getCoreSmartAccounts = (): Array<{
766798 supportsEntryPointV06 : false ,
767799 supportsEntryPointV07 : true ,
768800 supportsEntryPointV08 : false ,
769- isEip7702Compliant : false ,
801+ isEip7702Compliant : true ,
770802 isEip1271Compliant : false
771803 } ,
772804 {
0 commit comments