PartyPoolBalancedPair as subclass

This commit is contained in:
tim
2025-10-06 16:09:34 -04:00
parent 0049d27c90
commit 63f6e66d08
4 changed files with 71 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ pragma solidity ^0.8.30;
import {IERC20} from "../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {PartyPlanner} from "./PartyPlanner.sol";
import {PartyPool} from "./PartyPool.sol";
import {PartyPoolBalancedPair} from "./PartyPoolBalancedPair.sol";
import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol";
import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol";
@@ -32,7 +33,21 @@ library Deploy {
uint256 protocolFeePpm = 0;
address protocolAddr = address(0);
return new PartyPool(
return _stable && tokens_.length == 2 ?
new PartyPoolBalancedPair(
name_,
symbol_,
tokens_,
bases_,
_kappa,
_swapFeePpm,
_flashFeePpm,
protocolFeePpm,
protocolAddr,
new PartyPoolSwapImpl(),
new PartyPoolMintImpl()
) :
new PartyPool(
name_,
symbol_,
tokens_,
@@ -42,7 +57,6 @@ library Deploy {
_flashFeePpm,
protocolFeePpm,
protocolAddr,
_stable,
new PartyPoolSwapImpl(),
new PartyPoolMintImpl()
);