Repository navigation
Fix #229 #228 #227 #226: fee charging, negative guard, withdrawal acc… - #324
Merged
hartz0 merged 2 commits intoOct 23, 2026
Merged
Conversation
…ve guard, withdrawal accounting, and batch override audit trail hartz0#228: set_gate_query_fee now rejects negative amounts (returns InvalidScore) and emits gate_query_fee_set (gqf_set) audit event on every fee update. hartz0#227: withdraw_fees rejects amount <= 0 (returns InvalidWithdrawalAmount), checks amount <= accumulated_fees (returns InsufficientFunds), and decrements the accumulated_fees counter on successful withdrawal. hartz0#229: Added query_risk_gate_paid variant that charges the configured per-query fee via SEP-41 token transfer and increments accumulated_fees. query_risk_gate remains infallible and side-effect free (pure read). Documentation updated to clarify side-effect vs pure query semantics. hartz0#226: batch_override_rate_limit now accepts a justification parameter and writes RateLimitOverrideEntry audit records for every modified wallet, matching the compliance guarantees of the single override_rate_limit path. Also: - Added InsufficientFunds error alias (Error enum at 50-variant XDR limit) - Added set_accumulated_fees storage helper - Registered gqf_set event in event_stability.rs - Updated test_rate_limit.rs for new batch_override_rate_limit signature - Added comprehensive tests in test_fee.rs for all 4 issues - Updated .gitignore to exclude test_snapshots/ from version control
|
@cathy4455 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ounting, and batch override audit trail
#228: set_gate_query_fee now rejects negative amounts (returns InvalidScore) and emits gate_query_fee_set (gqf_set) audit event on every fee update.
#227: withdraw_fees rejects amount <= 0 (returns InvalidWithdrawalAmount), checks amount <= accumulated_fees (returns InsufficientFunds), and decrements the accumulated_fees counter on successful withdrawal.
#229: Added query_risk_gate_paid variant that charges the configured per-query fee via SEP-41 token transfer and increments accumulated_fees. query_risk_gate remains infallible and side-effect free (pure read). Documentation updated to clarify side-effect vs pure query semantics.
#226: batch_override_rate_limit now accepts a justification parameter and writes RateLimitOverrideEntry audit records for every modified wallet, matching the compliance guarantees of the single override_rate_limit path.
Also: