Skip to content

Commit

Permalink
Merge pull request #218 from lidofinance/feat/sync-lido-dao
Browse files Browse the repository at this point in the history
chore: updates from the lido-dao main branch
  • Loading branch information
tamtamchik authored Sep 24, 2024
2 parents f8e3c67 + e4a6ae4 commit 55164f8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
22 changes: 10 additions & 12 deletions contracts/COMPILERS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# Why we use different compilers
# Compiler Versions Used in Lido Project

For Lido project coordination, governance and funds management we use [Aragon](https://aragon.org/dao), a well-developed and proven DAO Framework. The current stable release of its Kernel, [4.4.0](https://github.com/aragon/aragonOS/tree/v4.4.0) is fixed on the specific compiler version - [solc 0.4.24](https://solidity.readthedocs.io/en/v0.4.24/), that is currently outdated. Keeping security and consistency in mind, we decided to stay on an older yet proven combination - for all the contracts under Aragon management (`Lido`, `stETH`, `LegacyOracle`) we use solc 0.4.24 release.
For Lido project coordination, governance, and funds management, we use [Aragon](https://aragon.org/dao), a
well-developed and proven DAO Framework. The current stable release of its
Kernel, [4.4.0](https://github.com/aragon/aragonOS/tree/v4.4.0), is fixed on a specific compiler
version - [solc 0.4.24](https://solidity.readthedocs.io/en/v0.4.24/), which is currently outdated. Keeping security and
consistency in mind, we decided to stay on an older yet proven combination. Therefore, for all the contracts under
Aragon management (`Lido`, `stETH`, `LegacyOracle`), we use the `solc 0.4.24` release.

cstETH token, that acts as autonomous wrapper and not governed by Aragon, was inherited from OpenZeppelin's library, using one of its stable releases [3.1.0](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v3.1.0).
For the `wstETH` contract, we use `solc 0.6.12`, as it is non-upgradeable and bound to this version.

# How to compile
For the other contracts, newer compiler versions are used.

Separately:

```bash
yarn compile:4
yarn compile:6
```

All at once:
# Compilation Instructions

```bash
yarn compile
Expand Down
20 changes: 20 additions & 0 deletions contracts/common/interfaces/IGateSealFactory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-FileCopyrightText: 2023 Lido <[email protected]>
// SPDX-License-Identifier: GPL-3.0

// See contracts/COMPILERS.md
// solhint-disable-next-line
pragma solidity >=0.4.24 <0.9.0;

// https://github.com/lidofinance/gate-seals/blob/main/contracts/GateSealFactory.vy
interface IGateSealFactory {

event GateSealCreated(address gate_seal);

function create_gate_seal(
address _sealing_committee,
uint256 _seal_duration_seconds,
address[] memory _sealables,
uint256 _expiry_timestamp
) external;

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ contract AccountingOracle__MockForLegacyOracle {
}

function submitReportData(AccountingOracle.ReportData calldata data, uint256 /* contractVersion */) external {
require(data.refSlot >= _lastRefSlot, "refSlot less than _lastRefSlot");
uint256 slotsElapsed = data.refSlot - _lastRefSlot;
_lastRefSlot = data.refSlot;

Expand Down

0 comments on commit 55164f8

Please sign in to comment.