Skip to content

Commit d96c7a5

Browse files
authored
fix: add removeFacilitator to interface (#6)
1 parent e9aefb2 commit d96c7a5

File tree

1 file changed

+23
-43
lines changed

1 file changed

+23
-43
lines changed

src/interfaces/IGhoToken.sol

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

4-
interface IGhoToken {
4+
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
5+
import {IAccessControl} from "openzeppelin-contracts/contracts/access/IAccessControl.sol";
6+
7+
interface IGhoToken is IERC20, IAccessControl {
58
struct Facilitator {
69
uint128 bucketCapacity;
710
uint128 bucketLevel;
@@ -15,14 +18,10 @@ interface IGhoToken {
1518
function FACILITATOR_MANAGER_ROLE() external pure returns (bytes32);
1619

1720
/**
18-
* @notice Add the facilitator passed with the parameters to the facilitators list.
19-
* @dev Only accounts with `FACILITATOR_MANAGER_ROLE` role can call this function
20-
* @param facilitatorAddress The address of the facilitator to add
21-
* @param facilitatorLabel A human readable identifier for the facilitator
22-
* @param bucketCapacity The upward limit of GHO can be minted by the facilitator
21+
* @notice Returns the identifier of the Bucket Manager Role
22+
* @return The bytes32 id hash of the BucketManager role
2323
*/
24-
function addFacilitator(address facilitatorAddress, string calldata facilitatorLabel, uint128 bucketCapacity)
25-
external;
24+
function BUCKET_MANAGER_ROLE() external pure returns (bytes32);
2625

2726
/**
2827
* @notice Mints the requested amount of tokens to the account address.
@@ -41,7 +40,22 @@ interface IGhoToken {
4140
*/
4241
function burn(uint256 amount) external;
4342

44-
function balanceOf(address user) external returns (uint256);
43+
/**
44+
* @notice Add the facilitator passed with the parameters to the facilitators list.
45+
* @dev Only accounts with `FACILITATOR_MANAGER_ROLE` role can call this function
46+
* @param facilitatorAddress The address of the facilitator to add
47+
* @param facilitatorLabel A human readable identifier for the facilitator
48+
* @param bucketCapacity The upward limit of GHO can be minted by the facilitator
49+
*/
50+
function addFacilitator(address facilitatorAddress, string calldata facilitatorLabel, uint128 bucketCapacity)
51+
external;
52+
53+
/**
54+
* @notice Remove the facilitator from the facilitators list.
55+
* @dev Only accounts with `FACILITATOR_MANAGER_ROLE` role can call this function
56+
* @param facilitatorAddress The address of the facilitator to remove
57+
*/
58+
function removeFacilitator(address facilitatorAddress) external;
4559

4660
/**
4761
* @notice Set the bucket capacity of the facilitator.
@@ -71,38 +85,4 @@ interface IGhoToken {
7185
* @return The list of the facilitators addresses
7286
*/
7387
function getFacilitatorsList() external view returns (address[] memory);
74-
75-
/**
76-
* @notice Returns the identifier of the Bucket Manager Role
77-
* @return The bytes32 id hash of the BucketManager role
78-
*/
79-
function BUCKET_MANAGER_ROLE() external view returns (bytes32);
80-
81-
/**
82-
* @dev Grants `role` to `account`.
83-
*
84-
* If `account` had not been already granted `role`, emits a {RoleGranted}
85-
* event.
86-
*
87-
* Requirements:
88-
*
89-
* - the caller must have ``role``'s admin role.
90-
*/
91-
function grantRole(bytes32 role, address account) external;
92-
93-
/**
94-
* @dev Returns `true` if `account` has been granted `role`.
95-
*/
96-
function hasRole(bytes32 role, address account) external view returns (bool);
97-
98-
/**
99-
* @dev Revokes `role` from `account`.
100-
*
101-
* If `account` had been granted `role`, emits a {RoleRevoked} event.
102-
*
103-
* Requirements:
104-
*
105-
* - the caller must have ``role``'s admin role.
106-
*/
107-
function revokeRole(bytes32 role, address account) external;
10888
}

0 commit comments

Comments
 (0)