# Hord Congress Members Registry

## Code

`HordCongressMembersRegistry.sol`

## Address

`HordCongressMembersRegistry` is deployed at [`0x29A5f08a38c79a2dD1DF055792822eB1E163d574`](https://etherscan.io/address/0x29A5f08a38c79a2dD1DF055792822eB1E163d574) on the Ethereum mainnet.

## Overview

Registry of `HordCongress` members.

## Events

### MembershipChanged

```solidity
event MembershipChanged(address member, bool isMember);
```

* Emitted each time when someone is added or removed from members.

## Read-Only Functions

### name

```solidity
function name() external view returns (string memory);
```

* Returns the name of the contract. \[`HordCongressMembersRegistry`]

### hordCongress

```solidity
function hordCongress() external view returns (address);
```

* Returns the address of `HordCongress` contract.

### address2Member

```solidity
function address2Member(address account) external view returns (Member memory);
```

* Returns name of the `account` and since he has been a member of the congress .

### allMembers

```solidity
function allMembers(uint accountId) external view returns (address);
```

* Returns the address of specific `accountId`.

### isMember

```solidity
function isMember(address _address) external view returns (bool);
```

* Returns true/false depending on whether the `_address` is a member of congress or not.

### getNumberOfMembers

```solidity
function getNumberOfMembers() external view returns (uint);
```

* Returns how many members are currently in congress.

### getAllMemberAddresses

```solidity
function getAllMemberAddresses() external view returns (address[] memory);
```

* Returns addresses of all members in congress.

### getMemberInfo

```solidity
function getMemberInfo(address _member) external view returns (address, bytes32, uint);
```

* Returns address and name of the `_member` and since he has been a member of the congress.

### getMinimalQuorum

```solidity
function getMinimalQuorum() external view returns (uint256);
```

* Returns what is the minimum number of votes needed for the proposal to be executed.

## State-Changing Functions

### changeMinimumQuorum

```solidity
function changeMinimumQuorum(uint newMinimumQuorum) external onlyHordCongress;
```

* One time call function to set address of `HordCongressMembersRegistry` contract.

### addMember

```solidity
function addMember(address targetMember, bytes32 memberName) external onlyHordCongress;
```

* Add `targetMember` to congress.
* Emits a `MembershipChanged` event.

### removeMember

```solidity
function removeMember(address targetMember) external onlyHordCongress;
```

* Remove `targetMember` from congress.
* Emits a `MembershipChanged` event.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hord.fi/protocol/smart-contracts/hord-congress-members-registry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
