ArrayUtils

Git Source

Functions

resizeArray

Resizes the array to size, reverts if size > array.length

It is not safe to increase array size this way

function resizeArray(uint8[] memory array, uint256 size) internal pure;

resizeArray

Resizes the array to size, reverts if size > array.length

It is not safe to increase array size this way

function resizeArray(uint256[] memory array, uint256 size) internal pure;

resizeArray

Resizes the array to size, reverts if size > array.length

It is not safe to increase array size this way

function resizeArray(address[] memory array, uint256 size) internal pure;

revertIfTryingToExpand

Reverts if trying to expand array size, as increasing array size through inline assembly is not safe

function revertIfTryingToExpand(uint256 currentLength, uint256 targetSize) internal pure;

Errors

ArrayUtils__ArrayCannotExpand

Thrown when attempting to increase array size

error ArrayUtils__ArrayCannotExpand(uint256 arrayLength, uint256 size);