sepolia redeploy

This commit is contained in:
tim
2025-11-06 16:42:40 -04:00
parent de108cc1e4
commit ff9ed674f9
19 changed files with 146 additions and 82 deletions

View File

@@ -56,12 +56,6 @@ interface IPartyPoolViewer {
function burnSwapAmounts(IPartyPool pool, uint256 lpAmount, uint256 outputTokenIndex) external view
returns (uint256 amountOut, uint256 outFee);
/// @notice Compute repayment amounts (principal + flash fee) for a proposed flash loan.
/// @param loanAmounts array of per-token loan amounts; must match the pool's token ordering.
/// @return repaymentAmounts array where repaymentAmounts[i] = loanAmounts[i] + ceil(loanAmounts[i] * flashFeePpm)
function flashRepaymentAmounts(IPartyPool pool, uint256[] memory loanAmounts) external view
returns (uint256[] memory repaymentAmounts);
/**
* @dev The amount of currency available to be lent.
* @param token The loan currency.

View File

@@ -459,7 +459,7 @@ contract PartyPool is PartyPoolBase, OwnableExternal, ERC20External, IPartyPool
/// @notice Transfer all protocol fees to the configured protocolFeeAddress and zero the ledger.
/// @dev Anyone can call; must have protocolFeeAddress != address(0) to be operational.
function collectProtocolFees() external nonReentrant {
function collectProtocolFees() external {
bytes memory data = abi.encodeWithSelector(
PartyPoolSwapImpl.collectProtocolFees.selector,
protocolFeeAddress

View File

@@ -132,23 +132,6 @@ contract PartyPoolViewer is PartyPoolHelpers, IPartyPoolViewer {
}
/// @notice Compute repayment amounts (principal + flash fee) for a proposed flash loan.
/// @param loanAmounts array of per-token loan amounts; must match the pool's token ordering.
/// @return repaymentAmounts array where repaymentAmounts[i] = loanAmounts[i] + ceil(loanAmounts[i] * flashFeePpm)
function flashRepaymentAmounts(IPartyPool pool, uint256[] memory loanAmounts) external view
returns (uint256[] memory repaymentAmounts) {
LMSRStabilized.State memory lmsr = pool.LMSR();
uint256 nAssets = lmsr.qInternal.length;
repaymentAmounts = new uint256[](nAssets);
for (uint256 i = 0; i < nAssets; i++) {
uint256 amount = loanAmounts[i];
if (amount > 0) {
repaymentAmounts[i] = amount + _ceilFee(amount, pool.flashFeePpm());
}
}
}
/**
* @dev The amount of currency available to be lent.
* @param token The loan currency.