From 4d2d83a32fc6cc831bf63d55e31e5c63b7bee519 Mon Sep 17 00:00:00 2001 From: Bobby Fiando Date: Sun, 17 Nov 2024 10:54:55 +0700 Subject: [PATCH] WIP: Test increasing last asset for yield --- test/EduEna.t.sol | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/EduEna.t.sol b/test/EduEna.t.sol index 220c43f..717ca74 100644 --- a/test/EduEna.t.sol +++ b/test/EduEna.t.sol @@ -26,7 +26,7 @@ contract EduenaTest is Test { function testDeposit() public { address user = address(0x123); - uint256 amount = 100 ether; + uint256 amount = 50 ether; deal(address(usde), user, amount); vm.startPrank(user); @@ -42,20 +42,22 @@ contract EduenaTest is Test { assertEq(eduena.totalSupply(), amount); assertEq(eduena.totalUnclaimedYieldInUSDe(), 0); - console.log(susde.totalAssets()); + console.log(susde.previewRedeem(susde.balanceOf(address(eduena)))); - vm.makePersistent(address(eduena)); + address rewarder = address(0x456); + deal(address(usde), rewarder, 10000 ether); + vm.startPrank(rewarder); + usde.transfer(susdeAddress, 10000 ether); + vm.stopPrank(); - vm.rollFork(21185274); + console.log(susde.previewRedeem(susde.balanceOf(address(eduena)))); - address user2 = address(0x123); + address user2 = address(0x789); deal(address(usde), user2, amount); vm.startPrank(user2); usde.approve(address(eduena), amount); eduena.deposit(amount); vm.stopPrank(); - - console.log(susde.totalAssets()); } function testWithdraw() public {}