The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hyperlane-monorepo/solidity/contracts/avs/ECDSAStakeRegistryStorage.sol

56 lines
2.2 KiB

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import {IDelegationManager} from "../interfaces/avs/vendored/IDelegationManager.sol";
import {CheckpointsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol";
import {IECDSAStakeRegistryEventsAndErrors, Quorum, StrategyParams} from "../interfaces/avs/vendored/IECDSAStakeRegistryEventsAndErrors.sol";
/// @author Layr Labs, Inc.
abstract contract ECDSAStakeRegistryStorage is
IECDSAStakeRegistryEventsAndErrors
{
/// @notice Manages staking delegations through the DelegationManager interface
IDelegationManager internal immutable DELEGATION_MANAGER;
/// @dev The total amount of multipliers to weigh stakes
uint256 internal constant BPS = 10_000;
/// @notice The size of the current operator set
uint256 internal _totalOperators;
/// @notice Stores the current quorum configuration
Quorum internal _quorum;
/// @notice Specifies the weight required to become an operator
uint256 internal _minimumWeight;
/// @notice Holds the address of the service manager
address internal _serviceManager;
/// @notice Defines the duration after which the stake's weight expires.
uint256 internal _stakeExpiry;
/// @notice Tracks the total stake history over time using checkpoints
CheckpointsUpgradeable.History internal _totalWeightHistory;
/// @notice Tracks the threshold bps history using checkpoints
CheckpointsUpgradeable.History internal _thresholdWeightHistory;
/// @notice Maps operator addresses to their respective stake histories using checkpoints
mapping(address => CheckpointsUpgradeable.History)
internal _operatorWeightHistory;
/// @notice Maps an operator to their registration status
mapping(address => bool) internal _operatorRegistered;
/// @param _delegationManager Connects this registry with the DelegationManager
constructor(IDelegationManager _delegationManager) {
DELEGATION_MANAGER = _delegationManager;
}
// slither-disable-next-line shadowing-state
/// @dev Reserves storage slots for future upgrades
// solhint-disable-next-line
uint256[42] private __gap;
}