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

feat: move account deploy event to factory #142

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

adamegyed
Copy link
Contributor

Motivation

For tracking deployed accounts of a specific type, it is preferable to emit the event from the factory, rather than the account address, because event signatures may be spoofed.

Solution

Remove the ModularAccountInitialized event from UpgradeableModularAccount. The account already emits ValidationInstalled(module, entityId) and Initialized(version) during initialization.

Add ModularAccountDeployed(account, owner, salt) to the factory.

We could also depend on the AccountDeployed event from the EntryPoint, but this has some issues:

  • Not indexed on the factory address
  • Doesn't fire if the account is deployed directly from the factory, rather than from initCode.

@adamegyed adamegyed merged commit 1193876 into develop Aug 15, 2024
3 checks passed
@adamegyed adamegyed deleted the adam/move-deploy-event branch August 15, 2024 21:48
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

Successfully merging this pull request may close these issues.

3 participants