Skip to content

Commit

Permalink
fix: more in line with existing getters of other stewards
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Jan 6, 2025
1 parent 8463647 commit 5c7abac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/contracts/misc/GhoCcipSteward.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 6 additions & 8 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 @@ -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.
Expand Down

0 comments on commit 5c7abac

Please sign in to comment.