From be4aa3fc5e2467f34353e5a7eb15e76609a9d9d3 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 18 Mar 2024 20:40:06 -0400 Subject: [PATCH 1/3] Makes rewardsDistributor state variable public --- src/StakingNodesManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StakingNodesManager.sol b/src/StakingNodesManager.sol index aaa382e73..e37e2f4df 100644 --- a/src/StakingNodesManager.sol +++ b/src/StakingNodesManager.sol @@ -86,7 +86,7 @@ contract StakingNodesManager is UpgradeableBeacon public upgradeableBeacon; IynETH public ynETH; - IRewardsDistributor rewardsDistributor; + IRewardsDistributor public rewardsDistributor; Validator[] public validators; From f4a7776e49a83033c06e926fc0e61031fa518119 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 18 Mar 2024 20:44:10 -0400 Subject: [PATCH 2/3] Fix stETH balance assertion with compareWithThreshold --- test/foundry/integration/ynLSD.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/foundry/integration/ynLSD.t.sol b/test/foundry/integration/ynLSD.t.sol index 66e472e8d..2388fd799 100644 --- a/test/foundry/integration/ynLSD.t.sol +++ b/test/foundry/integration/ynLSD.t.sol @@ -358,7 +358,7 @@ contract ynLSDAdminTest is IntegrationBaseTest { (bool success, ) = chainAddresses.lsd.STETH_ADDRESS.call{value: amount + 1}(""); require(success, "ETH transfer failed"); uint256 balance = asset.balanceOf(address(this)); - assertEq(balance, amount, "Amount not received"); + assertEq(compareWithThreshold(balance, amount, 1), true, "Amount not received"); asset.approve(address(ynlsd), amount); ynlsd.deposit(asset, amount, address(this)); From ff2f468ea9129c917e4ab71f225513a96ff30eb6 Mon Sep 17 00:00:00 2001 From: xhad Date: Mon, 18 Mar 2024 20:48:27 -0400 Subject: [PATCH 3/3] Fix: Use ether value --- test/foundry/integration/ynLSD.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/foundry/integration/ynLSD.t.sol b/test/foundry/integration/ynLSD.t.sol index 2388fd799..991e2690c 100644 --- a/test/foundry/integration/ynLSD.t.sol +++ b/test/foundry/integration/ynLSD.t.sol @@ -347,7 +347,7 @@ contract ynLSDAdminTest is IntegrationBaseTest { function testRetrieveAssetsSuccess() public { IERC20 asset = IERC20(chainAddresses.lsd.STETH_ADDRESS); - uint256 amount = 64; + uint256 amount = 64 ether; vm.prank(actors.STAKING_NODE_CREATOR); ynlsd.createLSDStakingNode();