File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed
scripts/generate/templates Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ library Arrays {
26
26
* array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
27
27
* when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
28
28
* consume more gas than is available in a block, leading to potential DoS.
29
+ *
30
+ * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
29
31
*/
30
32
function sort (
31
33
uint256 [] memory array ,
@@ -53,6 +55,8 @@ library Arrays {
53
55
* array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
54
56
* when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
55
57
* consume more gas than is available in a block, leading to potential DoS.
58
+ *
59
+ * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
56
60
*/
57
61
function sort (
58
62
address [] memory array ,
@@ -80,6 +84,8 @@ library Arrays {
80
84
* array. Using it in view functions that are executed through `eth_call` is safe, but one should be very careful
81
85
* when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
82
86
* consume more gas than is available in a block, leading to potential DoS.
87
+ *
88
+ * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
83
89
*/
84
90
function sort (
85
91
bytes32 [] memory array ,
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ import {Hashes} from "./Hashes.sol";
20
20
* OpenZeppelin's JavaScript library generates Merkle trees that are safe
21
21
* against this attack out of the box.
22
22
*
23
+ * IMPORTANT: Consider memory side-effects when using custom hashing functions
24
+ * that access memory in an unsafe way.
25
+ *
23
26
* NOTE: This library supports proof verification for merkle trees built using
24
27
* custom _commutative_ hashing functions (i.e. `H(a, b) == H(b, a)`). Proving
25
28
* leaf inclusion in trees built using non-commutative hashing functions requires
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ const sort = type => `\
26
26
* array. Using it in view functions that are executed through \`eth_call\` is safe, but one should be very careful
27
27
* when executing this as part of a transaction. If the array being sorted is too large, the sort operation may
28
28
* consume more gas than is available in a block, leading to potential DoS.
29
+ *
30
+ * IMPORTANT: Consider memory side-effects when using custom comparator functions that access memory in an unsafe way.
29
31
*/
30
32
function sort(
31
33
${ type } [] memory array,
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ import {Hashes} from "./Hashes.sol";
26
26
* OpenZeppelin's JavaScript library generates Merkle trees that are safe
27
27
* against this attack out of the box.
28
28
*
29
+ * IMPORTANT: Consider memory side-effects when using custom hashing functions
30
+ * that access memory in an unsafe way.
31
+ *
29
32
* NOTE: This library supports proof verification for merkle trees built using
30
33
* custom _commutative_ hashing functions (i.e. \`H(a, b) == H(b, a)\`). Proving
31
34
* leaf inclusion in trees built using non-commutative hashing functions requires
You can’t perform that action at this time.
0 commit comments