Skip to content

Commit ab14a4a

Browse files
authored
🥢 Fix typos (#1382)
1 parent 0f93e57 commit ab14a4a

15 files changed

+53
-53
lines changed

‎docs/utils/datetimelib.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ function diffYears(uint256 fromTimestamp, uint256 toTimestamp)
404404
Returns the difference in Gregorian calendar years
405405
between `fromTimestamp` and `toTimestamp`.
406406
Note: Even if the true time difference is less than a year,
407-
the difference can be non-zero is the timestamps are
407+
the difference can be non-zero if the timestamps are
408408
from different Gregorian calendar years
409409

410410
### diffMonths(uint256,uint256)
@@ -419,7 +419,7 @@ function diffMonths(uint256 fromTimestamp, uint256 toTimestamp)
419419
Returns the difference in Gregorian calendar months
420420
between `fromTimestamp` and `toTimestamp`.
421421
Note: Even if the true time difference is less than a month,
422-
the difference can be non-zero is the timestamps are
422+
the difference can be non-zero if the timestamps are
423423
from different Gregorian calendar months.
424424

425425
### diffDays(uint256,uint256)

‎docs/utils/dynamicarraylib.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The constant returned when the element is not found in the array.
3737

3838
Low level minimalist uint256 array operations.
3939
If you don't need syntax sugar, it's recommended to use these.
40-
Some of these functions returns the same array for function chaining.
40+
Some of these functions return the same array for function chaining.
4141
e.g. `array.set(0, 1).set(1, 2)`.
4242

4343
### malloc(uint256)
@@ -360,7 +360,7 @@ Directly returns `a` without copying.
360360

361361
## Dynamic Array Operations
362362

363-
Some of these functions returns the same array for function chaining.
363+
Some of these functions return the same array for function chaining.
364364
e.g. `a.p("1").p("2")`.
365365

366366
### length(DynamicArray)

‎docs/utils/dynamicbufferlib.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ take care of the memory allocation.
2525

2626
## Operations
2727

28-
Some of these functions returns the same buffer for function chaining.
28+
Some of these functions return the same buffer for function chaining.
2929
e.g. `buffer.p("1").p("2")`.
3030

3131
### length(DynamicBuffer)

‎docs/utils/ecdsa.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Note: Supports lengths of `s` up to 999999 bytes.
182182

183183
## Canonical Hash Functions
184184

185-
The following functions returns the hash of the signature in it's canonicalized format,
185+
The following functions return the hash of the signature in its canonicalized format,
186186
which is the 65-byte `abi.encodePacked(r, s, uint8(v))`, where `v` is either 27 or 28.
187187
If `s` is greater than `N / 2` then it will be converted to `N - s`
188188
and the `v` value will be flipped.

‎docs/utils/enumerablemaplib.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct Bytes32ToBytes32Map {
3030
}
3131
```
3232

33-
A enumerable map of `bytes32` to `bytes32`.
33+
An enumerable map of `bytes32` to `bytes32`.
3434

3535
### Bytes32ToUint256Map
3636

@@ -41,7 +41,7 @@ struct Bytes32ToUint256Map {
4141
}
4242
```
4343

44-
A enumerable map of `bytes32` to `uint256`.
44+
An enumerable map of `bytes32` to `uint256`.
4545

4646
### Bytes32ToAddressMap
4747

@@ -52,7 +52,7 @@ struct Bytes32ToAddressMap {
5252
}
5353
```
5454

55-
A enumerable map of `bytes32` to `address`.
55+
An enumerable map of `bytes32` to `address`.
5656

5757
### Uint256ToBytes32Map
5858

@@ -63,7 +63,7 @@ struct Uint256ToBytes32Map {
6363
}
6464
```
6565

66-
A enumerable map of `uint256` to `bytes32`.
66+
An enumerable map of `uint256` to `bytes32`.
6767

6868
### Uint256ToUint256Map
6969

@@ -74,7 +74,7 @@ struct Uint256ToUint256Map {
7474
}
7575
```
7676

77-
A enumerable map of `uint256` to `uint256`.
77+
An enumerable map of `uint256` to `uint256`.
7878

7979
### Uint256ToAddressMap
8080

@@ -85,7 +85,7 @@ struct Uint256ToAddressMap {
8585
}
8686
```
8787

88-
A enumerable map of `uint256` to `address`.
88+
An enumerable map of `uint256` to `address`.
8989

9090
### AddressToBytes32Map
9191

@@ -96,7 +96,7 @@ struct AddressToBytes32Map {
9696
}
9797
```
9898

99-
A enumerable map of `address` to `bytes32`.
99+
An enumerable map of `address` to `bytes32`.
100100

101101
### AddressToUint256Map
102102

@@ -107,7 +107,7 @@ struct AddressToUint256Map {
107107
}
108108
```
109109

110-
A enumerable map of `address` to `uint256`.
110+
An enumerable map of `address` to `uint256`.
111111

112112
### AddressToAddressMap
113113

@@ -118,7 +118,7 @@ struct AddressToAddressMap {
118118
}
119119
```
120120

121-
A enumerable map of `address` to `address`.
121+
An enumerable map of `address` to `address`.
122122

123123
## Getters / Setters
124124

‎docs/utils/libsort.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,31 +97,31 @@ array is not sorted -- it will simply remove consecutive duplicate elements.
9797
function uniquifySorted(uint256[] memory a) internal pure
9898
```
9999

100-
Removes duplicate elements from a ascendingly sorted memory array.
100+
Removes duplicate elements from an ascendingly sorted memory array.
101101

102102
### uniquifySorted(int256[])
103103

104104
```solidity
105105
function uniquifySorted(int256[] memory a) internal pure
106106
```
107107

108-
Removes duplicate elements from a ascendingly sorted memory array.
108+
Removes duplicate elements from an ascendingly sorted memory array.
109109

110110
### uniquifySorted(address[])
111111

112112
```solidity
113113
function uniquifySorted(address[] memory a) internal pure
114114
```
115115

116-
Removes duplicate elements from a ascendingly sorted memory array.
116+
Removes duplicate elements from an ascendingly sorted memory array.
117117

118118
### uniquifySorted(bytes32[])
119119

120120
```solidity
121121
function uniquifySorted(bytes32[] memory a) internal pure
122122
```
123123

124-
Removes duplicate elements from a ascendingly sorted memory array.
124+
Removes duplicate elements from an ascendingly sorted memory array.
125125

126126
### searchSorted(uint256[],uint256)
127127

‎prep/gen-enumerable-map-lib.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function main() {
1313
const crossForEach = (a, fn) => a.forEach(x => a.forEach(y => fn(x, y)));
1414

1515
const genStructDef = (f, t) => {
16-
return '/// @dev A enumerable map of `' + f + '` to `' + t + '`.\n' +
16+
return '/// @dev An enumerable map of `' + f + '` to `' + t + '`.\n' +
1717
'struct ' + mapType(f, t) + '{\n' +
1818
'EnumerableSetLib.' + capitalize(f) + 'Set _keys;\n' +
1919
'mapping(' + f + ' => ' + t + ') _values;\n}\n\n';

‎src/utils/DynamicArrayLib.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library DynamicArrayLib {
2828

2929
// Low level minimalist uint256 array operations.
3030
// If you don't need syntax sugar, it's recommended to use these.
31-
// Some of these functions returns the same array for function chaining.
31+
// Some of these functions return the same array for function chaining.
3232
// e.g. `array.set(0, 1).set(1, 2)`.
3333

3434
/// @dev Returns a uint256 array with `n` elements. The elements are not zeroized.
@@ -359,7 +359,7 @@ library DynamicArrayLib {
359359
/* DYNAMIC ARRAY OPERATIONS */
360360
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
361361

362-
// Some of these functions returns the same array for function chaining.
362+
// Some of these functions return the same array for function chaining.
363363
// e.g. `a.p("1").p("2")`.
364364

365365
/// @dev Shorthand for `a.data.length`.
@@ -1002,7 +1002,7 @@ library DynamicArrayLib {
10021002
/* PRIVATE HELPERS */
10031003
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
10041004

1005-
/// @dev Helper for deallocating a automatically allocated array pointer.
1005+
/// @dev Helper for deallocating an automatically allocated array pointer.
10061006
function _deallocate(DynamicArray memory result) private pure {
10071007
/// @solidity memory-safe-assembly
10081008
assembly {

‎src/utils/DynamicBufferLib.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ library DynamicBufferLib {
2020
/* OPERATIONS */
2121
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
2222

23-
// Some of these functions returns the same buffer for function chaining.
23+
// Some of these functions return the same buffer for function chaining.
2424
// e.g. `buffer.p("1").p("2")`.
2525

2626
/// @dev Shorthand for `buffer.data.length`.
@@ -1283,7 +1283,7 @@ library DynamicBufferLib {
12831283
/* PRIVATE HELPERS */
12841284
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
12851285

1286-
/// @dev Helper for deallocating a automatically allocated `buffer` pointer.
1286+
/// @dev Helper for deallocating an automatically allocated `buffer` pointer.
12871287
function _deallocate(DynamicBuffer memory result) private pure {
12881288
/// @solidity memory-safe-assembly
12891289
assembly {

‎src/utils/ECDSA.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ library ECDSA {
323323
/* CANONICAL HASH FUNCTIONS */
324324
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
325325

326-
// The following functions returns the hash of the signature in it's canonicalized format,
326+
// The following functions return the hash of the signature in its canonicalized format,
327327
// which is the 65-byte `abi.encodePacked(r, s, uint8(v))`, where `v` is either 27 or 28.
328328
// If `s` is greater than `N / 2` then it will be converted to `N - s`
329329
// and the `v` value will be flipped.

‎src/utils/EnumerableMapLib.sol

+9-9
Original file line numberDiff line numberDiff line change
@@ -18,55 +18,55 @@ library EnumerableMapLib {
1818
/* STRUCTS */
1919
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
2020

21-
/// @dev A enumerable map of `bytes32` to `bytes32`.
21+
/// @dev An enumerable map of `bytes32` to `bytes32`.
2222
struct Bytes32ToBytes32Map {
2323
EnumerableSetLib.Bytes32Set _keys;
2424
mapping(bytes32 => bytes32) _values;
2525
}
2626

27-
/// @dev A enumerable map of `bytes32` to `uint256`.
27+
/// @dev An enumerable map of `bytes32` to `uint256`.
2828
struct Bytes32ToUint256Map {
2929
EnumerableSetLib.Bytes32Set _keys;
3030
mapping(bytes32 => uint256) _values;
3131
}
3232

33-
/// @dev A enumerable map of `bytes32` to `address`.
33+
/// @dev An enumerable map of `bytes32` to `address`.
3434
struct Bytes32ToAddressMap {
3535
EnumerableSetLib.Bytes32Set _keys;
3636
mapping(bytes32 => address) _values;
3737
}
3838

39-
/// @dev A enumerable map of `uint256` to `bytes32`.
39+
/// @dev An enumerable map of `uint256` to `bytes32`.
4040
struct Uint256ToBytes32Map {
4141
EnumerableSetLib.Uint256Set _keys;
4242
mapping(uint256 => bytes32) _values;
4343
}
4444

45-
/// @dev A enumerable map of `uint256` to `uint256`.
45+
/// @dev An enumerable map of `uint256` to `uint256`.
4646
struct Uint256ToUint256Map {
4747
EnumerableSetLib.Uint256Set _keys;
4848
mapping(uint256 => uint256) _values;
4949
}
5050

51-
/// @dev A enumerable map of `uint256` to `address`.
51+
/// @dev An enumerable map of `uint256` to `address`.
5252
struct Uint256ToAddressMap {
5353
EnumerableSetLib.Uint256Set _keys;
5454
mapping(uint256 => address) _values;
5555
}
5656

57-
/// @dev A enumerable map of `address` to `bytes32`.
57+
/// @dev An enumerable map of `address` to `bytes32`.
5858
struct AddressToBytes32Map {
5959
EnumerableSetLib.AddressSet _keys;
6060
mapping(address => bytes32) _values;
6161
}
6262

63-
/// @dev A enumerable map of `address` to `uint256`.
63+
/// @dev An enumerable map of `address` to `uint256`.
6464
struct AddressToUint256Map {
6565
EnumerableSetLib.AddressSet _keys;
6666
mapping(address => uint256) _values;
6767
}
6868

69-
/// @dev A enumerable map of `address` to `address`.
69+
/// @dev An enumerable map of `address` to `address`.
7070
struct AddressToAddressMap {
7171
EnumerableSetLib.AddressSet _keys;
7272
mapping(address => address) _values;

‎src/utils/Initializable.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract contract Initializable {
2323
event Initialized(uint64 version);
2424

2525
/// @dev `keccak256(bytes("Initialized(uint64)"))`.
26-
bytes32 private constant _INTIALIZED_EVENT_SIGNATURE =
26+
bytes32 private constant _INITIALIZED_EVENT_SIGNATURE =
2727
0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2;
2828

2929
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
@@ -93,12 +93,12 @@ abstract contract Initializable {
9393
sstore(s, 2)
9494
// Emit the {Initialized} event.
9595
mstore(0x20, 1)
96-
log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE)
96+
log1(0x20, 0x20, _INITIALIZED_EVENT_SIGNATURE)
9797
}
9898
}
9999
}
100100

101-
/// @dev Guards a reinitialzer function so that it can be invoked at most once.
101+
/// @dev Guards a reinitializer function so that it can be invoked at most once.
102102
///
103103
/// You can guard a function with `onlyInitializing` such that it can be called
104104
/// through a function guarded with `reinitializer`.
@@ -126,7 +126,7 @@ abstract contract Initializable {
126126
sstore(s, version)
127127
// Emit the {Initialized} event.
128128
mstore(0x20, shr(1, version))
129-
log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE)
129+
log1(0x20, 0x20, _INITIALIZED_EVENT_SIGNATURE)
130130
}
131131
}
132132

@@ -171,7 +171,7 @@ abstract contract Initializable {
171171
sstore(s, shl(1, uint64max))
172172
// Emit the {Initialized} event.
173173
mstore(0x20, uint64max)
174-
log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE)
174+
log1(0x20, 0x20, _INITIALIZED_EVENT_SIGNATURE)
175175
}
176176
}
177177
}

‎src/utils/g/DynamicArrayLib.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ library DynamicArrayLib {
3232

3333
// Low level minimalist uint256 array operations.
3434
// If you don't need syntax sugar, it's recommended to use these.
35-
// Some of these functions returns the same array for function chaining.
35+
// Some of these functions return the same array for function chaining.
3636
// e.g. `array.set(0, 1).set(1, 2)`.
3737

3838
/// @dev Returns a uint256 array with `n` elements. The elements are not zeroized.
@@ -363,7 +363,7 @@ library DynamicArrayLib {
363363
/* DYNAMIC ARRAY OPERATIONS */
364364
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
365365

366-
// Some of these functions returns the same array for function chaining.
366+
// Some of these functions return the same array for function chaining.
367367
// e.g. `a.p("1").p("2")`.
368368

369369
/// @dev Shorthand for `a.data.length`.
@@ -1006,7 +1006,7 @@ library DynamicArrayLib {
10061006
/* PRIVATE HELPERS */
10071007
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
10081008

1009-
/// @dev Helper for deallocating a automatically allocated array pointer.
1009+
/// @dev Helper for deallocating an automatically allocated array pointer.
10101010
function _deallocate(DynamicArray memory result) private pure {
10111011
/// @solidity memory-safe-assembly
10121012
assembly {

‎src/utils/g/DynamicBufferLib.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ library DynamicBufferLib {
2424
/* OPERATIONS */
2525
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
2626

27-
// Some of these functions returns the same buffer for function chaining.
27+
// Some of these functions return the same buffer for function chaining.
2828
// e.g. `buffer.p("1").p("2")`.
2929

3030
/// @dev Shorthand for `buffer.data.length`.

0 commit comments

Comments
 (0)