PartyPoolBalancedPair as subclass
This commit is contained in:
@@ -8,6 +8,7 @@ import {LMSRStabilized} from "./LMSRStabilized.sol";
|
||||
import {PartyPool} from "./PartyPool.sol";
|
||||
import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol";
|
||||
import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol";
|
||||
import {PartyPoolBalancedPair} from "./PartyPoolBalancedPair.sol";
|
||||
|
||||
/// @title PartyPlanner
|
||||
/// @notice Factory contract for creating and tracking PartyPool instances
|
||||
@@ -86,7 +87,21 @@ contract PartyPlanner is IPartyPlanner {
|
||||
require(_kappa > int128(0), "Planner: kappa must be > 0");
|
||||
|
||||
// Create a new PartyPool instance (kappa-based constructor)
|
||||
pool = new PartyPool(
|
||||
pool = _stable && _tokens.length == 2 ?
|
||||
new PartyPoolBalancedPair(
|
||||
name_,
|
||||
symbol_,
|
||||
_tokens,
|
||||
_bases,
|
||||
_kappa,
|
||||
_swapFeePpm,
|
||||
_flashFeePpm,
|
||||
PROTOCOL_FEE_PPM,
|
||||
PROTOCOL_FEE_ADDRESS,
|
||||
PartyPoolSwapImpl(SWAP_MINT_IMPL),
|
||||
MINT_IMPL
|
||||
) :
|
||||
new PartyPool(
|
||||
name_,
|
||||
symbol_,
|
||||
_tokens,
|
||||
@@ -96,7 +111,6 @@ contract PartyPlanner is IPartyPlanner {
|
||||
_flashFeePpm,
|
||||
PROTOCOL_FEE_PPM,
|
||||
PROTOCOL_FEE_ADDRESS,
|
||||
_stable,
|
||||
PartyPoolSwapImpl(SWAP_MINT_IMPL),
|
||||
MINT_IMPL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user