From 11938769ce4fef3aa523cb97429cc977c571cc16 Mon Sep 17 00:00:00 2001 From: Adam Egyed <5456061+adamegyed@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:48:34 -0400 Subject: [PATCH] feat: move account deploy event to factory (#142) --- src/account/AccountFactory.sol | 3 +++ src/account/UpgradeableModularAccount.sol | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/account/AccountFactory.sol b/src/account/AccountFactory.sol index 27039dee..e768dee4 100644 --- a/src/account/AccountFactory.sol +++ b/src/account/AccountFactory.sol @@ -16,6 +16,8 @@ contract AccountFactory is Ownable { IEntryPoint public immutable ENTRY_POINT; address public immutable SINGLE_SIGNER_VALIDATION_MODULE; + event ModularAccountDeployed(address indexed account, address indexed owner, uint256 salt); + constructor( IEntryPoint _entryPoint, UpgradeableModularAccount _accountImpl, @@ -55,6 +57,7 @@ contract AccountFactory is Ownable { pluginInstallData, new bytes[](0) ); + emit ModularAccountDeployed(addr, owner, salt); } return UpgradeableModularAccount(payable(addr)); diff --git a/src/account/UpgradeableModularAccount.sol b/src/account/UpgradeableModularAccount.sol index 764086bd..59a8ff32 100644 --- a/src/account/UpgradeableModularAccount.sol +++ b/src/account/UpgradeableModularAccount.sol @@ -67,8 +67,6 @@ contract UpgradeableModularAccount is bytes4 internal constant _1271_MAGIC_VALUE = 0x1626ba7e; bytes4 internal constant _1271_INVALID = 0xffffffff; - event ModularAccountInitialized(IEntryPoint indexed entryPoint); - error NonCanonicalEncoding(); error NotEntryPoint(); error PostExecHookReverted(address module, uint32 entityId, bytes revertReason); @@ -249,7 +247,6 @@ contract UpgradeableModularAccount is bytes[] calldata hooks ) external initializer { _installValidation(validationConfig, selectors, installData, hooks); - emit ModularAccountInitialized(_ENTRY_POINT); } /// @inheritdoc IModuleManager