PartyPoolBalancedPair as subclass
This commit is contained in:
@@ -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()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user