From b20599e4778a327715663cd9e62092ce04613e37 Mon Sep 17 00:00:00 2001 From: "Eugene Y. Q. Shen" Date: Sun, 6 Oct 2024 02:39:40 -0700 Subject: [PATCH] [CHAIN-56] emit event when upgrading WalletFactory (#38) --- smart-wallets/src/WalletFactory.sol | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/smart-wallets/src/WalletFactory.sol b/smart-wallets/src/WalletFactory.sol index e808ef4..e7d5927 100644 --- a/smart-wallets/src/WalletFactory.sol +++ b/smart-wallets/src/WalletFactory.sol @@ -19,6 +19,12 @@ contract WalletFactory is Ownable { /// @notice Address of the current SmartWallet implementation ISmartWallet public smartWallet; + /** + * @notice Emitted when the SmartWallet implementation is upgraded + * @param smartWallet_ New SmartWallet implementation + */ + event Upgraded(ISmartWallet smartWallet_); + /** * @notice Construct the WalletFactory * @param owner_ Address of the owner of the WalletFactory @@ -36,6 +42,7 @@ contract WalletFactory is Ownable { */ function upgrade(ISmartWallet smartWallet_) public onlyOwner { smartWallet = smartWallet_; + emit Upgraded(smartWallet_); } }