pimlicolabs / permissionless.js

TypeScript utilities built on viem for ERC-4337: Account Abstraction
https://docs.pimlico.io/permissionless
MIT License
167 stars 46 forks source link

fallback to client account #291

Closed holic closed 1 day ago

holic commented 1 day ago

I am providing a client to createSmartAccountClient that is already "bound" to an account, so it would be nice to fallback to this value.

image
changeset-bot[bot] commented 1 day ago

⚠️ No Changeset found

Latest commit: 7b83f030e597f965f0be40b46d132d65bcb5bc39

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

plusminushalf commented 1 day ago

Hey Holic, thanks for your help!

The client passed to createSmartAccountClient should be a publicClient, which means it should have public actions available. The publicClient isn’t expected to have an account, and if it does, it’s not supposed to be a smart account. That's why we can't pass it forward.