Skip to content

Commit

Permalink
Forgot to emit the state change event.
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthconner authored and ypatil12 committed Oct 17, 2024
1 parent 8977fd5 commit 6d96106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/contracts/core/PermissionController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ contract PermissionController is PermissionControllerStorage {
} else {
info.delegatedContractSelectors[delegate][target].remove(selector);
}

emit AccountDelegateStateChange(account, msg.sender, target, selector, delegate, hasPermission);
}

//////////////////////////////////////////////////
Expand Down
2 changes: 2 additions & 0 deletions src/contracts/interfaces/IPermissionController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ interface IPermissionController {
* @param operator the message sender acting as an admin who is changing permissions
* @param target the address of the contract that delegation is changing for
* @param selector the function selector on the contract that delegation is changing for
* @param delegate the address of the delegate you want to add or revoke perms for
* @param hasPermission true if the delegation was added, false if it was revoked
*/
event AccountDelegateStateChange(
address indexed account,
address operator,
address target,
bytes4 selector,
address delegate,
bool hasPermission);

//////////////////////////////////////////////////
Expand Down

0 comments on commit 6d96106

Please sign in to comment.