From 0aecd1325b86ee8658ed7a406604770835cc3c1e Mon Sep 17 00:00:00 2001 From: Carter Carlson Date: Thu, 10 Oct 2024 20:07:39 +0200 Subject: [PATCH] refactor: admin event additional arg (#124) --- contracts/hub/Hub.sol | 4 ++-- contracts/hub/interfaces/IHub.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/hub/Hub.sol b/contracts/hub/Hub.sol index 5258ab46..7751c8b3 100644 --- a/contracts/hub/Hub.sol +++ b/contracts/hub/Hub.sol @@ -144,7 +144,7 @@ contract Hub is IHub, HubUtils, OwnableUpgradeable, HubUpgradeable { if (!isMember(who)) revert NotMember(); if (!_admins.add(who)) revert AlreadyAdmin(); - emit AdminGranted(who); + emit AdminGranted(who, address(this)); } function removeAdmin(address who) external { @@ -152,7 +152,7 @@ contract Hub is IHub, HubUtils, OwnableUpgradeable, HubUpgradeable { if (msg.sender == who) revert AdminCannotRenounceSelf(); if (!_admins.remove(who)) revert CannotRemoveNonAdmin(); - emit AdminRenounced(who); + emit AdminRenounced(who, address(this)); } // ----------------------------------------------------------- diff --git a/contracts/hub/interfaces/IHub.sol b/contracts/hub/interfaces/IHub.sol index 6c18205c..3d469b59 100644 --- a/contracts/hub/interfaces/IHub.sol +++ b/contracts/hub/interfaces/IHub.sol @@ -23,8 +23,8 @@ interface IHub { error ConstraintFactorOutOfRange(); event SetConstraintFactor(uint128 oldConstraintFactor, uint128 newConstraintFactor); - event AdminGranted(address to); - event AdminRenounced(address from); + event AdminGranted(address to, address where); + event AdminRenounced(address from, address where); event MemberGranted(address to, uint256 role); event ArchetypeSet(uint8 parameter); event ParameterSet(uint8 num, uint8 value);