Skip to content

Commit d90473f

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
Override interfaces for Permissions contracts
1 parent bdfc4c5 commit d90473f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

contracts/feature/Permissions.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@ contract Permissions is IPermissions {
1515
_;
1616
}
1717

18-
function hasRole(bytes32 role, address account) public view returns (bool) {
18+
function hasRole(bytes32 role, address account) public view override returns (bool) {
1919
return _hasRole[role][account];
2020
}
2121

22-
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
22+
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
2323
return _getRoleAdmin[role];
2424
}
2525

26-
function grantRole(bytes32 role, address account) public virtual {
26+
function grantRole(bytes32 role, address account) public virtual override {
2727
_checkRole(_getRoleAdmin[role], msg.sender);
2828

2929
_hasRole[role][account] = true;
3030

3131
emit RoleGranted(role, account, msg.sender);
3232
}
3333

34-
function revokeRole(bytes32 role, address account) public virtual {
34+
function revokeRole(bytes32 role, address account) public virtual override {
3535
_checkRole(_getRoleAdmin[role], msg.sender);
3636

3737
delete _hasRole[role][account];
3838

3939
emit RoleRevoked(role, account, msg.sender);
4040
}
4141

42-
function renounceRole(bytes32 role, address account) public virtual {
42+
function renounceRole(bytes32 role, address account) public virtual override {
4343
require(msg.sender == account, "Can only renounce for self");
4444

4545
delete _hasRole[role][account];

contracts/feature/PermissionsEnumerable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ contract PermissionsEnumerable is IPermissionsEnumerable, Permissions {
1313

1414
mapping(bytes32 => RoleMembers) private roleMembers;
1515

16-
function getRoleMember(bytes32 role, uint256 index) external view returns (address member) {
16+
function getRoleMember(bytes32 role, uint256 index) external view override returns (address member) {
1717
uint256 currentIndex = roleMembers[role].index;
1818
uint256 check;
1919

@@ -28,7 +28,7 @@ contract PermissionsEnumerable is IPermissionsEnumerable, Permissions {
2828
}
2929
}
3030

31-
function getRoleMemberCount(bytes32 role) external view returns (uint256 count) {
31+
function getRoleMemberCount(bytes32 role) external view override returns (uint256 count) {
3232
uint256 currentIndex = roleMembers[role].index;
3333

3434
for (uint256 i = 0; i < currentIndex; i += 1) {

0 commit comments

Comments
 (0)