Skip to content

Commit

Permalink
followed style guide for ccipRouter
Browse files Browse the repository at this point in the history
  • Loading branch information
voith committed Feb 24, 2025
1 parent 30e7bfc commit 2f26d7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions contracts/ccip/GovernanceCCIPRelay.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {IGovernanceCCIPRelay} from "./interfaces/IGovernanceCCIPRelay.sol";
*/
contract GovernanceCCIPRelay is IGovernanceCCIPRelay {
/// @inheritdoc IGovernanceCCIPRelay
IRouterClient public immutable ccipRouter;
IRouterClient public immutable CCIP_ROUTER;

/// @inheritdoc IGovernanceCCIPRelay
address public immutable TIMELOCK;
Expand Down Expand Up @@ -40,7 +40,7 @@ contract GovernanceCCIPRelay is IGovernanceCCIPRelay {
uint64 _destinationChainSelector,
address _receiver
) {
ccipRouter = IRouterClient(_router);
CCIP_ROUTER = IRouterClient(_router);
TIMELOCK = _timelock;
destinationChainSelector = _destinationChainSelector;
destinationReceiver = _receiver;
Expand Down Expand Up @@ -70,11 +70,11 @@ contract GovernanceCCIPRelay is IGovernanceCCIPRelay {

// Calculate the required fee
uint256 msgValue = msg.value;
uint256 fee = ccipRouter.getFee(destinationChainSelector, message);
uint256 fee = CCIP_ROUTER.getFee(destinationChainSelector, message);
require(msgValue >= fee, InsufficientFee(msg.value, fee));

// Send the message via CCIP
messageId = ccipRouter.ccipSend{value: fee}(
messageId = CCIP_ROUTER.ccipSend{value: fee}(
destinationChainSelector,
message
);
Expand Down
2 changes: 1 addition & 1 deletion contracts/ccip/interfaces/IGovernanceCCIPRelay.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface IGovernanceCCIPRelay {

/// @notice Returns the address of the CCIP router contract.
/// @return The address of the CCIP router.
function ccipRouter() external view returns (IRouterClient);
function CCIP_ROUTER() external view returns (IRouterClient);

/// @notice Returns the address of the timelock contract.
/// @return The address of the timelock.
Expand Down
2 changes: 1 addition & 1 deletion test/ccip/GovernanceCCIPRelayTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract GovernanceCCIPRelayTest is Test {
function testConstructorSetsArgumentsCorrectly() public {
assertEq(relay.TIMELOCK(), timelock, "Timelock address mismatch");
assertEq(
address(relay.ccipRouter()),
address(relay.CCIP_ROUTER()),
ccipRouter,
"Router address mismatch"
);
Expand Down

0 comments on commit 2f26d7d

Please sign in to comment.