From 0bcf294b2758f50fb572e56efea4858224af22a6 Mon Sep 17 00:00:00 2001 From: miguelmtz <36620902+miguelmtzinf@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:06:49 +0100 Subject: [PATCH] fix: Change data type of label param to static bytes32 (#229) --- src/contracts/gho/GhoToken.sol | 2 +- src/contracts/gho/interfaces/IGhoToken.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/contracts/gho/GhoToken.sol b/src/contracts/gho/GhoToken.sol index ad3df8eb..9039ac35 100644 --- a/src/contracts/gho/GhoToken.sol +++ b/src/contracts/gho/GhoToken.sol @@ -82,7 +82,7 @@ contract GhoToken is ERC20, Ownable, IGhoToken { emit FacilitatorAdded( facilitatorAddress, - facilitatorConfig.label, + keccak256(abi.encodePacked(facilitatorConfig.label)), facilitatorConfig.bucketCapacity ); } diff --git a/src/contracts/gho/interfaces/IGhoToken.sol b/src/contracts/gho/interfaces/IGhoToken.sol index b91fc84b..4c2b55e8 100644 --- a/src/contracts/gho/interfaces/IGhoToken.sol +++ b/src/contracts/gho/interfaces/IGhoToken.sol @@ -19,12 +19,12 @@ interface IGhoToken is IERC20Burnable, IERC20Mintable, IERC20 { /** * @dev Emitted when a new facilitator is added * @param facilitatorAddress The address of the new facilitator - * @param label A human readable identifier for the facilitator + * @param label A hashed human readable identifier for the facilitator * @param bucketCapacity The initial capacity of the facilitator's bucket */ event FacilitatorAdded( address indexed facilitatorAddress, - string indexed label, + bytes32 indexed label, uint256 bucketCapacity );