This commit is contained in:
tim
2025-10-01 15:20:02 -04:00
parent 3a5f0842b3
commit d46e60f83c
2 changed files with 3 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ contract PartyPool is PartyPoolBase, IPartyPool {
/// @inheritdoc IPartyPool
function mintAmounts(uint256 lpTokenAmount) public view returns (uint256[] memory depositAmounts) {
return MINT_IMPL.mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply());
return MINT_IMPL.mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply(), cachedUintBalances);
}
/// @notice Proportional mint for existing pool.

View File

@@ -43,7 +43,7 @@ contract PartyPoolMintImpl is PartyPoolBase {
uint256 oldScaled = ABDKMath64x64.mulu(oldTotal, LP_SCALE);
// Calculate required deposit amounts for the desired LP tokens
uint256[] memory depositAmounts = mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply());
uint256[] memory depositAmounts = mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply(), cachedUintBalances);
// Transfer in all token amounts
for (uint i = 0; i < n; ) {
@@ -166,7 +166,7 @@ contract PartyPoolMintImpl is PartyPoolBase {
emit Burn(payer, receiver, withdrawAmounts, lpAmount);
}
function mintAmounts(uint256 lpTokenAmount, uint256 numAssets, uint256 totalSupply) public view
function mintAmounts(uint256 lpTokenAmount, uint256 numAssets, uint256 totalSupply, uint256[] memory cachedUintBalances) public view
returns (uint256[] memory depositAmounts) {
depositAmounts = new uint256[](numAssets);