Skip to content

Commit

Permalink
feat: timelock getter
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Jan 3, 2025
1 parent 0a6fbd4 commit 8463647
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/contracts/misc/GhoCcipSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ contract GhoCcipSteward is RiskCouncilControlled, IGhoCcipSteward {
}

/// @inheritdoc IGhoCcipSteward
function RISK_COUNCIL() public view override returns (address) {
function getTimeLockState() external view override returns (uint40, uint40) {
CcipDebounce memory state = _ccipTimelocks;
return (state.bridgeLimitLastUpdate, state.rateLimitLastUpdate);
}

/// @inheritdoc IGhoCcipSteward
function RISK_COUNCIL() external view override returns (address) {
return _riskCouncil;
}

Expand Down
11 changes: 11 additions & 0 deletions src/contracts/misc/interfaces/IGhoCcipSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ interface IGhoCcipSteward {
uint128 inboundRate
) 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.
*/
function getTimeLockState() external view returns (uint40, uint40);

/**
* @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 8463647

Please sign in to comment.