Add introduction tag for v5.1 contracts (#5228)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
cairo
2024-09-27 08:47:15 -07:00
committed by GitHub
parent ae753b7eac
commit cceac54953
19 changed files with 41 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import {VestingWallet} from "./VestingWallet.sol";
/** /**
* @dev Extension of {VestingWallet} that adds a cliff to the vesting schedule. * @dev Extension of {VestingWallet} that adds a cliff to the vesting schedule.
*
* _Available since v5.1._
*/ */
abstract contract VestingWalletCliff is VestingWallet { abstract contract VestingWalletCliff is VestingWallet {
using SafeCast for *; using SafeCast for *;

View File

@ -27,6 +27,8 @@ import {Math} from "../../utils/math/Math.sol";
* * Voting privately from a shielded pool using zero knowledge proofs. * * Voting privately from a shielded pool using zero knowledge proofs.
* *
* Based on ScopeLift's GovernorCountingFractional[https://github.com/ScopeLift/flexible-voting/blob/e5de2efd1368387b840931f19f3c184c85842761/src/GovernorCountingFractional.sol] * Based on ScopeLift's GovernorCountingFractional[https://github.com/ScopeLift/flexible-voting/blob/e5de2efd1368387b840931f19f3c184c85842761/src/GovernorCountingFractional.sol]
*
* _Available since v5.1._
*/ */
abstract contract GovernorCountingFractional is Governor { abstract contract GovernorCountingFractional is Governor {
using Math for *; using Math for *;

View File

@ -9,6 +9,8 @@ import {IERC1155Errors} from "../../../interfaces/draft-IERC6093.sol";
* @dev Library that provide common ERC-1155 utility functions. * @dev Library that provide common ERC-1155 utility functions.
* *
* See https://eips.ethereum.org/EIPS/eip-1155[ERC-1155]. * See https://eips.ethereum.org/EIPS/eip-1155[ERC-1155].
*
* _Available since v5.1._
*/ */
library ERC1155Utils { library ERC1155Utils {
/** /**

View File

@ -12,6 +12,8 @@ import {ERC1363Utils} from "../utils/ERC1363Utils.sol";
* @dev Extension of {ERC20} tokens that adds support for code execution after transfers and approvals * @dev Extension of {ERC20} tokens that adds support for code execution after transfers and approvals
* on recipient contracts. Calls after transfers are enabled through the {ERC1363-transferAndCall} and * on recipient contracts. Calls after transfers are enabled through the {ERC1363-transferAndCall} and
* {ERC1363-transferFromAndCall} methods while calls after approvals can be made with {ERC1363-approveAndCall} * {ERC1363-transferFromAndCall} methods while calls after approvals can be made with {ERC1363-approveAndCall}
*
* _Available since v5.1._
*/ */
abstract contract ERC1363 is ERC20, ERC165, IERC1363 { abstract contract ERC1363 is ERC20, ERC165, IERC1363 {
/** /**

View File

@ -12,6 +12,8 @@ import {StorageSlot} from "../../../utils/StorageSlot.sol";
* @dev Extension of {ERC20} that adds support for temporary allowances following ERC-7674. * @dev Extension of {ERC20} that adds support for temporary allowances following ERC-7674.
* *
* WARNING: This is a draft contract. The corresponding ERC is still subject to changes. * WARNING: This is a draft contract. The corresponding ERC is still subject to changes.
*
* _Available since v5.1._
*/ */
abstract contract ERC20TemporaryApproval is ERC20, IERC7674 { abstract contract ERC20TemporaryApproval is ERC20, IERC7674 {
using SlotDerivation for bytes32; using SlotDerivation for bytes32;

View File

@ -9,6 +9,8 @@ import {IERC721Errors} from "../../../interfaces/draft-IERC6093.sol";
* @dev Library that provide common ERC-721 utility functions. * @dev Library that provide common ERC-721 utility functions.
* *
* See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. * See https://eips.ethereum.org/EIPS/eip-721[ERC-721].
*
* _Available since v5.1._
*/ */
library ERC721Utils { library ERC721Utils {
/** /**

View File

@ -2,6 +2,11 @@
pragma solidity ^0.8.20; pragma solidity ^0.8.20;
/**
* @dev Provides a set of functions to compare values.
*
* _Available since v5.1._
*/
library Comparators { library Comparators {
function lt(uint256 a, uint256 b) internal pure returns (bool) { function lt(uint256 a, uint256 b) internal pure returns (bool) {
return a < b; return a < b;

View File

@ -7,6 +7,8 @@ pragma solidity ^0.8.20;
* *
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality. * It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/ */
library Errors { library Errors {
/** /**

View File

@ -28,6 +28,8 @@ pragma solidity ^0.8.20;
* } * }
* } * }
* ``` * ```
*
* _Available since v5.1._
*/ */
// solhint-disable func-name-mixedcase // solhint-disable func-name-mixedcase
library Packing { library Packing {

View File

@ -18,6 +18,8 @@ pragma solidity ^0.8.20;
* ``` * ```
* *
* Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil]. * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
*
* _Available since v5.1._
*/ */
// slither-disable-next-line unused-state // slither-disable-next-line unused-state
library Panic { library Panic {

View File

@ -8,6 +8,8 @@ import {StorageSlot} from "./StorageSlot.sol";
* @dev Variant of {ReentrancyGuard} that uses transient storage. * @dev Variant of {ReentrancyGuard} that uses transient storage.
* *
* NOTE: This variant only works on networks where EIP-1153 is available. * NOTE: This variant only works on networks where EIP-1153 is available.
*
* _Available since v5.1._
*/ */
abstract contract ReentrancyGuardTransient { abstract contract ReentrancyGuardTransient {
using StorageSlot for *; using StorageSlot for *;

View File

@ -34,6 +34,8 @@ pragma solidity ^0.8.20;
* *
* NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking * NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
* upgrade safety will ignore the slots accessed through this library. * upgrade safety will ignore the slots accessed through this library.
*
* _Available since v5.1._
*/ */
library SlotDerivation { library SlotDerivation {
/** /**

View File

@ -4,6 +4,8 @@ pragma solidity ^0.8.20;
/** /**
* @dev Library of standard hash functions. * @dev Library of standard hash functions.
*
* _Available since v5.1._
*/ */
library Hashes { library Hashes {
/** /**

View File

@ -14,6 +14,8 @@ import {Errors} from "../Errors.sol";
* 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). * 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).
* Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and * Heavily inspired in https://github.com/maxrobot/elliptic-solidity/blob/c4bb1b6e8ae89534d8db3a6b3a6b52219100520f/contracts/Secp256r1.sol[maxrobot] and
* https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations. * https://github.com/tdrerup/elliptic-curve-solidity/blob/59a9c25957d4d190eff53b6610731d81a077a15e/contracts/curves/EllipticCurve.sol[tdrerup] implementations.
*
* _Available since v5.1._
*/ */
library P256 { library P256 {
struct JPoint { struct JPoint {

View File

@ -11,6 +11,8 @@ import {Math} from "../math/Math.sol";
* RSA semantically secure for signing messages. * RSA semantically secure for signing messages.
* *
* Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adrià Massanet's work] (GNU General Public License v3.0). * Inspired by https://github.com/adria0/SolRsaVerify/blob/79c6182cabb9102ea69d4a2e996816091d5f1cd1[Adrià Massanet's work] (GNU General Public License v3.0).
*
* _Available since v5.1._
*/ */
library RSA { library RSA {
/** /**

View File

@ -34,6 +34,8 @@ import {Panic} from "../Panic.sol";
* CircularBuffer.Bytes32CircularBuffer private myBuffer; * CircularBuffer.Bytes32CircularBuffer private myBuffer;
* } * }
* ``` * ```
*
* _Available since v5.1._
*/ */
library CircularBuffer { library CircularBuffer {
/** /**

View File

@ -33,6 +33,8 @@ import {StorageSlot} from "../StorageSlot.sol";
* IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating * IMPORTANT: This library allows for the use of custom comparator functions. Given that manipulating
* memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate * memory can lead to unexpected behavior. Consider verifying that the comparator does not manipulate
* the Heap's state directly and that it follows the Solidity memory safety rules. * the Heap's state directly and that it follows the Solidity memory safety rules.
*
* _Available since v5.1._
*/ */
library Heap { library Heap {
using Arrays for *; using Arrays for *;

View File

@ -32,6 +32,8 @@ pragma solidity ^0.8.20;
* } * }
* } * }
* \`\`\` * \`\`\`
*
* _Available since v5.1._
*/ */
// solhint-disable func-name-mixedcase // solhint-disable func-name-mixedcase
`; `;

View File

@ -36,6 +36,8 @@ pragma solidity ^0.8.20;
* *
* NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking * NOTE: This library provides a way to manipulate storage locations in a non-standard way. Tooling for checking
* upgrade safety will ignore the slots accessed through this library. * upgrade safety will ignore the slots accessed through this library.
*
* _Available since v5.1._
*/ */
`; `;