-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: block funds by mev committee feat: tests feat: more tests fix: required fix: remarks Update blocked bond retention and management periods Check onRewardsMinted call from the staking router forge install: openzeppelin-contracts-v4.4 v4.4.1 build: import oracle contracts from lido-dao feat: CSFeeOracle based on HashConsensus refactor: deploy script docs: udate READMEs lint: add compiler-version solhint rule fix: some remarks refactor: integration tests addresses [CS-93] locking bond funds by mev committee (#35) * feat: add solhint to makefile * feat: block funds by mev committee * feat: tests * feat: more tests * fix: required * fix: remarks * Update blocked bond retention and management periods * fix: some remarks
- Loading branch information
1 parent
6c67389
commit 6622db3
Showing
45 changed files
with
4,041 additions
and
1,161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
RPC_URL= | ||
LIDO_LOCATOR_ADDRESS= | ||
WSTETH_ADDRESS= | ||
# For deployment | ||
DEPLOYER_PRIVATE_KEY= | ||
INITIALIZATION_EPOCH= | ||
## mainnet | ||
CL_GENESIS_TIME=1606824023 | ||
KEEP_ANVIL_AFTER_LOCAL_DEPLOY=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is an extraction from [lidofinance/lido-dao@v2.0.0](https://github.com/lidofinance/lido-dao/releases/tag/v2.0.0) codebase. | ||
Patched to use ^0.8.9 solidity compiler version. | ||
@openzeppelin/contracts-v4.4 mapped to v4.4.1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi> | ||
// SPDX-License-Identifier: MIT | ||
|
||
// See contracts/COMPILERS.md | ||
pragma solidity ^0.8.9; | ||
|
||
library Math { | ||
function max(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a > b ? a : b; | ||
} | ||
|
||
function min(uint256 a, uint256 b) internal pure returns (uint256) { | ||
return a < b ? a : b; | ||
} | ||
|
||
/// @notice Tests if x ∈ [a, b) (mod n) | ||
/// | ||
function pointInHalfOpenIntervalModN(uint256 x, uint256 a, uint256 b, uint256 n) | ||
internal pure returns (bool) | ||
{ | ||
return (x + n - a) % n < (b - a) % n; | ||
} | ||
|
||
/// @notice Tests if x ∈ [a, b] (mod n) | ||
/// | ||
function pointInClosedIntervalModN(uint256 x, uint256 a, uint256 b, uint256 n) | ||
internal pure returns (bool) | ||
{ | ||
return (x + n - a) % n <= (b - a) % n; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
pragma solidity ^0.8.9; | ||
|
||
|
||
/** | ||
* @notice Aragon Unstructured Storage library | ||
*/ | ||
library UnstructuredStorage { | ||
function getStorageBool(bytes32 position) internal view returns (bool data) { | ||
assembly { data := sload(position) } | ||
} | ||
|
||
function getStorageAddress(bytes32 position) internal view returns (address data) { | ||
assembly { data := sload(position) } | ||
} | ||
|
||
function getStorageBytes32(bytes32 position) internal view returns (bytes32 data) { | ||
assembly { data := sload(position) } | ||
} | ||
|
||
function getStorageUint256(bytes32 position) internal view returns (uint256 data) { | ||
assembly { data := sload(position) } | ||
} | ||
|
||
function setStorageBool(bytes32 position, bool data) internal { | ||
assembly { sstore(position, data) } | ||
} | ||
|
||
function setStorageAddress(bytes32 position, address data) internal { | ||
assembly { sstore(position, data) } | ||
} | ||
|
||
function setStorageBytes32(bytes32 position, bytes32 data) internal { | ||
assembly { sstore(position, data) } | ||
} | ||
|
||
function setStorageUint256(bytes32 position, uint256 data) internal { | ||
assembly { sstore(position, data) } | ||
} | ||
} |
Oops, something went wrong.