Skip to content

Commit

Permalink
feat: move account deploy event to factory (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamegyed authored Aug 15, 2024
1 parent 47b912a commit 1193876
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/account/AccountFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -55,6 +57,7 @@ contract AccountFactory is Ownable {
pluginInstallData,
new bytes[](0)
);
emit ModularAccountDeployed(addr, owner, salt);
}

return UpgradeableModularAccount(payable(addr));
Expand Down
3 changes: 0 additions & 3 deletions src/account/UpgradeableModularAccount.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -249,7 +247,6 @@ contract UpgradeableModularAccount is
bytes[] calldata hooks
) external initializer {
_installValidation(validationConfig, selectors, installData, hooks);
emit ModularAccountInitialized(_ENTRY_POINT);
}

/// @inheritdoc IModuleManager
Expand Down

0 comments on commit 1193876

Please sign in to comment.