Skip to content

feat: implement batch_transfer, batch_mint, batch_approve (#160)#213

Open
paulinaapeh8 wants to merge 2 commits into
BCPathway:mainfrom
paulinaapeh8:feature/160-batch-operations
Open

feat: implement batch_transfer, batch_mint, batch_approve (#160)#213
paulinaapeh8 wants to merge 2 commits into
BCPathway:mainfrom
paulinaapeh8:feature/160-batch-operations

Conversation

@paulinaapeh8
Copy link
Copy Markdown

@paulinaapeh8 paulinaapeh8 commented Jun 1, 2026

  • Add MAX_BATCH_SIZE=50 constant with BatchTooLarge/BatchEmpty errors
  • batch_mint: validate all entries fail-fast, emit batch event, atomic
  • batch_transfer: pre-validate total, handle self-transfer edge case
  • batch_approve: approve multiple spenders atomically, zero revokes
  • Add emit_batch_transfer, emit_batch_mint, emit_batch_approve events
  • Add 24 comprehensive tests covering empty, single, multi, max size, too large, invalid amounts, paused state, overflow, self-transfer, zero-amount revoke
  • SDK: add batchTransfer(), batchApprove(), BatchTransferRecipient, BatchApproveSpender types; export from index.ts
  • Fix pre-existing compile errors: FeeExemption u8->u32, duplicate private helper names, ledger().set() API, missing Ledger trait imports

Summary

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📝 Documentation update
  • 🔧 Smart contract improvement
  • 🧪 Test coverage improvement
  • 🏗️ CI/Build improvement

Related Issue

Closes #

Changes Made

Testing

How has this been tested?

  • Rust unit tests pass (cargo test)
  • SDK compiles (npm run build in sdk/)
  • Manual testing against Soroban testnet
  • New tests added for changes

Test commands run:

# Contract tests
cargo test

# SDK build
cd sdk && npm run build

Checklist

  • My code follows the project's style guidelines
  • I have added NatSpec-style comments to new Rust functions
  • I have added JSDoc comments to new TypeScript functions
  • I have updated the README if needed
  • My branch follows the naming convention: feature/<issue-number>-<description>
  • I have not modified files outside the scope of this issue

Drips.network Contributor Info

  • Drips Profile:
  • Issue Claimed: #

Screenshots (if applicable)

Closes #160

)

- Add MAX_BATCH_SIZE=50 constant with BatchTooLarge/BatchEmpty errors
- batch_mint: validate all entries fail-fast, emit batch event, atomic
- batch_transfer: pre-validate total, handle self-transfer edge case
- batch_approve: approve multiple spenders atomically, zero revokes
- Add emit_batch_transfer, emit_batch_mint, emit_batch_approve events
- Add 24 comprehensive tests covering empty, single, multi, max size,
  too large, invalid amounts, paused state, overflow, self-transfer,
  zero-amount revoke
- SDK: add batchTransfer(), batchApprove(), BatchTransferRecipient,
  BatchApproveSpender types; export from index.ts
- Fix pre-existing compile errors: FeeExemption u8->u32, duplicate
  private helper names, ledger().set() API, missing Ledger trait imports
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@paulinaapeh8 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

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.

Implement batch operations: batch_transfer, batch_mint, and batch_approve

1 participant