Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IAddressList

Git Source

Title: IAddressList

Interface for central address list management in the Apyx protocol

Provides a single source of truth for blocked/allowed addresses across all Apyx contracts

Functions

add

Adds an address to the list

function add(address user) external;

Parameters

NameTypeDescription
useraddressAddress to add

remove

Removes an address from the list

function remove(address user) external;

Parameters

NameTypeDescription
useraddressAddress to remove

contains

Checks if an address is in the list

function contains(address user) external view returns (bool);

Parameters

NameTypeDescription
useraddressAddress to check

Returns

NameTypeDescription
<none>boolTrue if address is in the list, false otherwise

length

Returns the number of addresses in the list

function length() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256Number of addresses

at

Returns the address at the given index

function at(uint256 index) external view returns (address);

Parameters

NameTypeDescription
indexuint256Index of the address to retrieve

Returns

NameTypeDescription
<none>addressAddress at the given index

Events

Added

Emitted when an address is added to the list

event Added(address indexed user);

Parameters

NameTypeDescription
useraddressAddress that was added

Removed

Emitted when an address is removed from the list

event Removed(address indexed user);

Parameters

NameTypeDescription
useraddressAddress that was removed