rename to PartyInfo; README fees
This commit is contained in:
@@ -10,7 +10,7 @@ import "../src/PartyPool.sol";
|
||||
import {NativeWrapper} from "../src/NativeWrapper.sol";
|
||||
import {PartyPlanner} from "../src/PartyPlanner.sol";
|
||||
import {Deploy} from "./Deploy.sol";
|
||||
import {PartyPoolViewer} from "../src/PartyPoolViewer.sol";
|
||||
import {PartyInfo} from "../src/PartyInfo.sol";
|
||||
import {WETH9} from "./WETH9.sol";
|
||||
|
||||
/// @notice Minimal ERC20 token for tests with an external mint function.
|
||||
@@ -41,7 +41,7 @@ contract NativeTest is Test {
|
||||
TestERC20Native token1;
|
||||
WETH9 weth; // WETH is our third token
|
||||
PartyPool pool;
|
||||
PartyPoolViewer viewer;
|
||||
PartyInfo info;
|
||||
|
||||
address alice;
|
||||
address bob;
|
||||
@@ -111,7 +111,7 @@ contract NativeTest is Test {
|
||||
token0.mint(bob, INIT_BAL);
|
||||
token1.mint(bob, INIT_BAL);
|
||||
|
||||
viewer = Deploy.newViewer();
|
||||
info = Deploy.newInfo();
|
||||
}
|
||||
|
||||
/// @notice Helper to verify refunds work correctly
|
||||
@@ -300,7 +300,7 @@ contract NativeTest is Test {
|
||||
uint256 lpRequest = pool.totalSupply() / 10; // Request 10% of pool
|
||||
|
||||
// Get required deposit amounts
|
||||
uint256[] memory deposits = viewer.mintAmounts(pool, lpRequest);
|
||||
uint256[] memory deposits = info.mintAmounts(pool, lpRequest);
|
||||
|
||||
vm.startPrank(alice);
|
||||
token0.approve(address(pool), type(uint256).max);
|
||||
@@ -329,7 +329,7 @@ contract NativeTest is Test {
|
||||
/// @notice Test mint with excess native currency - verify refund
|
||||
function testMintWithExcessNativeRefunded() public {
|
||||
uint256 lpRequest = pool.totalSupply() / 10;
|
||||
uint256[] memory deposits = viewer.mintAmounts(pool, lpRequest);
|
||||
uint256[] memory deposits = info.mintAmounts(pool, lpRequest);
|
||||
|
||||
vm.startPrank(alice);
|
||||
token0.approve(address(pool), type(uint256).max);
|
||||
@@ -365,7 +365,7 @@ contract NativeTest is Test {
|
||||
uint256 lpToBurn = pool.totalSupply() / 10;
|
||||
|
||||
// Get expected withdraw amounts
|
||||
uint256[] memory withdraws = viewer.burnAmounts(pool, lpToBurn);
|
||||
uint256[] memory withdraws = info.burnAmounts(pool, lpToBurn);
|
||||
|
||||
uint256 thisEthBefore = address(this).balance;
|
||||
uint256 expectedWethWithdraw = withdraws[2]; // WETH is index 2
|
||||
@@ -391,7 +391,7 @@ contract NativeTest is Test {
|
||||
/// @notice Test burn to a different receiver with native output
|
||||
function testBurnToReceiverWithNativeOutput() public {
|
||||
uint256 lpToBurn = pool.totalSupply() / 10;
|
||||
uint256[] memory withdraws = viewer.burnAmounts(pool, lpToBurn);
|
||||
uint256[] memory withdraws = info.burnAmounts(pool, lpToBurn);
|
||||
|
||||
uint256 bobEthBefore = bob.balance;
|
||||
uint256 bobToken0Before = token0.balanceOf(bob);
|
||||
@@ -531,7 +531,7 @@ contract NativeTest is Test {
|
||||
|
||||
// 1. Mint with native currency
|
||||
uint256 lpRequest = pool.totalSupply() / 20; // 5% of pool
|
||||
uint256[] memory deposits = viewer.mintAmounts(pool, lpRequest);
|
||||
uint256[] memory deposits = info.mintAmounts(pool, lpRequest);
|
||||
|
||||
token0.approve(address(pool), type(uint256).max);
|
||||
token1.approve(address(pool), type(uint256).max);
|
||||
|
||||
Reference in New Issue
Block a user