Skip to content

Commit

Permalink
test(integration): fix scratch deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Nov 26, 2024
1 parent 7943917 commit 1eafcbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions contracts/0.8.9/sanity_checks/OracleReportSanityChecker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ contract OracleReportSanityChecker is AccessControlEnumerable {
ILidoLocator private immutable LIDO_LOCATOR;
uint256 private immutable GENESIS_TIME;
uint256 private immutable SECONDS_PER_SLOT;
address private immutable LIDO_ADDRESS;
address private immutable ACCOUNTING_ADDRESS;

LimitsListPacked private _limits;

Expand All @@ -183,7 +183,7 @@ contract OracleReportSanityChecker is AccessControlEnumerable {
address accountingOracle = LIDO_LOCATOR.accountingOracle();
GENESIS_TIME = IBaseOracle(accountingOracle).GENESIS_TIME();
SECONDS_PER_SLOT = IBaseOracle(accountingOracle).SECONDS_PER_SLOT();
LIDO_ADDRESS = LIDO_LOCATOR.lido();
ACCOUNTING_ADDRESS = LIDO_LOCATOR.accounting();

_updateLimits(_limitsList);

Expand Down Expand Up @@ -466,8 +466,8 @@ contract OracleReportSanityChecker is AccessControlEnumerable {
uint256 _preCLValidators,
uint256 _postCLValidators
) external {
if (msg.sender != LIDO_ADDRESS) {
revert CalledNotFromLido();
if (msg.sender != ACCOUNTING_ADDRESS) {
revert CalledNotFromAccounting();
}
LimitsList memory limitsList = _limits.unpack();
uint256 refSlot = IBaseOracle(LIDO_LOCATOR.accountingOracle()).getLastProcessingRefSlot();
Expand Down Expand Up @@ -837,7 +837,7 @@ contract OracleReportSanityChecker is AccessControlEnumerable {
error NegativeRebaseFailedCLBalanceMismatch(uint256 reportedValue, uint256 provedValue, uint256 limitBP);
error NegativeRebaseFailedWithdrawalVaultBalanceMismatch(uint256 reportedValue, uint256 provedValue);
error NegativeRebaseFailedSecondOpinionReportIsNotReady();
error CalledNotFromLido();
error CalledNotFromAccounting();
}

library LimitsListPacker {
Expand Down
1 change: 1 addition & 0 deletions lib/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ async function getLocatorConfig(locatorAddress: string) {
"withdrawalQueue",
"withdrawalVault",
"oracleDaemonConfig",
"accounting",
] as (keyof LidoLocator.ConfigStruct)[];

const configPromises = addresses.map((name) => locator[name]());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export async function main() {
sanityChecks.exitedValidatorsPerDayLimit,
sanityChecks.appearedValidatorsPerDayLimit,
sanityChecks.annualBalanceIncreaseBPLimit,
sanityChecks.simulatedShareRateDeviationBPLimit,
sanityChecks.maxValidatorExitRequestsPerReport,
sanityChecks.maxItemsPerExtraDataTransaction,
sanityChecks.maxNodeOperatorsPerExtraDataItem,
Expand Down

0 comments on commit 1eafcbe

Please sign in to comment.