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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 9 additions & 9 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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.

0 commit comments

Comments
 (0)