feat(contract): pending milestone count, admin timelock transfer, dis… - #362
Merged
Devdave-0x merged 1 commit intoJul 29, 2026
Conversation
…pute count tracking
|
@kelvin1john0901-blip 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.
Summary
Implements three platform-health and security features on the Soroban escrow contract.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Changes
Issue 1 — Pending Milestone Count
Dashboards can now query how many milestones are awaiting approval for a given escrow without fetching and iterating every milestone individually.
Issue 2 — Admin Transfer Timelock
Admin key rotation now uses a mandatory ~48-hour timelock between proposal and acceptance, giving time to detect and cancel an unauthorised change before it
takes effect.
Issue 3 — Dispute Count Tracking
Platform operators can now monitor total disputes filed and per-escrow dispute frequency to assess platform health and arbiter capacity.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Tests
New test modules added:
reject_milestone
cannot cancel; cancelling when no proposal returns E3
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Storage impact
All new keys use FeatDataKey (the overflow enum) to avoid adding to the DataKey XDR schema. Persistent storage entries get TTL bumps consistent with the rest
of the codebase. No migration is required — all new counters default to 0 via unwrap_or(0).
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Breaking changes
None. Existing propose_admin / accept_admin callers will see the timelock enforced — accept_admin called immediately after propose_admin will now return E46
instead of succeeding. Existing tests that called accept_admin without advancing the ledger have been updated to advance by ADMIN_TRANSFER_TIMELOCK_LEDGERS +
1.
closes #276
closes #278
closes #279