Merge tag 'v2.2.0' of github.com:OpenZeppelin/openzeppelin-solidity

v2.2.0
This commit is contained in:
Francisco Giordano
2019-05-28 17:40:27 -03:00
162 changed files with 3035 additions and 2330 deletions

View File

@ -1,4 +1,4 @@
pragma solidity ^0.5.0;
pragma solidity ^0.5.2;
/**
* Utility library of inline functions on addresses

View File

@ -1,4 +1,4 @@
pragma solidity ^0.5.0;
pragma solidity ^0.5.2;
import "../math/Math.sol";
@ -9,13 +9,13 @@ import "../math/Math.sol";
*/
library Arrays {
/**
* @dev Upper bound search function which is kind of binary search algoritm. It searches sorted
* array to find index of the element value. If element is found then returns it's index otherwise
* it returns index of first element which is grater than searched value. If searched element is
* @dev Upper bound search function which is kind of binary search algorithm. It searches sorted
* array to find index of the element value. If element is found then returns its index otherwise
* it returns index of first element which is greater than searched value. If searched element is
* bigger than any array element function then returns first index after last element (i.e. all
* values inside the array are smaller than the target). Complexity O(log n).
* @param array The array sorted in ascending order.
* @param element The element's value to be find.
* @param element The element's value to be found.
* @return The calculated index value. Returns 0 for empty array.
*/
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {

View File

@ -1,4 +1,4 @@
pragma solidity ^0.5.0;
pragma solidity ^0.5.2;
import "zos-lib/contracts/Initializable.sol";