sepolia redeploy
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user