Skip to content

feat: per-tx max deduct#595

Merged
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
ola196:feature/max-deduct
Jun 29, 2026
Merged

feat: per-tx max deduct#595
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
ola196:feature/max-deduct

Conversation

@ola196

@ola196 ola196 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor
  • Extract DEFAULT_MAX_DEDUCT constant and check_max_deduct() helper into contracts/vault/src/limits.rs for clear separation of cap logic
  • Re-export from lib.rs (pub mod limits; pub use limits::{...})
  • Replace inline if-checks in deduct() and batch_deduct() with check_max_deduct()
  • Add focused unit tests in test_limits.rs (7 tests: default value, at/below/above cap, edge cases)
  • Update docs/interfaces/vault.json: improve get_max_deduct description, add missing set_max_deduct entry with params, errors, and event docs

Closes #538

- Extract DEFAULT_MAX_DEDUCT constant and check_max_deduct() helper into
  contracts/vault/src/limits.rs for clear separation of cap logic
- Re-export from lib.rs (pub mod limits; pub use limits::{...})
- Replace inline if-checks in deduct() and batch_deduct() with check_max_deduct()
- Add focused unit tests in test_limits.rs (7 tests: default value, at/below/above
  cap, edge cases)
- Update docs/interfaces/vault.json: improve get_max_deduct description, add
  missing set_max_deduct entry with params, errors, and event docs

Closes CalloraOrg#538
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

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

@greatest0fallt1me greatest0fallt1me merged commit 07b3879 into CalloraOrg:main Jun 29, 2026
1 of 6 checks 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 per-tx max-deduct cap

2 participants