Skip to content

feat: add batch dividend claim for multi-creator collection#527

Merged
Chucks1093 merged 3 commits into
accesslayerorg:mainfrom
JamesVictor-O:feat/batch-claim-dividend
Jun 29, 2026
Merged

feat: add batch dividend claim for multi-creator collection#527
Chucks1093 merged 3 commits into
accesslayerorg:mainfrom
JamesVictor-O:feat/batch-claim-dividend

Conversation

@JamesVictor-O

Copy link
Copy Markdown
Contributor

Summary

  • Adds batch_claim_dividend(creators: Vec<Address>, holder: Address) -> Vec<ClaimResult> entrypoint that lets a holder collect dividends from multiple creators in a single transaction
  • Each claim is independent — zero-balance creators return amount_claimed: 0 without reverting
  • Enforces a 20-creator limit per call to bound execution cost (BatchClaimExceedsLimit error)
  • Emits individual div_claim events for each successful claim within the batch

Test plan

  • Happy path: claims from multiple creators return correct amounts
  • Zero claimable returns 0, does not revert the batch
  • Claimable balances zeroed after batch completes
  • More than 20 creator IDs reverts with BatchClaimExceedsLimit
  • Exactly 20 creator IDs succeeds
  • Empty creator list returns empty results
  • Individual zero claims do not affect other claims in the batch
  • Paused protocol rejects batch claims
  • Existing claim_dividend tests still pass (no regression)

Closes #521

@Chucks1093

Copy link
Copy Markdown
Contributor

Once CI is complete, I will review and make my final decision

@Chucks1093 Chucks1093 merged commit e9f5308 into accesslayerorg:main Jun 29, 2026
1 check passed
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.

Add batch dividend claim so holders can collect earnings from multiple creators in one transaction

2 participants