feat(bounty-escrow): CCI fix all tests + security auth tests#902
Merged
Jagadeeshftw merged 4 commits intoJagadeeshftw:masterfrom Mar 31, 2026
Merged
Conversation
|
@leojay-net is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@leojay-net 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! 🚀 |
Owner
|
Please resolve the confilcts |
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.
Implements Issue #783 (cross-contract interface for bounty_escrow/contracts/escrow) and fixes all related test and runtime bugs discovered during implementation.
Changes:
Fee routing fix — lock_funds and release_funds now correctly use the resolved per-token fee_recipient (from resolve_fee_config) instead of always falling back to the global config when calling route_fee
Gas budget enforcement — batch_lock_funds was silently discarding the GasBudgetExceeded error (let _ =); release_funds and partial_release were missing the gas check entirely; all three are now correctly enforced
Analytics tracking — refund() was not calling monitoring::track_operation, causing operation counts to be under-reported
Emergency withdraw invariant — after emergency_withdraw drains the token balance, all Locked/PartiallyRefunded escrow records are now marked Released with remaining_amount = 0 so INV-2 (sum_active_escrow_balances == token_balance) holds for subsequent operations
Test compilation fixes — 117 errors resolved across 9 test files (missing imports, Escrow struct field additions, update_fee_config arity mismatches, etc.)
Auth forwarding security tests — 7 new tests in test_cross_contract_interface.rs verifying that lock_funds, release_funds, partial_release, set_gas_budget, update_fee_config, and set_paused each require the correct authorisation
Test result: 823 pass / 0 fail / 3 ignored
Closes #783