GroupingModule
The Grouping Module is the main entry point for the IPA grouping on Story. It is responsible for:
- Registering a group
- Adding IP to group
- Removing IP from group
- Claiming reward
State Variables
name
Returns the name of the module.
ROYALTY_MODULE
Returns the canonical protocol-wide RoyaltyModule.
LICENSE_TOKEN
Returns the canonical protocol-wide LicenseToken.
GROUP_NFT
Returns the address GROUP NFT contract.
GROUP_IP_ASSET_REGISTRY
Returns the canonical protocol-wide Group IP Asset Registry.
LICENSE_REGISTRY
Returns the canonical protocol-wide LicenseRegistry.
DISPUTE_MODULE
Returns the protocol-wide dispute module.
Functions
initialize
Initializer for this implementation contract.
Parameters:
accessManager
: The address of the protocol admin roles contract.
registerGroup
Registers a Group IPA.
Parameters:
groupPool
: The address of the group pool.
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.
addIp
Adds IP to group. The function must be called by the Group IP owner or an authorized operator.
Parameters:
groupIpId
: The address of the group IP.ipIds
: The IP IDs.maxAllowedRewardShare
: The maximum reward share percentage that can be allocated to each member IP.
removeIp
Removes IP from group. The function must be called by the Group IP owner or an authorized operator.
Parameters:
groupIpId
: The address of the group IP.ipIds
: The IP IDs.
claimReward
Claims reward.
Parameters:
groupId
: The address of the group.token
: The address of the token.ipIds
: The IP IDs.
collectRoyalties
Collects royalties into the pool, making them claimable by group member IPs.
Parameters:
groupId
: The address of the group.token
: The address of the token.
Returns:
royalties
: The amount of royalties collected.
name
Returns the name of the module.
Returns:
string
: The name of the module.
getClaimableReward
Returns the available reward for each IP in the group.
Parameters:
groupId
: The address of the group.token
: The address of the token.ipIds
: The IP IDs.
Returns:
uint256[] memory
: The rewards for each IP.