diff --git a/src/SparkLendFreezerMom.sol b/src/SparkLendFreezerMom.sol index c825443..42ad304 100644 --- a/src/SparkLendFreezerMom.sol +++ b/src/SparkLendFreezerMom.sol @@ -24,8 +24,8 @@ contract SparkLendFreezerMom is ISparkLendFreezerMom { address public override immutable poolConfigurator; address public override immutable pool; - address public authority; - address public owner; + address public override authority; + address public override owner; constructor(address poolConfigurator_, address pool_, address authority_) { poolConfigurator = poolConfigurator_; @@ -51,16 +51,16 @@ contract SparkLendFreezerMom is ISparkLendFreezerMom { } /**********************************************************************************************/ - /*** Wards Functions ***/ + /*** Owner Functions ***/ /**********************************************************************************************/ - function setAuthority(address authority_) external onlyOwner { + function setAuthority(address authority_) external override onlyOwner { emit SetAuthority(authority, authority_); authority = authority_; } - function setOwner(address owner_) external onlyOwner { + function setOwner(address owner_) external override onlyOwner { emit SetOwner(owner, owner_); owner = owner_; } diff --git a/src/interfaces/ISparkLendFreezerMom.sol b/src/interfaces/ISparkLendFreezerMom.sol index edf356b..ebed816 100644 --- a/src/interfaces/ISparkLendFreezerMom.sol +++ b/src/interfaces/ISparkLendFreezerMom.sol @@ -7,7 +7,18 @@ interface ISparkLendFreezerMom { /*** Events ***/ /**********************************************************************************************/ + /** + * @dev Event to log the setting of a new owner. + * @param oldOwner The address of the previous owner. + * @param newOwner The address of the new owner. + */ event SetOwner(address indexed oldOwner, address indexed newOwner); + + /** + * @dev Event to log the setting of a new authority. + * @param oldAuthority The address of the previous authority. + * @param newAuthority The address of the new authority. + */ event SetAuthority(address indexed oldAuthority, address indexed newAuthority); /**********************************************************************************************/ @@ -32,16 +43,28 @@ interface ISparkLendFreezerMom { */ function authority() external view returns (address); + /** + * @dev Returns the address of the owner. + * @return The address of the owner. + */ + function owner() external view returns (address); + /**********************************************************************************************/ - /*** Wards Functions ***/ + /*** Owner Functions ***/ /**********************************************************************************************/ /** - * @dev Function to set a new authority, permissioned to wards. + * @dev Function to set a new authority, permissioned to owner. * @param authority The address of the new authority. */ function setAuthority(address authority) external; + /** + * @dev Function to set a new owner, permissioned to owner. + * @param owner The address of the new owner. + */ + function setOwner(address owner) external; + /**********************************************************************************************/ /*** Auth Functions ***/ /**********************************************************************************************/