Skip to content

Commit

Permalink
📝 Missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
transmissions11 committed Nov 23, 2021
1 parent b44eeae commit 49cb54a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/VaultAuthorityModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ contract VaultAuthorityModule is Auth, Authority {
/// @return A boolean indicating whether the role has the capability.
function doesRoleHaveCapability(uint8 role, bytes4 functionSig) external view virtual returns (bool) {
unchecked {
// Generate a mask for the role.
bytes32 shifted = bytes32(uint256(uint256(2)**uint256(role)));

// Check if the role has the capability using the generated mask.
return bytes32(0) != getRoleCapabilities[functionSig] & shifted;
}
}
Expand Down

0 comments on commit 49cb54a

Please sign in to comment.