Skip to content

Commit

Permalink
fix: adjust slot hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
1kresh committed Nov 21, 2024
1 parent 22add8a commit 31167e4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/managers/BaseManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract contract BaseManager is Initializable {

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.BaseManager")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant BaseManagerStorageLocation =
0xc0625060998ed0caa490c91b79737728a736aeb8ed65081a52c24738d2978d00;
0xb3503c3f5ee7753561129bea19627692ca916ecb48491bfcd223db17a12b8e00;

function _getBaseManagerStorage() private pure returns (BaseManagerStorage storage $) {
assembly {
Expand Down
2 changes: 1 addition & 1 deletion src/managers/OperatorManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract contract OperatorManager is BaseManager {

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.OperatorManager")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OperatorManagerStorageLocation =
0x819b71b9578fceb0968f87c9e32befffbf335e42bec212b90debd10f2f3fdb00;
0x3b2b549db680c436ebf9aa3c8eeee850852f16da5cdb5137dbc0299ebb219e00;

function _getOperatorManagerStorage() private pure returns (OperatorManagerStorage storage $) {
assembly {
Expand Down
2 changes: 1 addition & 1 deletion src/managers/VaultManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ abstract contract VaultManager is BaseManager {

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.VaultManager")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant VaultManagerStorageLocation =
0x2d53fdb1dd96fda6f8b11e221b5832c7a1e485a4745ba2d81260927c2c462900;
0x485f0695561726d087d0cb5cf546efed37ef61dfced21455f1ba7eb5e5b3db00;

function _getVaultManagerStorage() private pure returns (VaultManagerStorage storage $) {
assembly {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ abstract contract OwnableAccessManager is BaseMiddleware {
error InvalidOwner(address owner);

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.OwnableAccessManager.owner")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OnwerStorageLocation = 0x1a2e92a5f10b92a479fe01ec4964026ce147416d5a91524db21dfcebc947d100;
bytes32 private constant OwnableAccessManagerStorageLocation =
0xeeb01dcf9eb4176c944794e8cb12d9caba4faa2514a692b173894bc3e9135d00;

function _owner() private view returns (address owner_) {
bytes32 location = OnwerStorageLocation;
bytes32 location = OwnableAccessManagerStorageLocation;
assembly {
owner_ := sload(location)
}
Expand All @@ -36,7 +37,7 @@ abstract contract OwnableAccessManager is BaseMiddleware {
function _setOwner(
address owner_
) private {
bytes32 location = OnwerStorageLocation;
bytes32 location = OwnableAccessManagerStorageLocation;
assembly {
sstore(location, owner_)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract contract EpochCapture is BaseMiddleware {

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.EpochCapture")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant EpochCaptureStorageLocation =
0xe67dbdffe3bfc71af681fa5640e3b9c1dc23200b8ae4b657cba896e439a22800;
0x4e241e104e7ef4df0fc8eb6aad7b0f201c6126c722652f1bd1305b6b75c86d00;

function _getEpochCaptureStorage() private pure returns (EpochCaptureStorage storage $) {
bytes32 location = EpochCaptureStorageLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract contract ForcePauseSelfRegisterOperators is SelfRegisterOperators {

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.ForcePauseSelfRegisterOperators")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ForcePauseSelfRegisterOperatorsStorageLocation =
0xdd349876372c6239a846e50336b70d810259637738fd42711d201341e1e8d600;
0xf3871d05fd4da42686c3c56dfd4be98b1d278da4bf1fd61b1d6e7a6e37722600;

function _getForcePauseStorage() private pure returns (ForcePauseSelfRegisterOperatorsStorage storage $) {
bytes32 location = ForcePauseSelfRegisterOperatorsStorageLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract contract SelfRegisterOperators is BaseMiddleware, BaseSig, EIP712Upgrad

// keccak256(abi.encode(uint256(keccak256("symbiotic.storage.SelfRegisterOperators")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant SelfResgisterOperators_STORAGE_LOCATION =
0xefff5050c06ffc4cd47bb2affac9b172a9afa4faaca821adedcc3651bef4ba00;
0x7c1bcd600c3fcfbc53470fac03a90d5cf6aa7b77c3f1ed10e6c6bd4d192eaf00;

function _getSelfRegisterOperatorsStorage() private pure returns (SelfRegisterOperatorsStorage storage $) {
bytes32 location = SelfResgisterOperators_STORAGE_LOCATION;
Expand Down

0 comments on commit 31167e4

Please sign in to comment.