Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add openzeppelin dep #41

Merged
merged 5 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/Openzeppelin/openzeppelin-contracts
[submodule "lib/openzeppelin-contracts-upgradeable"]
path = lib/openzeppelin-contracts-upgradeable
url = https://github.com/Openzeppelin/openzeppelin-contracts-upgradeable
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts
Submodule openzeppelin-contracts added at 8c49ad
1 change: 1 addition & 0 deletions lib/openzeppelin-contracts-upgradeable
6 changes: 2 additions & 4 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@openzeppelin-upgrades/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/
@openzeppelin/=lib/eigenlayer-contracts/lib/openzeppelin-contracts/
@openzeppelin-upgrades/=lib/openzeppelin-contracts-upgradeable/
@openzeppelin/=lib/openzeppelin-contracts/
ds-test/=lib/ds-test/src/
eigenlayer-contracts/=lib/eigenlayer-contracts/
forge-std/=lib/forge-std/src/
openzeppelin-contracts-upgradeable/=lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/
openzeppelin-contracts/=lib/eigenlayer-contracts/lib/openzeppelin-contracts/
16 changes: 16 additions & 0 deletions src/interfaces/IDelayedServiceManager.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;
/**
* @title Interface for a middleware / service that may look at past stake amounts.
* @author Layr Labs, Inc.
* @notice Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
* @notice Specifically, this interface is designed for services that consult stake amounts up to `BLOCK_STALE_MEASURE`
* blocks in the past. This may be necessary due to, e.g., network processing & communication delays, or to avoid race conditions
* that could be present with coordinating aggregate operator signatures while service operators are registering & de-registering.
* @dev To clarify edge cases, the middleware can look `BLOCK_STALE_MEASURE` blocks into the past, i.e. it may trust stakes from the interval
* [block.number - BLOCK_STALE_MEASURE, block.number] (specifically, *inclusive* of the block that is `BLOCK_STALE_MEASURE` before the current one)
*/
interface IDelayedService {
/// @notice The maximum amount of blocks in the past that the service will consider stake amounts to still be 'valid'.
function BLOCK_STALE_MEASURE() external view returns (uint32);
}