DeployMock creates viewer

This commit is contained in:
tim
2025-10-07 15:02:43 -04:00
parent 104c279123
commit 2d45296406
4 changed files with 15 additions and 11 deletions

View File

@@ -95,8 +95,12 @@ contract DeployMock is Script {
string memory configStr = vm.serializeString(config, vm.toString(block.chainid), chainConfigStr); string memory configStr = vm.serializeString(config, vm.toString(block.chainid), chainConfigStr);
vm.writeJson(configStr, 'chain.json'); vm.writeJson(configStr, 'chain.json');
console2.log('\nPartyPlanner', address(planner)); PartyPoolViewer viewer = Deploy.newViewer();
console2.log();
console2.log(' PartyPlanner', address(planner));
console2.log(' PartyPool', address(pool)); console2.log(' PartyPool', address(pool));
console2.log('PartyPoolViewer', address(viewer));
console2.log(' USXD', address(usxd)); console2.log(' USXD', address(usxd));
console2.log(' FUSD', address(fusd)); console2.log(' FUSD', address(fusd));
console2.log(' DIVE', address(dive)); console2.log(' DIVE', address(dive));

View File

@@ -8,7 +8,7 @@ import {PartyPoolBalancedPair} from "./PartyPoolBalancedPair.sol";
import {PartyPoolDeployer, PartyPoolBalancedPairDeployer} from "./PartyPoolDeployer.sol"; import {PartyPoolDeployer, PartyPoolBalancedPairDeployer} from "./PartyPoolDeployer.sol";
import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol"; import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol";
import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol"; import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol";
import {PartyPoolView} from "./PartyPoolView.sol"; import {PartyPoolViewer} from "./PartyPoolViewer.sol";
library Deploy { library Deploy {
@@ -67,7 +67,7 @@ library Deploy {
} }
function newViewer() internal returns (PartyPoolView) { function newViewer() internal returns (PartyPoolViewer) {
return new PartyPoolView(new PartyPoolSwapImpl(), new PartyPoolMintImpl()); return new PartyPoolViewer(new PartyPoolSwapImpl(), new PartyPoolMintImpl());
} }
} }

View File

@@ -9,7 +9,7 @@ import {PartyPoolHelpers} from "./PartyPoolHelpers.sol";
import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol"; import {PartyPoolMintImpl} from "./PartyPoolMintImpl.sol";
import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol"; import {PartyPoolSwapImpl} from "./PartyPoolSwapImpl.sol";
contract PartyPoolView is PartyPoolHelpers { contract PartyPoolViewer is PartyPoolHelpers {
using ABDKMath64x64 for int128; using ABDKMath64x64 for int128;
PartyPoolSwapImpl immutable internal SWAP_IMPL; PartyPoolSwapImpl immutable internal SWAP_IMPL;

View File

@@ -12,7 +12,7 @@ import "../src/PartyPool.sol";
import "../lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashBorrower.sol"; import "../lib/openzeppelin-contracts/contracts/interfaces/IERC3156FlashBorrower.sol";
import {PartyPlanner} from "../src/PartyPlanner.sol"; import {PartyPlanner} from "../src/PartyPlanner.sol";
import {Deploy} from "../src/Deploy.sol"; import {Deploy} from "../src/Deploy.sol";
import {PartyPoolView} from "../src/PartyPoolView.sol"; import {PartyPoolViewer} from "../src/PartyPoolViewer.sol";
/// @notice Test contract that implements the flash callback for testing flash loans /// @notice Test contract that implements the flash callback for testing flash loans
contract FlashBorrower is IERC3156FlashBorrower { contract FlashBorrower is IERC3156FlashBorrower {
@@ -117,7 +117,7 @@ contract PartyPoolTest is Test {
PartyPlanner planner; PartyPlanner planner;
PartyPool pool; PartyPool pool;
PartyPool pool10; PartyPool pool10;
PartyPoolView viewer; PartyPoolViewer viewer;
address alice; address alice;
address bob; address bob;