Miscellaneous contracts containing utility functions, often related to working with different data types.
Collection of functions related to the address type,
isContract(address account) → boolinternal
Returns true if
account is a contract.
This test is non-exhaustive, and there may be false-negatives: during the execution of a contract's constructor, its address will be reported as not containing a contract.
> It is unsafe to assume that an address for which this function returns false is an externally-owned account (EOA) and not a contract.
Collection of functions related to array types.
findUpperBound(uint256 array, uint256 element) → uint256internal
Searches a sorted
array and returns the first index that contains
a value greater or equal to
element. If no such index exists (i.e. all
values in the array are stictly less than
element), the array length is
returned. Time complexity O(log n).
array is expected to be sorted in ascending order, and to contain no
Contract module that helps prevent reentrant calls to a function.
ReentrancyGuard will make the
available, which can be aplied to functions to make sure there are no nested
(reentrant) calls to them.
Note that because there is a single
nonReentrant guard, functions marked as
nonReentrant may not call one another. This can be worked around by making
private, and then adding
points to them.