|
|
|
@ -50,6 +50,7 @@ library StorageSlot { |
|
|
|
|
* @dev Returns an `AddressSlot` with member `value` located at `slot`. |
|
|
|
|
*/ |
|
|
|
|
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { |
|
|
|
|
/// @solidity memory-safe-assembly |
|
|
|
|
assembly { |
|
|
|
|
r.slot := slot |
|
|
|
|
} |
|
|
|
@ -59,6 +60,7 @@ library StorageSlot { |
|
|
|
|
* @dev Returns an `BooleanSlot` with member `value` located at `slot`. |
|
|
|
|
*/ |
|
|
|
|
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { |
|
|
|
|
/// @solidity memory-safe-assembly |
|
|
|
|
assembly { |
|
|
|
|
r.slot := slot |
|
|
|
|
} |
|
|
|
@ -68,6 +70,7 @@ library StorageSlot { |
|
|
|
|
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`. |
|
|
|
|
*/ |
|
|
|
|
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { |
|
|
|
|
/// @solidity memory-safe-assembly |
|
|
|
|
assembly { |
|
|
|
|
r.slot := slot |
|
|
|
|
} |
|
|
|
@ -77,6 +80,7 @@ library StorageSlot { |
|
|
|
|
* @dev Returns an `Uint256Slot` with member `value` located at `slot`. |
|
|
|
|
*/ |
|
|
|
|
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { |
|
|
|
|
/// @solidity memory-safe-assembly |
|
|
|
|
assembly { |
|
|
|
|
r.slot := slot |
|
|
|
|
} |
|
|
|
|