Skip to content

Commit

Permalink
fix(contracts): move some storage variables to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Oct 15, 2024
1 parent e2a726c commit 7bcd4b1
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions bolt-contracts/src/contracts/BoltSymbioticMiddleware.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ contract BoltSymbioticMiddleware is IBoltMiddleware, OwnableUpgradeable, UUPSUpg
using MapWithTimeData for EnumerableMap.AddressToUintMap;
using Subnetwork for address;

// ========= STORAGE =========
// ========== CONSTANTS ============ //
/// @notice Slasher that can instantly slash operators without veto.
uint256 public INSTANT_SLASHER_TYPE = 0;

/// @notice Slasher that can request a veto before actually slashing operators.
uint256 public VETO_SLASHER_TYPE = 1;

// ========= STORAGE ========= //

/// @notice Bolt Parameters contract.
IBoltParameters public parameters;
Expand Down Expand Up @@ -64,15 +71,9 @@ contract BoltSymbioticMiddleware is IBoltMiddleware, OwnableUpgradeable, UUPSUpg
/// @notice Start timestamp of the first epoch.
uint48 public START_TIMESTAMP;

/// @notice Slasher that can instantly slash operators without veto.
uint256 public INSTANT_SLASHER_TYPE;

/// @notice Slasher that can request a veto before actually slashing operators.
uint256 public VETO_SLASHER_TYPE;

bytes32 public NAME_HASH;

// --> Storage layout marker: 12 slots
// --> Storage layout marker: 10 slots

/**
* @dev This empty reserved space is put in place to allow future versions to add new
Expand All @@ -82,7 +83,7 @@ contract BoltSymbioticMiddleware is IBoltMiddleware, OwnableUpgradeable, UUPSUpg
*
* Total storage slots: 50
*/
uint256[38] private __gap;
uint256[40] private __gap;

// ========= ERRORS =========

Expand Down Expand Up @@ -117,8 +118,6 @@ contract BoltSymbioticMiddleware is IBoltMiddleware, OwnableUpgradeable, UUPSUpg
OPERATOR_REGISTRY = _symbioticOperatorRegistry;
OPERATOR_NET_OPTIN = _symbioticOperatorNetOptIn;
VAULT_REGISTRY = _symbioticVaultRegistry;
INSTANT_SLASHER_TYPE = 0;
VETO_SLASHER_TYPE = 1;
NAME_HASH = keccak256("SYMBIOTIC");
}

Expand Down

0 comments on commit 7bcd4b1

Please sign in to comment.