@@ -23,6 +23,7 @@ import {
2323import { foundry } from "viem/chains"
2424import {
2525 type KernelVersion ,
26+ to7702KernelSmartAccount ,
2627 toKernelSmartAccount ,
2728 toThirdwebSmartAccount
2829} from "../../permissionless/accounts"
@@ -328,10 +329,12 @@ export const getKernelEcdsaClient = async <
328329 anvilRpc,
329330 version,
330331 privateKey,
331- useMetaFactory
332+ useMetaFactory,
333+ eip7702 = false
332334} : AAParamType < entryPointVersion > & {
333335 version ?: KernelVersion < entryPointVersion >
334336 useMetaFactory ?: boolean
337+ eip7702 ?: boolean
335338} ) => {
336339 const publicClient = getPublicClient ( anvilRpc )
337340
@@ -342,6 +345,13 @@ export const getKernelEcdsaClient = async <
342345 throw new Error ( "Kernel ERC7579 is not supported for V06" )
343346 }
344347
348+ if ( eip7702 ) {
349+ return to7702KernelSmartAccount ( {
350+ client : publicClient ,
351+ owner : privateKeyToAccount ( privateKey ?? generatePrivateKey ( ) )
352+ } )
353+ }
354+
345355 return toKernelSmartAccount ( {
346356 client : publicClient ,
347357 entryPoint : {
@@ -449,6 +459,7 @@ export const getCoreSmartAccounts = (): Array<{
449459 supportsEntryPointV06 : boolean
450460 supportsEntryPointV07 : boolean
451461 supportsEntryPointV08 : boolean
462+ isEip7702Compliant ?: boolean
452463 isEip1271Compliant : boolean
453464 getSmartAccountClient : (
454465 conf : AAParamType < EntryPointVersion >
@@ -727,9 +738,37 @@ export const getCoreSmartAccounts = (): Array<{
727738 } ) ,
728739 supportsEntryPointV06 : false ,
729740 supportsEntryPointV07 : true ,
730- supportsEntryPointV08 : false ,
741+ supportsEntryPointV08 : true ,
731742 isEip1271Compliant : true
732743 } ,
744+ {
745+ name : "Kernel 7579 0.3.3 + EIP-7702" ,
746+ getSmartAccountClient : async ( conf : AAParamType < EntryPointVersion > ) =>
747+ getBundlerClient ( {
748+ account : await getKernelEcdsaClient ( {
749+ ...( conf as AAParamType < "0.6" | "0.7" > ) ,
750+ version : "0.3.3" as KernelVersion < "0.6" | "0.7" > ,
751+ eip7702 : true
752+ } ) ,
753+ ...conf
754+ } ) ,
755+ getErc7579SmartAccountClient : async (
756+ conf : AAParamType < EntryPointVersion >
757+ ) =>
758+ getSmartAccountClient ( {
759+ account : await getKernelEcdsaClient ( {
760+ ...( conf as AAParamType < "0.6" | "0.7" > ) ,
761+ version : "0.3.3" as KernelVersion < "0.6" | "0.7" > ,
762+ eip7702 : true
763+ } ) ,
764+ ...conf
765+ } ) ,
766+ supportsEntryPointV06 : false ,
767+ supportsEntryPointV07 : true ,
768+ supportsEntryPointV08 : false ,
769+ isEip7702Compliant : true ,
770+ isEip1271Compliant : false
771+ } ,
733772 {
734773 name : "Biconomy" ,
735774 getSmartAccountClient : async ( conf : AAParamType < EntryPointVersion > ) =>
0 commit comments