Skip to content

Commit

Permalink
fix: Add timelocks getter in GhoCcipSteward (#438)
Browse files Browse the repository at this point in the history
* feat: timelock getter

* fix: more in line with existing getters of other stewards

* chore: update harness with new getter
  • Loading branch information
DhairyaSethi authored Jan 6, 2025
1 parent a0dca17 commit cf6ee42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 0 additions & 4 deletions certora/steward/harness/GhoCcipSteward_Harness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
7 changes: 6 additions & 1 deletion src/contracts/misc/GhoCcipSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
9 changes: 9 additions & 0 deletions src/contracts/misc/interfaces/IGhoCcipSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit cf6ee42

Please sign in to comment.