Skip to content

Commit 3547cdc

Browse files
authored
Fix typographical errors (#5171)
1 parent 48c67c7 commit 3547cdc

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

contracts/access/manager/AccessManager.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ contract AccessManager is Context, Multicall, IAccessManager {
695695

696696
(bool adminRestricted, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data);
697697

698-
// isTragetClosed apply to non-admin-restricted function
698+
// isTargetClosed apply to non-admin-restricted function
699699
if (!adminRestricted && isTargetClosed(address(this))) {
700700
return (false, 0);
701701
}

contracts/utils/StorageSlot.sol

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ library StorageSlot {
8989
}
9090

9191
/**
92-
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
92+
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
9393
*/
9494
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
9595
/// @solidity memory-safe-assembly
@@ -99,7 +99,7 @@ library StorageSlot {
9999
}
100100

101101
/**
102-
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
102+
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
103103
*/
104104
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
105105
/// @solidity memory-safe-assembly
@@ -109,7 +109,7 @@ library StorageSlot {
109109
}
110110

111111
/**
112-
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
112+
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
113113
*/
114114
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
115115
/// @solidity memory-safe-assembly
@@ -119,7 +119,7 @@ library StorageSlot {
119119
}
120120

121121
/**
122-
* @dev Returns an `Int256Slot` with member `value` located at `slot`.
122+
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
123123
*/
124124
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
125125
/// @solidity memory-safe-assembly
@@ -129,7 +129,7 @@ library StorageSlot {
129129
}
130130

131131
/**
132-
* @dev Returns an `StringSlot` with member `value` located at `slot`.
132+
* @dev Returns a `StringSlot` with member `value` located at `slot`.
133133
*/
134134
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
135135
/// @solidity memory-safe-assembly
@@ -149,7 +149,7 @@ library StorageSlot {
149149
}
150150

151151
/**
152-
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
152+
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
153153
*/
154154
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
155155
/// @solidity memory-safe-assembly

contracts/utils/math/Math.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ library Math {
232232
/**
233233
* @dev Calculate the modular multiplicative inverse of a number in Z/nZ.
234234
*
235-
* If n is a prime, then Z/nZ is a field. In that case all elements are inversible, expect 0.
235+
* If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
236236
* If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
237237
*
238238
* If the input value is not inversible, 0 is returned.

contracts/utils/math/SignedMath.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ library SignedMath {
5858
// Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,
5959
// taking advantage of the most significant (or "sign" bit) in two's complement representation.
6060
// This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,
61-
// the mask will either be `bytes(0)` (if n is positive) or `~bytes32(0)` (if n is negative).
61+
// the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).
6262
int256 mask = n >> 255;
6363

64-
// A `bytes(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.
64+
// A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.
6565
return uint256((n + mask) ^ mask);
6666
}
6767
}

scripts/generate/templates/StorageSlot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ struct ${name}Slot {
5959

6060
const get = ({ name }) => `\
6161
/**
62-
* @dev Returns an \`${name}Slot\` with member \`value\` located at \`slot\`.
62+
* @dev Returns ${
63+
name.toLowerCase().startsWith('a') ? 'an' : 'a'
64+
} \`${name}Slot\` with member \`value\` located at \`slot\`.
6365
*/
6466
function get${name}Slot(bytes32 slot) internal pure returns (${name}Slot storage r) {
6567
/// @solidity memory-safe-assembly

0 commit comments

Comments
 (0)