[General] Account abstraction contract deployment step embedding and fees compensations #1072
Replies: 2 comments 2 replies
-
Good question and asking internally for you |
Beta Was this translation helpful? Give feedback.
-
It sounds like you're trying to perform a counter-factual deployment. Using a factory to manage the account deployment can serve the same purpose as the 4337 bundler entry point, allowing you to batch all the account setup steps into a single transaction. If you don't want to use a factory and paymaster to manage the initial account deployment, you can move the funds from the deployment account to the deployed smart contract after the deployment is complete. If you are working with AA, I'd suggest to take at look at the ZKSync-SSO smart account deployment if you haven't already so you don't have to manage or re-invent this yourself. If this doesn't meet your needs I'd love to know why! It already supports deploying a smart account for free with a paymaster that supports webauthn keys! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Team or Project
N/A
ZK chain
Era
Environment
Testnet
L2 block number
N/A
Provide a brief description of the functionality you're trying to implement and the issue you are running into.
The case
Is there a way to somehow batch a smart account deployment step with an action done on its behalf (transfer call, or smart contract call, etc.)? The flow I'm interested in is very similar to how smart account deployment works in the regular EVM world, i.e.:
In the regular EVM networks, it's done via Bundler/EntryPoint and a user operation's
initCode
field that contains all the parameters that are needed for the account deployment itself through a factory (of course, we are not talking about ERC7702, which requires EOA anyway).Why is it even needed?
This flow is fairly useful when the user has only a specific kind of credentials (P256 keys, as described above) and has no EOA private key at all. And in the case described above, the user pays fees for deployment, and no EOA is used (except the one that's present on the bundler side to call the EntryPoint).
The question
The current implementation in zkSync (as far as I get it from docs and my research) pushes me to store an EOA private key that will eventually call a smart account factory and create an account for a user (therefore, the stored EOA pays fees for the deployment and doesn't get them back).
Is the aforementioned even possible to do using existing AA implementation and infrastructure, or is it needed to invent some kind of an EntryPoint clone that will do everything at once (deployment, action, and fees compensation)
Repo Link (Optional)
No response
Additional Details
No response
Beta Was this translation helpful? Give feedback.
All reactions