Skip to content

feat(Group): add add_ips_to_group and remove_ips_from_group#196

Merged
chao-peng-story merged 3 commits intomainfrom
feature/add-ips-to-group-and-remove-ips-from-group
Feb 26, 2026
Merged

feat(Group): add add_ips_to_group and remove_ips_from_group#196
chao-peng-story merged 3 commits intomainfrom
feature/add-ips-to-group-and-remove-ips-from-group

Conversation

@chao-peng-story
Copy link
Collaborator

  • GroupingModule client: add removeIp and build_removeIp_transaction
  • Group: add add_ips_to_group(group_ip_id, ip_ids, max_allowed_reward_share_percentage=100, tx_options)
  • Group: add remove_ips_from_group(group_ip_id, ip_ids, tx_options)
  • Unit tests for both methods (invalid args, success, default/zero reward share, tx failure)
  • Integration tests: add_ips_to_group, remove_ips_from_group, add then remove

- GroupingModule client: add removeIp and build_removeIp_transaction
- Group: add add_ips_to_group(group_ip_id, ip_ids, max_allowed_reward_share_percentage=100, tx_options)
- Group: add remove_ips_from_group(group_ip_id, ip_ids, tx_options)
- Unit tests for both methods (invalid args, success, default/zero reward share, tx failure)
- Integration tests: add_ips_to_group, remove_ips_from_group, add then remove
- Group: return tx_receipt in add_ips_to_group/remove_ips_from_group; add get_added_ip_to_group_events and get_removed_ip_from_group_events for chain verification
- Integration tests: verify on-chain state via AddedIpToGroup/RemovedIpFromGroup events and get_claimable_reward
- transaction_utils: refactor build_and_send_transaction (extract helpers, retry on replacement underpriced/nonce too low with same nonce + higher gas); add nonce validation in encodedTxDataOnly path
- addIp: validate groupId/ipIds not disputed, ipIds not registered groups
  - DisputeModuleClient.isIpTagged, IPAssetRegistryClient.isRegisteredGroup
- removeIp: validate group not frozen (no derivative IPs, no minted license tokens)
  - LicenseRegistryClient.hasDerivativeIps, LicenseTokenClient.getTotalTokensByLicensor
- Add LicenseTokenClient and DisputeModuleClient to Group
- Unit tests for new validations
@chao-peng-story chao-peng-story merged commit de678f5 into main Feb 26, 2026
15 checks passed
@chao-peng-story chao-peng-story deleted the feature/add-ips-to-group-and-remove-ips-from-group branch February 26, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants