Skip to content

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
@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.

4 participants