Skip to content

Commit 7e52fb5

Browse files
committed
fix: fix accounting tests
1 parent 143ceda commit 7e52fb5

File tree

3 files changed

+13
-576
lines changed

3 files changed

+13
-576
lines changed

test/0.8.25/Accounting.t.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ contract AccountingHandler is CommonBase, StdCheats, StdUtils {
247247
withdrawalVaultBalance: 0,
248248
sharesRequestedToBurn: 0,
249249
withdrawalFinalizationBatches: new uint256[](0),
250-
vaultValues: new uint256[](0),
251-
inOutDeltas: new int256[](0)
250+
vaultsTotalDeficit: 0
252251
});
253252

254253
ghost.unifiedClBalanceWei = int256(fuzz._clBalanceWei + currentReport.withdrawalVaultBalance); // ?

test/0.8.25/Protocol__Deployment.t.sol

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import {LidoLocator} from "contracts/0.8.9/LidoLocator.sol";
1414
import {LimitsList} from "contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol";
1515

1616
import {StakingRouter__MockForLidoAccountingFuzzing} from "./contracts/StakingRouter__MockForLidoAccountingFuzzing.sol";
17-
import {SecondOpinionOracle__MockForAccountingFuzzing} from "./contracts/SecondOpinionOracle__MockForAccountingFuzzing.sol";
17+
import {
18+
SecondOpinionOracle__MockForAccountingFuzzing
19+
} from "./contracts/SecondOpinionOracle__MockForAccountingFuzzing.sol";
1820
import {WithdrawalQueue, IWstETH} from "../../contracts/0.8.9/WithdrawalQueue.sol";
1921
import {WithdrawalQueueERC721} from "../../contracts/0.8.9/WithdrawalQueueERC721.sol";
2022

@@ -265,7 +267,7 @@ contract BaseProtocolTest is Test {
265267
// Deploy AccountingOracle
266268
deployCodeTo(
267269
"AccountingOracle.sol:AccountingOracle",
268-
abi.encode(address(lidoLocator), lidoLocator.legacyOracle(), 12, genesisTimestamp),
270+
abi.encode(address(lidoLocator), 12, genesisTimestamp),
269271
lidoLocator.accountingOracle()
270272
);
271273

@@ -296,6 +298,8 @@ contract BaseProtocolTest is Test {
296298
"OracleReportSanityChecker.sol:OracleReportSanityChecker",
297299
abi.encode(
298300
address(lidoLocator),
301+
lidoLocator.accountingOracle(),
302+
lidoLocator.accounting(),
299303
rootAccount,
300304
[
301305
limitList.exitedValidatorsPerDayLimit,
@@ -394,7 +398,6 @@ contract BaseProtocolTest is Test {
394398
accountingOracle: makeAddr("dummy-locator:accountingOracle"),
395399
depositSecurityModule: makeAddr("dummy-locator:depositSecurityModule"),
396400
elRewardsVault: makeAddr("dummy-locator:elRewardsVault"),
397-
legacyOracle: makeAddr("dummy-locator:legacyOracle"),
398401
lido: lido,
399402
oracleReportSanityChecker: makeAddr("dummy-locator:oracleReportSanityChecker"),
400403
postTokenRebaseReceiver: address(0),
@@ -408,7 +411,12 @@ contract BaseProtocolTest is Test {
408411
accounting: makeAddr("dummy-locator:accounting"),
409412
predepositGuarantee: makeAddr("dummy-locator:predeposit_guarantee"),
410413
wstETH: wstETHAdr,
411-
vaultHub: makeAddr("dummy-locator:vaultHub")
414+
vaultHub: makeAddr("dummy-locator:vaultHub"),
415+
lazyOracle: makeAddr("dummy-locator:lazyOracle"),
416+
operatorGrid: makeAddr("dummy-locator:operatorGrid"),
417+
validatorExitDelayVerifier: makeAddr("dummy-locator:validatorExitDelayVerifier"),
418+
triggerableWithdrawalsGateway: makeAddr("dummy-locator:triggerableWithdrawalsGateway"),
419+
vaultFactory: makeAddr("dummy-locator:vaultFactory")
412420
});
413421

414422
return LidoLocator(deployCode("LidoLocator.sol:LidoLocator", abi.encode(config)));

0 commit comments

Comments
 (0)