|
5 | 5 |
|
6 | 6 | LidoLocator is the universal address book for the Lido protocol.
|
7 | 7 | It follows the well-known [service locator](https://en.wikipedia.org/wiki/Service_locator_pattern) pattern.
|
| 8 | + |
| 9 | +## Upgradability |
| 10 | + |
| 11 | +The contract uses [OssifiableProxy](./ossifiable-proxy.md) for upgradability and |
| 12 | +does not use storage for the address book. Instead, all addresses are embedded into |
| 13 | +the implementation's bytecode as immutables for gas efficiency, allowing one to |
| 14 | +update them along with a proxy implementation. |
| 15 | + |
| 16 | +## Methods |
| 17 | + |
| 18 | +### accountingOracle() |
| 19 | + |
| 20 | +Returns an address of the [AccountingOracle contract](./accounting-oracle.md) |
| 21 | + |
| 22 | +```sol |
| 23 | +function accountingOracle() view returns(address); |
| 24 | +``` |
| 25 | + |
| 26 | +### depositSecurityModule() |
| 27 | + |
| 28 | +Returns an address of the [DepositSecurityModule contract](./deposit-security-module.md) |
| 29 | + |
| 30 | +```sol |
| 31 | +function depositSecurityModule() view returns(address) |
| 32 | +``` |
| 33 | + |
| 34 | +### elRewardsVault() |
| 35 | + |
| 36 | +Returns an address of the [LidoExecutionLayerRewardsVault contract](./lido-execution-layer-rewards-vault.md) |
| 37 | + |
| 38 | +```sol |
| 39 | +function elRewardsVault() view returns(address) |
| 40 | +``` |
| 41 | + |
| 42 | +### legacyOracle() |
| 43 | + |
| 44 | +Returns an address of the [LegacyOracle contract](./legacy-oracle.md) |
| 45 | + |
| 46 | +```sol |
| 47 | +function legacyOracle() external view returns(address) |
| 48 | +``` |
| 49 | + |
| 50 | +### lido() |
| 51 | + |
| 52 | +Returns an address of the [Lido contract](./lido.md) |
| 53 | + |
| 54 | +```sol |
| 55 | +function lido() external view returns(address) |
| 56 | +``` |
| 57 | + |
| 58 | +### oracleReportSanityChecker() |
| 59 | + |
| 60 | +Returns an address of the [OracleReportSanityChecker contract](./oracle-report-sanity-checker.md) |
| 61 | + |
| 62 | +```sol |
| 63 | +function oracleReportSanityChecker() view returns(address) |
| 64 | +``` |
| 65 | + |
| 66 | +### burner() |
| 67 | + |
| 68 | +Returns an address of the [Burner contract](./burner.md) |
| 69 | + |
| 70 | +```sol |
| 71 | +function burner() view returns(address) |
| 72 | +``` |
| 73 | + |
| 74 | +### stakingRouter() |
| 75 | + |
| 76 | +Returns an address of the [StakingRouter contract](./staking-router.md) |
| 77 | + |
| 78 | +```sol |
| 79 | +function stakingRouter() view returns(address) |
| 80 | +``` |
| 81 | + |
| 82 | +### treasury() |
| 83 | + |
| 84 | +Returns an address of the treasury |
| 85 | + |
| 86 | +```sol |
| 87 | +function treasury() view returns(address) |
| 88 | +``` |
| 89 | + |
| 90 | +### validatorsExitBusOracle() |
| 91 | + |
| 92 | +Returns an address of the [ValidatorsExitBusOracle contract](./validators-exit-bus-oracle.md) |
| 93 | + |
| 94 | +```sol |
| 95 | +function validatorsExitBusOracle() external view returns(address) |
| 96 | +``` |
| 97 | + |
| 98 | +### withdrawalQueue() |
| 99 | + |
| 100 | +Returns an address of the [WithdrawalQueueERC721 contract](./withdrawal-queue-erc721.md) |
| 101 | + |
| 102 | +```sol |
| 103 | +function withdrawalQueue() view returns(address) |
| 104 | +``` |
| 105 | + |
| 106 | +### withdrawalVault() |
| 107 | + |
| 108 | +Returns an address of the [WithdrawalVault contract](./withdrawal-vault.md) |
| 109 | + |
| 110 | +```sol |
| 111 | +function withdrawalVault() view returns(address) |
| 112 | +``` |
| 113 | + |
| 114 | +### postTokenRebaseReceiver() |
| 115 | + |
| 116 | +Returns an address of the contract following the [`IPostTokenRebaseReceiver`](https://github.com/lidofinance/lido-dao/blob/cadffa46a2b8ed6cfa1127fca2468bae1a82d6bf/contracts/0.4.24/Lido.sol#L20-L30) interface described inside `Lido`. |
| 117 | +Right now it returns the [LegacyOracle](./legacy-oracle.md) address. |
| 118 | + |
| 119 | +```sol |
| 120 | +function postTokenRebaseReceiver() view returns(address); |
| 121 | +``` |
| 122 | + |
| 123 | +### oracleDaemonConfig() |
| 124 | + |
| 125 | +Returns an address of the [OracleDaemonConfig contract](./oracle-daemon-config.md) |
| 126 | + |
| 127 | +```sol |
| 128 | +function oracleDaemonConfig() view returns(address) |
| 129 | +``` |
| 130 | + |
| 131 | +### coreComponents() |
| 132 | + |
| 133 | +Returns a batch of core components addresses at once. |
| 134 | + |
| 135 | +It's just a more gas-efficient way of calling several public getters at once. |
| 136 | + |
| 137 | +```sol |
| 138 | +function coreComponents() view returns( |
| 139 | + address elRewardsVault, |
| 140 | + address oracleReportSanityChecker, |
| 141 | + address stakingRouter, |
| 142 | + address treasury, |
| 143 | + address withdrawalQueue, |
| 144 | + address withdrawalVault |
| 145 | +) |
| 146 | +``` |
| 147 | + |
| 148 | +### oracleReportComponentsForLido() |
| 149 | + |
| 150 | +Returns a batch of addresses that is used specifically during oracle report |
| 151 | +handling in the Lido contract. |
| 152 | + |
| 153 | +It's just a more gas-efficient way of calling several public getters at once. |
| 154 | + |
| 155 | +```sol |
| 156 | +function oracleReportComponentsForLido() view returns( |
| 157 | + address accountingOracle, |
| 158 | + address elRewardsVault, |
| 159 | + address oracleReportSanityChecker, |
| 160 | + address burner, |
| 161 | + address withdrawalQueue, |
| 162 | + address withdrawalVault, |
| 163 | + address postTokenRebaseReceiver |
| 164 | +) |
| 165 | +``` |
0 commit comments