diff --git a/contracts/0.8.9/LidoLocator.sol b/contracts/0.8.9/LidoLocator.sol index 87f802384..982d7c491 100644 --- a/contracts/0.8.9/LidoLocator.sol +++ b/contracts/0.8.9/LidoLocator.sol @@ -29,6 +29,7 @@ contract LidoLocator is ILidoLocator { address withdrawalVault; address oracleDaemonConfig; address accounting; + address wstETH; } error ZeroAddress(); @@ -48,6 +49,7 @@ contract LidoLocator is ILidoLocator { address public immutable withdrawalVault; address public immutable oracleDaemonConfig; address public immutable accounting; + address public immutable wstETH; /** * @notice declare service locations @@ -70,6 +72,7 @@ contract LidoLocator is ILidoLocator { withdrawalVault = _assertNonZero(_config.withdrawalVault); oracleDaemonConfig = _assertNonZero(_config.oracleDaemonConfig); accounting = _assertNonZero(_config.accounting); + wstETH = _assertNonZero(_config.wstETH); } function coreComponents() external view returns( diff --git a/contracts/common/interfaces/ILidoLocator.sol b/contracts/common/interfaces/ILidoLocator.sol index 1db48e93e..c39db1e23 100644 --- a/contracts/common/interfaces/ILidoLocator.sol +++ b/contracts/common/interfaces/ILidoLocator.sol @@ -21,6 +21,10 @@ interface ILidoLocator { function postTokenRebaseReceiver() external view returns(address); function oracleDaemonConfig() external view returns(address); function accounting() external view returns (address); + function wstETH() external view returns (address); + + /// @notice Returns core Lido protocol component addresses in a single call + /// @dev This function provides a gas-efficient way to fetch multiple component addresses in a single call function coreComponents() external view returns( address elRewardsVault, address oracleReportSanityChecker, @@ -29,6 +33,9 @@ interface ILidoLocator { address withdrawalQueue, address withdrawalVault ); + + /// @notice Returns addresses of components involved in processing oracle reports in the Lido contract + /// @dev This function provides a gas-efficient way to fetch multiple component addresses in a single call function oracleReportComponents() external view returns( address accountingOracle, address oracleReportSanityChecker, diff --git a/lib/protocol/networks.ts b/lib/protocol/networks.ts index 130035d27..404a51a83 100644 --- a/lib/protocol/networks.ts +++ b/lib/protocol/networks.ts @@ -58,6 +58,7 @@ const defaultEnv = { withdrawalQueue: "WITHDRAWAL_QUEUE_ADDRESS", withdrawalVault: "WITHDRAWAL_VAULT_ADDRESS", oracleDaemonConfig: "ORACLE_DAEMON_CONFIG_ADDRESS", + wstETH: "WSTETH_ADDRESS", // aragon contracts kernel: "ARAGON_KERNEL_ADDRESS", acl: "ARAGON_ACL_ADDRESS", diff --git a/scripts/scratch/steps/0090-deploy-non-aragon-contracts.ts b/scripts/scratch/steps/0090-deploy-non-aragon-contracts.ts index 4f7d15bb5..9974f81ac 100644 --- a/scripts/scratch/steps/0090-deploy-non-aragon-contracts.ts +++ b/scripts/scratch/steps/0090-deploy-non-aragon-contracts.ts @@ -210,6 +210,7 @@ export async function main() { withdrawalVaultAddress, oracleDaemonConfig.address, accounting.address, + wstETH.address, ]; await updateProxyImplementation(Sk.lidoLocator, "LidoLocator", locator.address, proxyContractsOwner, [locatorConfig]); } diff --git a/test/0.8.9/contracts/LidoLocator__MockForSanityChecker.sol b/test/0.8.9/contracts/LidoLocator__MockForSanityChecker.sol index ead50dc46..0dd43fe02 100644 --- a/test/0.8.9/contracts/LidoLocator__MockForSanityChecker.sol +++ b/test/0.8.9/contracts/LidoLocator__MockForSanityChecker.sol @@ -23,6 +23,7 @@ contract LidoLocator__MockForSanityChecker is ILidoLocator { address postTokenRebaseReceiver; address oracleDaemonConfig; address accounting; + address wstETH; } address public immutable lido; @@ -40,6 +41,7 @@ contract LidoLocator__MockForSanityChecker is ILidoLocator { address public immutable postTokenRebaseReceiver; address public immutable oracleDaemonConfig; address public immutable accounting; + address public immutable wstETH; constructor ( ContractAddresses memory addresses @@ -59,6 +61,7 @@ contract LidoLocator__MockForSanityChecker is ILidoLocator { postTokenRebaseReceiver = addresses.postTokenRebaseReceiver; oracleDaemonConfig = addresses.oracleDaemonConfig; accounting = addresses.accounting; + wstETH = addresses.wstETH; } function coreComponents() external view returns (address, address, address, address, address, address) { diff --git a/test/0.8.9/lidoLocator.test.ts b/test/0.8.9/lidoLocator.test.ts index 08bc59bda..72a2347e3 100644 --- a/test/0.8.9/lidoLocator.test.ts +++ b/test/0.8.9/lidoLocator.test.ts @@ -21,6 +21,7 @@ const services = [ "withdrawalVault", "oracleDaemonConfig", "accounting", + "wstETH", ] as const; type Service = ArrayToUnion; diff --git a/test/deploy/locator.ts b/test/deploy/locator.ts index b87a338f9..e41e54111 100644 --- a/test/deploy/locator.ts +++ b/test/deploy/locator.ts @@ -29,6 +29,7 @@ async function deployDummyLocator(config?: Partial, de withdrawalQueue: certainAddress("dummy-locator:withdrawalQueue"), withdrawalVault: certainAddress("dummy-locator:withdrawalVault"), accounting: certainAddress("dummy-locator:withdrawalVault"), + wstETH: certainAddress("dummy-locator:wstETH"), ...config, }); @@ -104,6 +105,7 @@ async function getLocatorConfig(locatorAddress: string) { "withdrawalVault", "oracleDaemonConfig", "accounting", + "wstETH", ] as Partial[]; const configPromises = addresses.map((name) => locator[name]());