From c7411133a397115cecda7d901e5b50437cb86a55 Mon Sep 17 00:00:00 2001 From: lucas-manuel Date: Sun, 12 Nov 2023 18:53:06 -0500 Subject: [PATCH] fix: update as per review --- src/SparkLendFreezerMom.sol | 5 +++-- src/interfaces/ISparkLendFreezerMom.sol | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/SparkLendFreezerMom.sol b/src/SparkLendFreezerMom.sol index 1fab45d..042f3ba 100644 --- a/src/SparkLendFreezerMom.sol +++ b/src/SparkLendFreezerMom.sol @@ -72,8 +72,9 @@ contract SparkLendFreezerMom is ISparkLendFreezerMom { address[] memory reserves = PoolLike(pool).getReservesList(); for (uint256 i = 0; i < reserves.length; i++) { - PoolConfiguratorLike(poolConfigurator).setReserveFreeze(reserves[i], true); - emit FreezeMarket(reserves[i]); + address reserve = reserves[i]; + PoolConfiguratorLike(poolConfigurator).setReserveFreeze(reserve, true); + emit FreezeMarket(reserve); } } diff --git a/src/interfaces/ISparkLendFreezerMom.sol b/src/interfaces/ISparkLendFreezerMom.sol index 6aaeb99..5270fb1 100644 --- a/src/interfaces/ISparkLendFreezerMom.sol +++ b/src/interfaces/ISparkLendFreezerMom.sol @@ -9,6 +9,7 @@ interface ISparkLendFreezerMom { /** * @dev Event to log the freezing of a given market in SparkLend. + * @dev NOTE: This event will fire even if the market is already frozen. * @param reserve The address of the market reserve. */ event FreezeMarket(address indexed reserve); @@ -78,7 +79,8 @@ interface ISparkLendFreezerMom { /** * @dev Function to freeze a specified market. Permissioned using the isAuthorized function * which allows the owner, the freezer contract itself, or the `hat` in the Chief - * to call the function. + * to call the function. Note that the `authority` in this contract is assumed to be + * the Chief in the MakerDAO protocol. * @param reserve The address of the market to freeze. */ function freezeMarket(address reserve) external;