Skip to content
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

Fix accounting tests for vaults #912

Merged
merged 27 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2250aa6
test: add accounting and sanity checker deployment
vp4242 Dec 30, 2024
266a990
feat: proper Accounting initialization
vp4242 Dec 30, 2024
20e62c7
test: add PostTokenRebaseReceiver
vp4242 Dec 30, 2024
595eab2
test: fix imports
vp4242 Dec 30, 2024
03733b3
fix: linter
tamtamchik Jan 3, 2025
8dd7534
chore: fix husky setup
tamtamchik Jan 3, 2025
432aab2
feat: impersonate caller instead of locator update
vp4242 Jan 8, 2025
df01272
chore: add import
vp4242 Jan 8, 2025
6ddda8a
test: add withdrawal queue related tests
vp4242 Jan 9, 2025
c17ab6c
test: add more
vp4242 Jan 9, 2025
e9afa5d
test: fix mocks
vp4242 Jan 10, 2025
050bd27
test: enable all relevant tests
vp4242 Jan 10, 2025
d456680
chore: split tests according to contracts
vp4242 Jan 10, 2025
a3ae0b1
chore: remove unused mock
vp4242 Jan 14, 2025
2ad9d7c
chore: remove unused mock
vp4242 Jan 15, 2025
661af1f
test: remove accounting and locator from lido test
vp4242 Jan 15, 2025
36fbd1c
test: add mocks
vp4242 Jan 15, 2025
212161e
test: remove cohesion of lido and accounting
vp4242 Jan 15, 2025
43482eb
test: port some tests back to Lido contact tests
vp4242 Jan 15, 2025
5d3b2ff
test: fix mint accounting tests
vp4242 Jan 16, 2025
e10f796
test: fix import
vp4242 Jan 16, 2025
b7fdc32
test: remove unused mocks
vp4242 Jan 16, 2025
633d6ba
test: rename mock event
vp4242 Jan 16, 2025
edb0215
test: move mock to newer solidity version to allow custom errors
vp4242 Jan 16, 2025
88168ef
test: add custom errors check
vp4242 Jan 16, 2025
3af7f9b
test: check actual reporting
vp4242 Jan 16, 2025
ade6c03
test: fix the reporting test case
vp4242 Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"typecheck": "tsc --noEmit",
"prepare": "husky",
"abis:extract": "hardhat abis:extract",
"verify:deployed": "hardhat verify:deployed"
"verify:deployed": "hardhat verify:deployed",
"postinstall": "husky"
},
"lint-staged": {
"./**/*.ts": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pragma solidity 0.4.24;
contract OracleReportSanityChecker__MockForAccounting {
bool private checkAccountingOracleReportReverts;
bool private checkWithdrawalQueueOracleReportReverts;
bool private checkSimulatedShareRateReverts;

uint256 private _withdrawals;
uint256 private _elRewards;
Expand Down Expand Up @@ -54,16 +53,6 @@ contract OracleReportSanityChecker__MockForAccounting {
sharesToBurn = _sharesToBurn;
}

function checkSimulatedShareRate(
uint256 _postTotalPooledEther,
uint256 _postTotalShares,
uint256 _etherLockedOnWithdrawalQueue,
uint256 _sharesBurntDueToWithdrawals,
uint256 _simulatedShareRate
) external view {
if (checkSimulatedShareRateReverts) revert();
}

// mocking

function mock__checkAccountingOracleReportReverts(bool reverts) external {
Expand All @@ -74,10 +63,6 @@ contract OracleReportSanityChecker__MockForAccounting {
checkWithdrawalQueueOracleReportReverts = reverts;
}

function mock__checkSimulatedShareRateReverts(bool reverts) external {
checkSimulatedShareRateReverts = reverts;
}

function mock__smoothenTokenRebaseReturn(
uint256 withdrawals,
uint256 elRewards,
Expand Down
Loading