Update docs

This commit is contained in:
github-actions
2022-11-08 14:30:45 +00:00
parent 1643a5673b
commit 6db3408885
193 changed files with 16530 additions and 45158 deletions

View File

@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableMap.sol)
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableMap.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableMap.js.
pragma solidity ^0.8.0;
@ -30,7 +31,7 @@ import "./EnumerableSet.sol";
*
* - `uint256 -> address` (`UintToAddressMap`) since v3.0.0
* - `address -> uint256` (`AddressToUintMap`) since v4.6.0
* - `bytes32 -> bytes32` (`Bytes32ToBytes32`) since v4.6.0
* - `bytes32 -> bytes32` (`Bytes32ToBytes32Map`) since v4.6.0
* - `uint256 -> uint256` (`UintToUintMap`) since v4.7.0
* - `bytes32 -> uint256` (`Bytes32ToUintMap`) since v4.7.0
*
@ -118,7 +119,7 @@ library EnumerableMap {
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function tryGet(Bytes32ToBytes32Map storage map, bytes32 key) internal view returns (bool, bytes32) {
@ -131,7 +132,7 @@ library EnumerableMap {
}
/**
* @dev Returns the value associated with `key`. O(1).
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
@ -144,10 +145,10 @@ library EnumerableMap {
}
/**
* @dev Same as {_get}, with a custom error message when `key` is not in the map.
* @dev Same as {get}, with a custom error message when `key` is not in the map.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {_tryGet}.
* message unnecessarily. For custom revert reasons use {tryGet}.
*/
function get(
Bytes32ToBytes32Map storage map,
@ -218,7 +219,7 @@ library EnumerableMap {
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function tryGet(UintToUintMap storage map, uint256 key) internal view returns (bool, uint256) {
@ -227,7 +228,7 @@ library EnumerableMap {
}
/**
* @dev Returns the value associated with `key`. O(1).
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
@ -310,10 +311,8 @@ library EnumerableMap {
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*
* _Available since v3.4._
*/
function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
(bool success, bytes32 value) = tryGet(map._inner, bytes32(key));
@ -321,7 +320,7 @@ library EnumerableMap {
}
/**
* @dev Returns the value associated with `key`. O(1).
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
@ -404,7 +403,7 @@ library EnumerableMap {
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) {
@ -413,7 +412,7 @@ library EnumerableMap {
}
/**
* @dev Returns the value associated with `key`. O(1).
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
@ -496,7 +495,7 @@ library EnumerableMap {
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) {
@ -505,7 +504,7 @@ library EnumerableMap {
}
/**
* @dev Returns the value associated with `key`. O(1).
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*