additive fees; burnSwapAmounts fix

This commit is contained in:
tim
2025-11-04 16:58:16 -04:00
parent 590acdd4dc
commit dc2e186331
10 changed files with 103 additions and 100 deletions

View File

@@ -408,14 +408,7 @@ contract PartyPool is PartyPoolBase, OwnableExternal, ERC20External, IPartyPool
return abi.decode(result, (uint256, uint256, uint256));
}
/// @notice Burn LP _tokens then swap the redeemed proportional basket into a single asset `inputTokenIndex` and send to receiver.
/// @dev This function forwards the call to the burnSwap implementation via delegatecall
/// @param payer who burns LP _tokens
/// @param receiver who receives the single asset
/// @param lpAmount amount of LP _tokens to burn
/// @param outputTokenIndex index of target asset to receive
/// @param deadline optional deadline
/// @return amountOutUint uint amount of asset i sent to receiver
/// @inheritdoc IPartyPool
function burnSwap(
address payer,
address receiver,
@@ -423,7 +416,7 @@ contract PartyPool is PartyPoolBase, OwnableExternal, ERC20External, IPartyPool
uint256 outputTokenIndex,
uint256 deadline,
bool unwrap
) external returns (uint256 amountOutUint) {
) external returns (uint256 amountOut, uint256 outFee) {
bytes memory data = abi.encodeWithSelector(
PartyPoolMintImpl.burnSwap.selector,
payer,
@@ -437,7 +430,7 @@ contract PartyPool is PartyPoolBase, OwnableExternal, ERC20External, IPartyPool
);
bytes memory result = Address.functionDelegateCall(address(MINT_IMPL), data);
return abi.decode(result, (uint256));
return abi.decode(result, (uint256,uint256 ));
}