Skip to content

Commit

Permalink
refactor: admin event additional arg (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
pegahcarter authored Oct 10, 2024
1 parent 7aed0e6 commit 0aecd13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/hub/Hub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ 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 {
if (!isAdmin(msg.sender)) revert NotAdmin();
if (msg.sender == who) revert AdminCannotRenounceSelf();
if (!_admins.remove(who)) revert CannotRemoveNonAdmin();

emit AdminRenounced(who);
emit AdminRenounced(who, address(this));
}

// -----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions contracts/hub/interfaces/IHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0aecd13

Please sign in to comment.