> ## Documentation Index
> Fetch the complete documentation index at: https://docs.story.foundation/llms.txt
> Use this file to discover all available pages before exploring further.

# GroupIPAssetRegistry

The GroupIPAssetRegistry manages the registration and tracking of Group IP Assets (IPAs), including the group members and reward pools. It provides functionality for registering groups, managing group membership, and handling group reward pools.

## State Variables

### MAX\_GROUP\_SIZE

```solidity theme={null}
uint256 public constant MAX_GROUP_SIZE = 1000
```

The maximum number of members allowed in a group.

### GROUPING\_MODULE

```solidity theme={null}
IGroupingModule public immutable GROUPING_MODULE
```

The address of the protocol-wide Grouping Module.

## Functions

### registerGroup

```solidity theme={null}
function registerGroup(
    address groupNft,
    uint256 groupNftId,
    address rewardPool,
    address registerFeePayer
) external onlyGroupingModule whenNotPaused returns (address groupId)
```

Registers a Group IPA.

**Parameters:**

* `groupNft`: The address of the group NFT.
* `groupNftId`: The ID of the group NFT.
* `rewardPool`: The address of the group reward pool.
* `registerFeePayer`: The address of the account that pays the registration fee.

**Returns:**

* `groupId`: The address of the newly registered Group IPA.

### whitelistGroupRewardPool

```solidity theme={null}
function whitelistGroupRewardPool(address rewardPool, bool allowed) external onlyGroupingModule whenNotPaused
```

Whitelists a group reward pool.

**Parameters:**

* `rewardPool`: The address of the group reward pool.
* `allowed`: Whether the group reward pool is whitelisted.

### addGroupMember

```solidity theme={null}
function addGroupMember(address groupId, address[] calldata ipIds) external onlyGroupingModule whenNotPaused
```

Adds members to a Group IPA.

**Parameters:**

* `groupId`: The address of the Group IPA.
* `ipIds`: The addresses of the IPs to add to the Group IPA.

### removeGroupMember

```solidity theme={null}
function removeGroupMember(address groupId, address[] calldata ipIds) external onlyGroupingModule whenNotPaused
```

Removes members from a Group IPA.

**Parameters:**

* `groupId`: The address of the Group IPA.
* `ipIds`: The addresses of the IPs to remove from the Group IPA.

### isRegisteredGroup

```solidity theme={null}
function isRegisteredGroup(address groupId) external view returns (bool)
```

Checks whether a group IPA was registered based on its ID.

**Parameters:**

* `groupId`: The address of the Group IPA.

**Returns:**

* `isRegistered`: Whether the Group IPA was registered into the protocol.

### getGroupRewardPool

```solidity theme={null}
function getGroupRewardPool(address groupId) external view returns (address)
```

Retrieves the group reward pool for a Group IPA.

**Parameters:**

* `groupId`: The address of the Group IPA.

**Returns:**

* `rewardPool`: The address of the group reward pool.

### isWhitelistedGroupRewardPool

```solidity theme={null}
function isWhitelistedGroupRewardPool(address rewardPool) external view returns (bool isWhitelisted)
```

Checks whether a group reward pool is whitelisted.

**Parameters:**

* `rewardPool`: The address of the group reward pool.

**Returns:**

* `isWhitelisted`: Whether the group reward pool is whitelisted.

### getGroupMembers

```solidity theme={null}
function getGroupMembers(
    address groupId,
    uint256 startIndex,
    uint256 size
) external view returns (address[] memory results)
```

Retrieves the group members for a Group IPA.

**Parameters:**

* `groupId`: The address of the Group IPA.
* `startIndex`: The start index of the group members to retrieve.
* `size`: The size of the group members to retrieve.

**Returns:**

* `results`: The addresses of the group members.

### containsIp

```solidity theme={null}
function containsIp(address groupId, address ipId) external view returns (bool)
```

Checks whether an IP is a member of a Group IPA.

**Parameters:**

* `groupId`: The address of the Group IPA.
* `ipId`: The address of the IP.

**Returns:**

* `isMember`: Whether the IP is a member of the Group IPA.

### totalMembers

```solidity theme={null}
function totalMembers(address groupId) external view returns (uint256)
```

Retrieves the total number of members in a Group IPA.

**Parameters:**

* `groupId`: The address of the Group IPA.

**Returns:**

* `totalMembers`: The total number of members in the Group IPA.
