styling consistency

This commit is contained in:
tim
2025-10-15 11:19:36 -04:00
parent 7ac4cdc8f6
commit ead004d631
18 changed files with 275 additions and 281 deletions

View File

@@ -3,7 +3,6 @@ pragma solidity ^0.8.30;
import {ABDKMath64x64} from "../lib/abdk-libraries-solidity/ABDKMath64x64.sol";
abstract contract PartyPoolHelpers {
using ABDKMath64x64 for int128;
@@ -27,21 +26,12 @@ abstract contract PartyPoolHelpers {
netUint = gross - feeUint;
}
/// @notice Convenience: return gross = net + fee(net) using ceiling for fee.
/// @param netUint net amount
/// @param feePpm fee in ppm to apply
function _addFee(uint256 netUint, uint256 feePpm) internal pure returns (uint256 gross) {
if (feePpm == 0) return netUint;
uint256 fee = _ceilFee(netUint, feePpm);
return netUint + fee;
}
/// @notice Helper to compute size metric (sum of all asset quantities) from internal balances
/// @dev Returns the sum of all provided qInternal_ entries as a Q64.64 value.
function _computeSizeMetric(int128[] memory qInternal_) internal pure returns (int128) {
/// @dev Returns the sum of all provided qInternal entries as a Q64.64 value.
function _computeSizeMetric(int128[] memory qInternal) internal pure returns (int128) {
int128 total = int128(0);
for (uint i = 0; i < qInternal_.length; ) {
total = total.add(qInternal_[i]);
for (uint i = 0; i < qInternal.length; ) {
total = total.add(qInternal[i]);
unchecked { i++; }
}
return total;