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
The maximum number of members allowed in a group.
GROUPING_MODULE
The address of the protocol-wide Grouping Module.
Functions
registerGroup
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
Whitelists a group reward pool.
Parameters:
rewardPool
: The address of the group reward pool.allowed
: Whether the group reward pool is whitelisted.
addGroupMember
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
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
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
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
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
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
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
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.