Skip to content

#153 Contract: Implement Payment Batching Contract#245

Open
olaayoade27-coder wants to merge 1 commit into
Fracverse:masterfrom
olaayoade27-coder:feature/payment-batch
Open

#153 Contract: Implement Payment Batching Contract#245
olaayoade27-coder wants to merge 1 commit into
Fracverse:masterfrom
olaayoade27-coder:feature/payment-batch

Conversation

@olaayoade27-coder
Copy link
Copy Markdown

@olaayoade27-coder olaayoade27-coder commented May 29, 2026

pr closes #153

Summary

Implements the Payment Batching Contract for issue #153.

Changes

  • contracts/payment-batch/Cargo.toml — new crate definition
  • contracts/payment-batch/src/lib.rs — contract implementation
  • contracts/payment-batch/src/test.rs — test suite

Acceptance Criteria Met

  • ✅ Supports batching up to 10 payments per transaction (MAX_BATCH_SIZE = 10)
  • ✅ Partial failure handling — each payment uses try_transfer, failures don't abort
    the batch
  • ✅ Gas optimized — no panics/rollbacks mid-batch, minimal allocations
  • ✅ Event emitted for every payment (success or failure) via batchpay event

Tests

  • test_batch_payments_success_and_event_emission — verifies successful batch and
    event count
  • test_batch_payment_partial_failure — verifies failed payments don't block others
  • test_batch_size_limit — verifies rejection when batch exceeds 10

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@olaayoade27-coder Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ONEONUORA
Copy link
Copy Markdown
Contributor

@olaayoade27-coder Pls stick to your issue description
Implement only the payment batching contract

@ONEONUORA
Copy link
Copy Markdown
Contributor

@olaayoade27-coder Update on this issue

@olaayoade27-coder
Copy link
Copy Markdown
Author

@ONEONUORA update has been made please confirm

@ONEONUORA
Copy link
Copy Markdown
Contributor

@olaayoade27-coder
Pls why deleting 9025 lines of code
Your implementation does not require you to modified 323 files
Pls work on only your issues description

Sync with main branch before solving the issue
Read your issue description properly

@olaayoade27-coder
Copy link
Copy Markdown
Author

@ONEONUORA please i have made an update on this like you told me to confirm its all done

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.

Contract: Implement Payment Batching Contract

2 participants