Skip to content

Commit

Permalink
tasks: avoid magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
facuspagnuolo committed Sep 25, 2024
1 parent 618be66 commit 6f11ca1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/tasks/contracts/bridge/HopBridger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import '../interfaces/bridge/IHopBridger.sol';
contract HopBridger is IHopBridger, BaseBridgeTask {
using FixedPoint for uint256;

// Ethereum mainnet chain ID = 1
uint256 private constant MAINNET_CHAIN_ID = 1;

// Execution type for relayers
bytes32 public constant override EXECUTION_TYPE = keccak256('HOP_BRIDGER');

Expand Down Expand Up @@ -138,7 +141,7 @@ contract HopBridger is IHopBridger, BaseBridgeTask {
minAmountOut,
recipient,
tokenHopEntrypoint[token],
destinationChain == 1 ? 0 : (block.timestamp + maxDeadline),
destinationChain == MAINNET_CHAIN_ID ? 0 : (block.timestamp + maxDeadline),
relayer,
fee
);
Expand Down

0 comments on commit 6f11ca1

Please sign in to comment.