Skip to main content

Addresslist

Description

The majority voting implementation using a list of member addresses.

This contract inherits from MajorityVotingBase and implements the IMajorityVoting interface.

Implementation

error InvalidAddresslistUpdate

Thrown when the address list update is invalid, which can be caused by the addition of an existing member or removal of a non-existing member.

error InvalidAddresslistUpdate(address member)
InputTypeDescription
memberaddressThe array of member addresses to be added or removed.

public function isListedAtBlock

Checks if an account is on the address list at a specific block number.

function isListedAtBlock(address _account, uint256 _blockNumber) public view virtual returns (bool)
InputTypeDescription
_accountaddressThe account address being checked.
_blockNumberuint256The block number.
Output
0boolWhether the account is listed at the specified block number.

public function isListed

Checks if an account is currently on the address list.

function isListed(address _account) public view virtual returns (bool)
InputTypeDescription
_accountaddressThe account address being checked.
Output
0boolWhether the account is currently listed.

public function addresslistLengthAtBlock

Returns the length of the address list at a specific block number.

function addresslistLengthAtBlock(uint256 _blockNumber) public view virtual returns (uint256)
InputTypeDescription
_blockNumberuint256The specific block to get the count from. If 0, then the latest checkpoint value is returned.
Output
0uint256The address list length at the specified block number.

public function addresslistLength

Returns the current length of the address list.

function addresslistLength() public view virtual returns (uint256)
OutputTypeDescription
0uint256The current address list length.

internal function _addAddresses

Internal function to add new addresses to the address list.

function _addAddresses(address[] _newAddresses) internal virtual
InputTypeDescription
_newAddressesaddress[]The new addresses to be added.

internal function _removeAddresses

Internal function to remove existing addresses from the address list.

function _removeAddresses(address[] _exitingAddresses) internal virtual
InputTypeDescription
_exitingAddressesaddress[]The existing addresses to be removed.
© 2024