Skip to content

Commit

Permalink
feat: use address instead of explicit type
Browse files Browse the repository at this point in the history
  • Loading branch information
heueristik committed Jun 12, 2023
1 parent 3c147b6 commit bce9f32
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/contracts/src/core/permission/PermissionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ abstract contract PermissionManager is Initializable {
/// @param here The address of the context in which the permission is granted.
/// @param where The address of the target contract for which `_who` receives permission.
/// @param who The address (EOA or contract) receiving the permission.
/// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `PermissionCondition` to be used.
/// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `PermissionConditionBase` contract implementation to be used.
event Granted(
bytes32 indexed permissionId,
address indexed here,
address where,
address indexed who,
PermissionConditionBase condition
address condition
);

/// @notice Emitted when a permission `permission` is revoked in the context `here` from the address `_who` for the contract `_where`.
Expand Down Expand Up @@ -238,13 +238,7 @@ abstract contract PermissionManager is Initializable {
if (currentFlag == UNSET_FLAG) {
permissionsHashed[permHash] = ALLOW_FLAG;

emit Granted(
_permissionId,
msg.sender,
_where,
_who,
PermissionConditionBase(ALLOW_FLAG)
);
emit Granted(_permissionId, msg.sender, _where, _who, ALLOW_FLAG);
}
}

Expand Down Expand Up @@ -284,7 +278,7 @@ abstract contract PermissionManager is Initializable {
if (currentCondition == UNSET_FLAG) {
permissionsHashed[permHash] = newCondition;

emit Granted(_permissionId, msg.sender, _where, _who, _condition);
emit Granted(_permissionId, msg.sender, _where, _who, newCondition);
} else if (currentCondition != newCondition) {
// Revert if `permHash` is already granted, but uses a different condition.
// If we don't revert, we either should:
Expand Down

0 comments on commit bce9f32

Please sign in to comment.