Skip to content

Commit

Permalink
Add helper min function
Browse files Browse the repository at this point in the history
  • Loading branch information
vladbochok committed Dec 23, 2021
1 parent 3fd78fc commit 22612e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/contracts/Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ library Utils {
return a < b ? a : b;
}

/// @notice Returns lesser of two values
function minU128(uint128 a, uint128 b) internal pure returns (uint128) {
return a < b ? a : b;
}

/// @notice Recovers signer's address from ethereum signature for given message
/// @param _signature 65 bytes concatenated. R (32) + S (32) + V (1)
/// @param _messageHash signed message hash.
Expand Down

0 comments on commit 22612e5

Please sign in to comment.