Skip to main content

AddressStorageArray

Git Source

Title: AddressStorageArray

A library for managing a storage array of addresses, with support for insertion and removal at a specific index

Functions​

insert​

Inserts an address at a specific index

function insert(address[] storage array, address value_, uint256 index_) internal;

Parameters

NameTypeDescription
arrayaddress[]
value_address
index_uint256

remove​

Removes an address at a specific index

function remove(address[] storage array, uint256 index_) internal returns (address);

Parameters

NameTypeDescription
arrayaddress[]
index_uint256

Returns

NameTypeDescription
<none>address

Errors​

AddressStorageArray_IndexOutOfBounds​

error AddressStorageArray_IndexOutOfBounds(uint256 index, uint256 length);

Parameters

NameTypeDescription
indexuint256
lengthuint256