From cf6ee42adc8b2e9ac8ffd1d70bd5b52f06e536b6 Mon Sep 17 00:00:00 2001 From: dhairya <55102840+DhairyaSethi@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:19:21 +0530 Subject: [PATCH] fix: Add timelocks getter in GhoCcipSteward (#438) * feat: timelock getter * fix: more in line with existing getters of other stewards * chore: update harness with new getter --- certora/steward/harness/GhoCcipSteward_Harness.sol | 4 ---- src/contracts/misc/GhoCcipSteward.sol | 7 ++++++- src/contracts/misc/interfaces/IGhoCcipSteward.sol | 9 +++++++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/certora/steward/harness/GhoCcipSteward_Harness.sol b/certora/steward/harness/GhoCcipSteward_Harness.sol index d23cc716..be2c7545 100644 --- a/certora/steward/harness/GhoCcipSteward_Harness.sol +++ b/certora/steward/harness/GhoCcipSteward_Harness.sol @@ -10,8 +10,4 @@ contract GhoCcipSteward_Harness is GhoCcipSteward { address riskCouncil, bool bridgeLimitEnabled ) GhoCcipSteward(ghoToken, ghoTokenPool, riskCouncil, bridgeLimitEnabled) {} - - function getCcipTimelocks() external view returns (CcipDebounce memory) { - return _ccipTimelocks; - } } diff --git a/src/contracts/misc/GhoCcipSteward.sol b/src/contracts/misc/GhoCcipSteward.sol index 26235676..12db6d38 100644 --- a/src/contracts/misc/GhoCcipSteward.sol +++ b/src/contracts/misc/GhoCcipSteward.sol @@ -130,7 +130,12 @@ contract GhoCcipSteward is RiskCouncilControlled, IGhoCcipSteward { } /// @inheritdoc IGhoCcipSteward - function RISK_COUNCIL() public view override returns (address) { + function getCcipTimelocks() external view override returns (CcipDebounce memory) { + return _ccipTimelocks; + } + + /// @inheritdoc IGhoCcipSteward + function RISK_COUNCIL() external view override returns (address) { return _riskCouncil; } diff --git a/src/contracts/misc/interfaces/IGhoCcipSteward.sol b/src/contracts/misc/interfaces/IGhoCcipSteward.sol index 39bec929..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; @@ -41,6 +44,12 @@ interface IGhoCcipSteward { uint128 inboundRate ) external; + /** + * @notice Returns timestamp of the last update of Ccip parameters. + * @return The CcipDebounce struct describing the last update of Ccip parameters. + */ + function getCcipTimelocks() external view returns (CcipDebounce memory); + /** * @notice Returns the minimum delay that must be respected between parameters update. * @return The minimum delay between parameter updates (in seconds)