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

Missing setting chain #42

Open
ulbqb opened this issue Oct 17, 2024 · 0 comments
Open

Missing setting chain #42

ulbqb opened this issue Oct 17, 2024 · 0 comments

Comments

@ulbqb
Copy link

ulbqb commented Oct 17, 2024

const publicClient = createPublicClient({
transport: http("https://rpc.ankr.com/eth_sepolia"),
})

Missing setting chain cause following error:

TypeError: Cannot read properties of undefined (reading 'id')
    at Object.getNonce (file:///Users/pimlico-tutorial-1/node_modules/viem/account-abstraction/accounts/toSmartAccount.ts:66:51)
    at ...

Correct one is:

 const publicClient = createPublicClient({ 
        chain: sepolia,
 	transport: http("https://rpc.ankr.com/eth_sepolia"), 
 }) 
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