From 5c7abacde5af9ad32b525c978a3bb95a0d395e99 Mon Sep 17 00:00:00 2001 From: DhairyaSethi <55102840+DhairyaSethi@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:45:37 +0530 Subject: [PATCH] fix: more in line with existing getters of other stewards --- src/contracts/misc/GhoCcipSteward.sol | 5 ++--- src/contracts/misc/interfaces/IGhoCcipSteward.sol | 14 ++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/contracts/misc/GhoCcipSteward.sol b/src/contracts/misc/GhoCcipSteward.sol index 62f96997..12db6d38 100644 --- a/src/contracts/misc/GhoCcipSteward.sol +++ b/src/contracts/misc/GhoCcipSteward.sol @@ -130,9 +130,8 @@ contract GhoCcipSteward is RiskCouncilControlled, IGhoCcipSteward { } /// @inheritdoc IGhoCcipSteward - function getTimeLockState() external view override returns (uint40, uint40) { - CcipDebounce memory state = _ccipTimelocks; - return (state.bridgeLimitLastUpdate, state.rateLimitLastUpdate); + function getCcipTimelocks() external view override returns (CcipDebounce memory) { + return _ccipTimelocks; } /// @inheritdoc IGhoCcipSteward diff --git a/src/contracts/misc/interfaces/IGhoCcipSteward.sol b/src/contracts/misc/interfaces/IGhoCcipSteward.sol index 481705e7..0d9100bd 100644 --- a/src/contracts/misc/interfaces/IGhoCcipSteward.sol +++ b/src/contracts/misc/interfaces/IGhoCcipSteward.sol @@ -7,6 +7,9 @@ pragma solidity ^0.8.10; * @notice Defines the basic interface of the GhoCcipSteward */ interface IGhoCcipSteward { + /** + * @notice Struct storing the last update by the steward of the bridge and rate limit param. + */ struct CcipDebounce { uint40 bridgeLimitLastUpdate; uint40 rateLimitLastUpdate; @@ -42,15 +45,10 @@ interface IGhoCcipSteward { ) external; /** - * @notice Returns the current time-lock state for the steward. - * @dev `MINIMUM_DELAY` seconds needs to pass from the respective values - * to successfully call their corresponding methods. - * @return bridgeLimitLastUpdate The timestamp at which `updateBridgeLimit` was - * last successfully executed. - * @return rateLimitLastUpdate The timestamp at which `updateRateLimit` was - * last successfully executed. + * @notice Returns timestamp of the last update of Ccip parameters. + * @return The CcipDebounce struct describing the last update of Ccip parameters. */ - function getTimeLockState() external view returns (uint40, uint40); + function getCcipTimelocks() external view returns (CcipDebounce memory); /** * @notice Returns the minimum delay that must be respected between parameters update.