Skip to content

Commit 6ed4b9b

Browse files
cairoethernestognw
authored andcommitted
Add introduction tag for v5.1 contracts (#5228)
Co-authored-by: Ernesto García <ernestognw@gmail.com> Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent 7623e4b commit 6ed4b9b

File tree

19 files changed

+41
-0
lines changed

19 files changed

+41
-0
lines changed

contracts/finance/VestingWalletCliff.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {VestingWallet} from "./VestingWallet.sol";
77

88
/**
99
* @dev Extension of {VestingWallet} that adds a cliff to the vesting schedule.
10+
*
11+
* _Available since v5.1._
1012
*/
1113
abstract contract VestingWalletCliff is VestingWallet {
1214
using SafeCast for *;

contracts/governance/extensions/GovernorCountingFractional.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import {Math} from "../../utils/math/Math.sol";
2727
* * Voting privately from a shielded pool using zero knowledge proofs.
2828
*
2929
* Based on ScopeLift's GovernorCountingFractional[https://github.com/ScopeLift/flexible-voting/blob/e5de2efd1368387b840931f19f3c184c85842761/src/GovernorCountingFractional.sol]
30+
*
31+
* _Available since v5.1._
3032
*/
3133
abstract contract GovernorCountingFractional is Governor {
3234
using Math for *;

contracts/token/ERC1155/utils/ERC1155Utils.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {IERC1155Errors} from "../../../interfaces/draft-IERC6093.sol";
99
* @dev Library that provide common ERC-1155 utility functions.
1010
*
1111
* See https://eips.ethereum.org/EIPS/eip-1155[ERC-1155].
12+
*
13+
* _Available since v5.1._
1214
*/
1315
library ERC1155Utils {
1416
/**

contracts/token/ERC20/extensions/ERC1363.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {ERC1363Utils} from "../utils/ERC1363Utils.sol";
1212
* @dev Extension of {ERC20} tokens that adds support for code execution after transfers and approvals
1313
* on recipient contracts. Calls after transfers are enabled through the {ERC1363-transferAndCall} and
1414
* {ERC1363-transferFromAndCall} methods while calls after approvals can be made with {ERC1363-approveAndCall}
15+
*
16+
* _Available since v5.1._
1517
*/
1618
abstract contract ERC1363 is ERC20, ERC165, IERC1363 {
1719
/**

contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {StorageSlot} from "../../../utils/StorageSlot.sol";
1212
* @dev Extension of {ERC20} that adds support for temporary allowances following ERC-7674.
1313
*
1414
* WARNING: This is a draft contract. The corresponding ERC is still subject to changes.
15+
*
16+
* _Available since v5.1._
1517
*/
1618
abstract contract ERC20TemporaryApproval is ERC20, IERC7674 {
1719
using SlotDerivation for bytes32;

contracts/token/ERC721/utils/ERC721Utils.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {IERC721Errors} from "../../../interfaces/draft-IERC6093.sol";
99
* @dev Library that provide common ERC-721 utility functions.
1010
*
1111
* See https://eips.ethereum.org/EIPS/eip-721[ERC-721].
12+
*
13+
* _Available since v5.1._
1214
*/
1315
library ERC721Utils {
1416
/**

contracts/utils/Comparators.sol

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
pragma solidity ^0.8.20;
44

5+
/**
6+
* @dev Provides a set of functions to compare values.
7+
*
8+
* _Available since v5.1._
9+
*/
510
library Comparators {
611
function lt(uint256 a, uint256 b) internal pure returns (bool) {
712
return a < b;

contracts/utils/Errors.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ pragma solidity ^0.8.20;
77
*
88
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
99
* It is recommended to avoid relying on the error API for critical functionality.
10+
*
11+
* _Available since v5.1._
1012
*/
1113
library Errors {
1214
/**

contracts/utils/Packing.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pragma solidity ^0.8.20;
2828
* }
2929
* }
3030
* ```
31+
*
32+
* _Available since v5.1._
3133
*/
3234
// solhint-disable func-name-mixedcase
3335
library Packing {

contracts/utils/Panic.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ pragma solidity ^0.8.20;
1818
* ```
1919
*
2020
* Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
21+
*
22+
* _Available since v5.1._
2123
*/
2224
// slither-disable-next-line unused-state
2325
library Panic {

contracts/utils/ReentrancyGuardTransient.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {StorageSlot} from "./StorageSlot.sol";
88
* @dev Variant of {ReentrancyGuard} that uses transient storage.
99
*
1010
* NOTE: This variant only works on networks where EIP-1153 is available.
11+
*
12+
* _Available since v5.1._
1113
*/
1214
abstract contract ReentrancyGuardTransient {
1315
using StorageSlot for *;

contracts/utils/SlotDerivation.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ pragma solidity ^0.8.20;
3434
*
3535
* NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
3636
* upgrade safety will ignore the slots accessed through this library.
37+
*
38+
* _Available since v5.1._
3739
*/
3840
library SlotDerivation {
3941
/**

contracts/utils/cryptography/Hashes.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pragma solidity ^0.8.20;
44

55
/**
66
* @dev Library of standard hash functions.
7+
*
8+
* _Available since v5.1._
79
*/
810
library Hashes {
911
/**

contracts/utils/cryptography/P256.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import {Errors} from "../Errors.sol";
1414
* Based on the original https://github.com/itsobvioustech/aa-passkeys-wallet/blob/d3d423f28a4d8dfcb203c7fa0c47f42592a7378e/src/Secp256r1.sol[implementation of itsobvioustech] (GNU General Public License v3.0).
1515
* Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and
1616
* https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations.
17+
*
18+
* _Available since v5.1._
1719
*/
1820
library P256 {
1921
struct JPoint {

contracts/utils/cryptography/RSA.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {Math} from "../math/Math.sol";
1111
* RSA semantically secure for signing messages.
1212
*
1313
* Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adrià Massanet's work] (GNU General Public License v3.0).
14+
*
15+
* _Available since v5.1._
1416
*/
1517
library RSA {
1618
/**

contracts/utils/structs/CircularBuffer.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ import {Panic} from "../Panic.sol";
3434
* CircularBuffer.Bytes32CircularBuffer private myBuffer;
3535
* }
3636
* ```
37+
*
38+
* _Available since v5.1._
3739
*/
3840
library CircularBuffer {
3941
/**

contracts/utils/structs/Heap.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import {StorageSlot} from "../StorageSlot.sol";
3333
* IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating
3434
* memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate
3535
* the Heap's state directly and that it follows the Solidity memory safety rules.
36+
*
37+
* _Available since v5.1._
3638
*/
3739
library Heap {
3840
using Arrays for *;

scripts/generate/templates/Packing.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pragma solidity ^0.8.20;
3232
* }
3333
* }
3434
* \`\`\`
35+
*
36+
* _Available since v5.1._
3537
*/
3638
// solhint-disable func-name-mixedcase
3739
`;

scripts/generate/templates/SlotDerivation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ pragma solidity ^0.8.20;
3636
*
3737
* NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
3838
* upgrade safety will ignore the slots accessed through this library.
39+
*
40+
* _Available since v5.1._
3941
*/
4042
`;
4143

0 commit comments

Comments
 (0)