refactor PartyPoolSwapMintImpl

This commit is contained in:
tim
2025-09-25 21:46:59 -04:00
parent 6edad6e510
commit 9cac58013b
12 changed files with 481 additions and 291 deletions

View File

@@ -55,10 +55,9 @@ interface IPartyPool is IERC20Metadata {
);
// Immutable pool configuration (public getters)
/// @notice Token addresses comprising the pool. Effectively immutable after construction.
/// @dev tokens[i] corresponds to the i-th asset and maps to index i in the internal LMSR arrays.
function tokens(uint256) external view returns (IERC20); // get single token
function getToken(uint256) external view returns (IERC20); // get single token
/// @notice Returns the number of tokens (n) in the pool.
function numTokens() external view returns (uint256);
@@ -80,10 +79,6 @@ interface IPartyPool is IERC20Metadata {
/// @dev Pools are constructed with a κ value; this getter exposes the κ used by the pool.
function kappa() external view returns (int128);
/// @notice Mapping from token address => (index+1). A zero value indicates the token is not in the pool.
/// @dev Use index = tokenAddressToIndexPlusOne[token] - 1 when non-zero.
function tokenAddressToIndexPlusOne(IERC20) external view returns (uint);
// Initialization / Mint / Burn (LP token managed)
/// @notice Calculate the proportional deposit amounts required for a given LP token amount