Skip to content

test: disconnected vault integration tests #1032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: feat/vaults
Choose a base branch
from

Conversation

tamtamchik
Copy link
Member

No description provided.

Copy link

github-actions bot commented Apr 15, 2025

badge

Hardhat Unit Tests Coverage Summary

Filename                                                                Stmts    Miss  Cover    Missing
--------------------------------------------------------------------  -------  ------  -------  -------------------------------------------------------
contracts/0.4.24/Lido.sol                                                 204       5  97.55%   802-814, 955-956
contracts/0.4.24/StETH.sol                                                 79       0  100.00%
contracts/0.4.24/StETHPermit.sol                                           15       0  100.00%
contracts/0.4.24/lib/Packed64x4.sol                                         5       0  100.00%
contracts/0.4.24/lib/SigningKeys.sol                                       36       0  100.00%
contracts/0.4.24/lib/StakeLimitUtils.sol                                   37       0  100.00%
contracts/0.4.24/nos/NodeOperatorsRegistry.sol                            512       0  100.00%
contracts/0.4.24/utils/Pausable.sol                                         9       0  100.00%
contracts/0.4.24/utils/Versioned.sol                                        5       0  100.00%
contracts/0.6.12/WstETH.sol                                                17       0  100.00%
contracts/0.8.25/Accounting.sol                                            82       1  98.78%   321
contracts/0.8.25/interfaces/IDepositContract.sol                            0       0  100.00%
contracts/0.8.25/interfaces/ILido.sol                                       0       0  100.00%
contracts/0.8.25/interfaces/IOracleReportSanityChecker.sol                  0       0  100.00%
contracts/0.8.25/interfaces/IPostTokenRebaseReceiver.sol                    0       0  100.00%
contracts/0.8.25/interfaces/IStakingRouter.sol                              0       0  100.00%
contracts/0.8.25/interfaces/IWithdrawalQueue.sol                            0       0  100.00%
contracts/0.8.25/lib/BLS.sol                                               27       3  88.89%   275, 342, 369
contracts/0.8.25/lib/BeaconTypes.sol                                        0       0  100.00%
contracts/0.8.25/lib/GIndex.sol                                            33      18  45.45%   23, 35, 56, 64-71, 80, 87-102
contracts/0.8.25/lib/SSZ.sol                                               21       7  66.67%   62-164, 354
contracts/0.8.25/utils/AccessControlConfirmable.sol                        30       0  100.00%
contracts/0.8.25/utils/PausableUntilWithRoles.sol                           3       0  100.00%
contracts/0.8.25/vaults/OperatorGrid.sol                                  135       0  100.00%
contracts/0.8.25/vaults/PinnedBeaconProxy.sol                               5       0  100.00%
contracts/0.8.25/vaults/StakingVault.sol                                  164       2  98.78%   659-660
contracts/0.8.25/vaults/VaultFactory.sol                                   25       4  84.00%   92-97
contracts/0.8.25/vaults/VaultHub.sol                                      203      23  88.67%   138, 326, 329, 331, 383-401, 464, 471, 507-509, 634-635
contracts/0.8.25/vaults/dashboard/Dashboard.sol                           105      24  77.14%   231, 335-371, 399-400, 518, 568-574
contracts/0.8.25/vaults/dashboard/NodeOperatorFee.sol                      41       0  100.00%
contracts/0.8.25/vaults/dashboard/Permissions.sol                          46       6  86.96%   345-358, 410
contracts/0.8.25/vaults/interfaces/IPredepositGuarantee.sol                 0       0  100.00%
contracts/0.8.25/vaults/interfaces/IStakingVault.sol                        0       0  100.00%
contracts/0.8.25/vaults/lib/PinnedBeaconUtils.sol                           6       0  100.00%
contracts/0.8.25/vaults/predeposit_guarantee/CLProofVerifier.sol           11       0  100.00%
contracts/0.8.25/vaults/predeposit_guarantee/PredepositGuarantee.sol      151       0  100.00%
contracts/0.8.4/WithdrawalsManagerProxy.sol                                61       0  100.00%
contracts/0.8.9/BeaconChainDepositor.sol                                   21       2  90.48%   48, 51
contracts/0.8.9/Burner.sol                                                 72       0  100.00%
contracts/0.8.9/DepositSecurityModule.sol                                 128       0  100.00%
contracts/0.8.9/EIP712StETH.sol                                            16       0  100.00%
contracts/0.8.9/LidoExecutionLayerRewardsVault.sol                         16       0  100.00%
contracts/0.8.9/LidoLocator.sol                                            22       0  100.00%
contracts/0.8.9/OracleDaemonConfig.sol                                     28       0  100.00%
contracts/0.8.9/StakingRouter.sol                                         316       0  100.00%
contracts/0.8.9/WithdrawalQueue.sol                                        88       0  100.00%
contracts/0.8.9/WithdrawalQueueBase.sol                                   146       0  100.00%
contracts/0.8.9/WithdrawalQueueERC721.sol                                  89       0  100.00%
contracts/0.8.9/WithdrawalVault.sol                                        21       0  100.00%
contracts/0.8.9/lib/Math.sol                                                4       0  100.00%
contracts/0.8.9/lib/PositiveTokenRebaseLimiter.sol                         22       0  100.00%
contracts/0.8.9/lib/UnstructuredRefStorage.sol                              2       0  100.00%
contracts/0.8.9/oracle/AccountingOracle.sol                               172       2  98.84%   127-128
contracts/0.8.9/oracle/BaseOracle.sol                                      89       1  98.88%   397
contracts/0.8.9/oracle/HashConsensus.sol                                  263       1  99.62%   1005
contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol                         91       2  97.80%   138, 315
contracts/0.8.9/proxy/OssifiableProxy.sol                                  17       0  100.00%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol               217       1  99.54%   856
contracts/0.8.9/utils/DummyEmptyContract.sol                                0       0  100.00%
contracts/0.8.9/utils/PausableUntil.sol                                    31       0  100.00%
contracts/0.8.9/utils/Versioned.sol                                        11       0  100.00%
contracts/0.8.9/utils/access/AccessControl.sol                             23       0  100.00%
contracts/0.8.9/utils/access/AccessControlEnumerable.sol                    9       0  100.00%
contracts/common/utils/PausableUntil.sol                                   29       0  100.00%
contracts/testnets/sepolia/SepoliaDepositAdapter.sol                       21      21  0.00%    49-100
TOTAL                                                                    4032     123  96.95%

Diff against master

Filename                                                                Stmts    Miss  Cover
--------------------------------------------------------------------  -------  ------  --------
contracts/0.4.24/Lido.sol                                                  -8      +5  -2.45%
contracts/0.4.24/StETH.sol                                                 +7       0  +100.00%
contracts/0.8.25/Accounting.sol                                           +82      +1  +98.78%
contracts/0.8.25/interfaces/IDepositContract.sol                            0       0  +100.00%
contracts/0.8.25/interfaces/ILido.sol                                       0       0  +100.00%
contracts/0.8.25/interfaces/IOracleReportSanityChecker.sol                  0       0  +100.00%
contracts/0.8.25/interfaces/IPostTokenRebaseReceiver.sol                    0       0  +100.00%
contracts/0.8.25/interfaces/IStakingRouter.sol                              0       0  +100.00%
contracts/0.8.25/interfaces/IWithdrawalQueue.sol                            0       0  +100.00%
contracts/0.8.25/lib/BLS.sol                                              +27      +3  +88.89%
contracts/0.8.25/lib/BeaconTypes.sol                                        0       0  +100.00%
contracts/0.8.25/lib/GIndex.sol                                           +33     +18  +45.45%
contracts/0.8.25/lib/SSZ.sol                                              +21      +7  +66.67%
contracts/0.8.25/utils/AccessControlConfirmable.sol                       +30       0  +100.00%
contracts/0.8.25/utils/PausableUntilWithRoles.sol                          +3       0  +100.00%
contracts/0.8.25/vaults/OperatorGrid.sol                                 +135       0  +100.00%
contracts/0.8.25/vaults/PinnedBeaconProxy.sol                              +5       0  +100.00%
contracts/0.8.25/vaults/StakingVault.sol                                 +164      +2  +98.78%
contracts/0.8.25/vaults/VaultFactory.sol                                  +25      +4  +84.00%
contracts/0.8.25/vaults/VaultHub.sol                                     +203     +23  +88.67%
contracts/0.8.25/vaults/dashboard/Dashboard.sol                          +105     +24  +77.14%
contracts/0.8.25/vaults/dashboard/NodeOperatorFee.sol                     +41       0  +100.00%
contracts/0.8.25/vaults/dashboard/Permissions.sol                         +46      +6  +86.96%
contracts/0.8.25/vaults/interfaces/IPredepositGuarantee.sol                 0       0  +100.00%
contracts/0.8.25/vaults/interfaces/IStakingVault.sol                        0       0  +100.00%
contracts/0.8.25/vaults/lib/PinnedBeaconUtils.sol                          +6       0  +100.00%
contracts/0.8.25/vaults/predeposit_guarantee/CLProofVerifier.sol          +11       0  +100.00%
contracts/0.8.25/vaults/predeposit_guarantee/PredepositGuarantee.sol     +151       0  +100.00%
contracts/0.8.9/Burner.sol                                                 +1       0  +100.00%
contracts/0.8.9/LidoLocator.sol                                            +4       0  +100.00%
contracts/0.8.9/oracle/AccountingOracle.sol                               -18       0  -0.11%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol               -15      +1  -0.46%
contracts/common/utils/PausableUntil.sol                                  +29       0  +100.00%
TOTAL                                                                   +1088     +94  -2.09%

Results for commit: 773f9be

Minimum allowed coverage is 90%

♻️ This comment has been updated with latest results

@tamtamchik tamtamchik added tests When it comes to testing the code vaults labels Apr 15, 2025

it.skip("Can deauthorize Lido VaultHub if dicsconnected from Hub", async () => {
await disconnectFromHub(ctx, stakingVault);
// todo: need to call something to actually disconnect the socket, but did not find, what to call

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamtamchik pls pay attention

.withArgs(delegation, stranger, 10n);
});

// todo: could not fid out how to send reward in a way it would be withdrawable

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tamtamchik pls pay attention

@cakeinpanic cakeinpanic force-pushed the feature/we-1958-write-integration-contract-tests-for-funding-withdrawing branch from 129b4e7 to 5954d83 Compare April 17, 2025 13:27
@cakeinpanic cakeinpanic force-pushed the feature/we-1958-write-integration-contract-tests-for-funding-withdrawing branch from 27259af to 773f9be Compare April 24, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests When it comes to testing the code vaults
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants