From 19f14c6a952cb81fec038c3272f8e8b5c4a3621c Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 15 Sep 2025 21:38:14 -0400 Subject: [PATCH] denominators() --- src/IPartyPool.sol | 1 + src/PartyPool.sol | 1 + 2 files changed, 2 insertions(+) diff --git a/src/IPartyPool.sol b/src/IPartyPool.sol index df612eb..af568e1 100644 --- a/src/IPartyPool.sol +++ b/src/IPartyPool.sol @@ -50,6 +50,7 @@ interface IPartyPool is IERC20Metadata { function tokens(uint256) external view returns (address); // get single token function numTokens() external view returns (uint256); function allTokens() external view returns (address[] memory); + function denominators() external view returns (uint256[] memory); function tradeFrac() external view returns (int128); // ABDK 64x64 function targetSlippage() external view returns (int128); // ABDK 64x64 function swapFeePpm() external view returns (uint256); diff --git a/src/PartyPool.sol b/src/PartyPool.sol index f3761fe..ed898df 100644 --- a/src/PartyPool.sol +++ b/src/PartyPool.sol @@ -51,6 +51,7 @@ contract PartyPool is IPartyPool, ERC20, ReentrancyGuard { // balance / base = internal uint256[] internal cachedUintBalances; uint256[] internal bases; // per-token uint base used to scale token amounts <-> internal + function denominators() external view returns (uint256[] memory) { return bases; } mapping(address=>uint) public tokenAddressToIndexPlusOne; // Uses index+1 so a result of 0 indicates a failed lookup