diff --git a/contracts/libraries/AssetsAccounting.sol b/contracts/libraries/AssetsAccounting.sol index f706a6ea..84c1ba53 100644 --- a/contracts/libraries/AssetsAccounting.sol +++ b/contracts/libraries/AssetsAccounting.sol @@ -341,19 +341,6 @@ library AssetsAccounting { emit UnstETHWithdrawn(unstETHIds, amountWithdrawn); } - // --- - // Getters - // --- - - function getLockedAssetsTotals(Context storage self) - internal - view - returns (SharesValue unfinalizedShares, ETHValue finalizedETH) - { - finalizedETH = self.unstETHTotals.finalizedETH; - unfinalizedShares = self.stETHTotals.lockedShares + self.unstETHTotals.unfinalizedShares; - } - // --- // Checks // --- diff --git a/test/unit/libraries/AssetsAccounting.t.sol b/test/unit/libraries/AssetsAccounting.t.sol index 88dd8f52..7fce5dae 100644 --- a/test/unit/libraries/AssetsAccounting.t.sol +++ b/test/unit/libraries/AssetsAccounting.t.sol @@ -1419,42 +1419,6 @@ contract AssetsAccountingUnitTests is UnitTest { AssetsAccounting.accountUnstETHWithdraw(_accountingContext, holder, unstETHIds); } - // --- - // getLockedAssetsTotals - // --- - - function testFuzz_getLockedAssetsTotals_happyPath( - ETHValue totalFinalizedETH, - SharesValue totalLockedShares, - SharesValue totalUnfinalizedShares - ) external { - vm.assume(totalFinalizedETH.toUint256() < type(uint96).max); - vm.assume(totalLockedShares.toUint256() < type(uint96).max); - vm.assume(totalUnfinalizedShares.toUint256() < type(uint96).max); - _accountingContext.unstETHTotals.finalizedETH = totalFinalizedETH; - _accountingContext.unstETHTotals.unfinalizedShares = totalUnfinalizedShares; - _accountingContext.stETHTotals.lockedShares = totalLockedShares; - - (SharesValue unfinalizedShares, ETHValue finalizedETH) = - AssetsAccounting.getLockedAssetsTotals(_accountingContext); - - assertEq(unfinalizedShares, totalLockedShares + totalUnfinalizedShares); - assertEq(finalizedETH, totalFinalizedETH); - } - - function test_getLockedAssetsTotals_RevertOn_UnfinalizedSharesOverflow() external { - ETHValue totalFinalizedETH = ETHValues.from(1); - SharesValue totalUnfinalizedShares = SharesValues.from(type(uint128).max - 1); - SharesValue totalLockedShares = SharesValues.from(type(uint128).max - 1); - - _accountingContext.unstETHTotals.finalizedETH = totalFinalizedETH; - _accountingContext.unstETHTotals.unfinalizedShares = totalUnfinalizedShares; - _accountingContext.stETHTotals.lockedShares = totalLockedShares; - - vm.expectRevert(SharesValueOverflow.selector); - AssetsAccounting.getLockedAssetsTotals(_accountingContext); - } - // --- // checkMinAssetsLockDurationPassed // ---