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

@@ -1,13 +1,14 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.30;
import "../src/Deploy.sol";
import "../src/IPartyPool.sol";
import "../src/PartyPlanner.sol";
import "../src/PartyPool.sol";
import "../test/MockERC20.sol";
import "@abdk/ABDKMath64x64.sol";
import "forge-std/Script.sol";
import "forge-std/console2.sol";
import "@abdk/ABDKMath64x64.sol";
import "../test/MockERC20.sol";
import "../src/IPartyPool.sol";
import "../src/PartyPool.sol";
import "../src/PartyPlanner.sol";
contract DeployMock is Script {
@@ -38,7 +39,7 @@ contract DeployMock is Script {
uint256 _feePpm = 100;
// deploy a PartyPlanner factory and create the pool via factory
PartyPlanner planner = new PartyPlanner();
PartyPlanner planner = Deploy.newPartyPlanner();
// prepare initial deposits (10_000 units of each token, scaled by bases)
uint256[] memory initialDeposits = new uint256[](3);
@@ -56,8 +57,8 @@ contract DeployMock is Script {
IERC20(tokens[i]).approve(address(planner), initialDeposits[i]);
}
// call full createPool signature on factory which will take the deposits and mint initial LP
(PartyPool pool, uint256 lpAmount) = planner.createPool(
// call full newPool signature on factory which will take the deposits and mint initial LP
(PartyPool pool, ) = planner.newPool(
name,
symbol,
tokens,