lidofinance / core

Lido DAO smart contracts
https://lido.fi
GNU General Public License v3.0
382 stars 194 forks source link

test: Second opinion oracle test #857

Closed tamtamchik closed 1 month ago

tamtamchik commented 1 month ago

Port of https://github.com/lidofinance/core/pull/211

github-actions[bot] commented 1 month ago

badge

Hardhat Unit Tests Coverage Summary

``` Filename Stmts Miss Cover Missing ----------------------------------------------------------- ------- ------ ------- --------- contracts/0.4.24/Lido.sol 212 0 100.00% contracts/0.4.24/StETH.sol 72 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 485 0 100.00% contracts/0.4.24/oracle/LegacyOracle.sol 72 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.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 71 0 100.00% contracts/0.8.9/DepositSecurityModule.sol 104 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 18 0 100.00% contracts/0.8.9/OracleDaemonConfig.sol 28 0 100.00% contracts/0.8.9/StakingRouter.sol 303 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/SafeCastExt.sol 3 1 66.67% 26 contracts/0.8.9/lib/UnstructuredRefStorage.sol 2 0 100.00% contracts/0.8.9/oracle/AccountingOracle.sol 171 1 99.42% 723 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 91 0.00% 96-461 contracts/0.8.9/proxy/OssifiableProxy.sol 17 0 100.00% contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol 225 0 100.00% 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/testnets/sepolia/SepoliaDepositAdapter.sol 21 21 0.00% 49-100 TOTAL 2929 118 95.97% ```

Diff against master

Filename                                                       Stmts    Miss  Cover
-----------------------------------------------------------  -------  ------  --------
contracts/0.8.9/lib/SafeCastExt.sol                               +3      +1  +66.67%
contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol      +54       0  +100.00%
TOTAL                                                            +57      +1  +0.04%

Results for commit: 5888b1c504bbdc9968fd91ca3851262b46579623

Minimum allowed coverage is 95%

:recycle: This comment has been updated with latest results

vp4242 commented 1 month ago

Seems that the reason for failed tests that PostTotalShares event is no longer emitted after LegacyOracle deprecation.