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

32
src/Deploy.sol Normal file
View File

@@ -0,0 +1,32 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.30;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {PartyPool} from "./PartyPool.sol";
import {PartyPoolSwapMintImpl} from "./PartyPoolSwapMintImpl.sol";
import {PartyPlanner} from "./PartyPlanner.sol";
library Deploy {
function newPartyPlanner() internal returns (PartyPlanner) {
return new PartyPlanner(
new PartyPoolSwapMintImpl()
);
}
function newPartyPool(
string memory name_,
string memory symbol_,
IERC20[] memory tokens_,
uint256[] memory bases_,
int128 _kappa,
uint256 _swapFeePpm,
uint256 _flashFeePpm,
bool _stable
) internal returns (PartyPool) {
return new PartyPool(name_, symbol_, tokens_, bases_, _kappa, _swapFeePpm, _flashFeePpm, _stable,
new PartyPoolSwapMintImpl()
);
}
}