Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback for “How to use the Module SDK with the Kernel” #56

Open
bamnenim-permissionlabs opened this issue Jan 23, 2025 · 1 comment

Comments

@bamnenim-permissionlabs

In kerenl integration guide,
createKernelAccount is wrongly extending erc7579.

import { createKernelAccount } from '@zerodev/sdk'
 
const account = await createKernelAccount(publicClient, {
  plugins: {
    sudo: ecdsaValidator,
  },
  entryPoint,
}).extend(erc7579Actions({ entryPoint })) // this doesn't work

it should be extended within client

import { createKernelAccountClient } from '@zerodev/sdk'
 
const smartClient = createKernelAccountClient({
  account,
  chain,
  entryPoint,
  bundlerTransport: http(BUNDLER_RPC),
  middleware: {
    sponsorUserOperation: async ({ userOperation }) => {
      const zerodevPaymaster = createZeroDevPaymasterClient({
        chain,
        entryPoint,
        transport: http(PAYMASTER_RPC),
      })
      return zerodevPaymaster.sponsorUserOperation({
        userOperation,
        entryPoint,
      })
    },
  },
}).extend(erc7579Actions({ entryPoint }))
@bamnenim-permissionlabs
Copy link
Author

plus erc7579Actions should have no parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant