Closes #188, #189, #193, #195: dispute arbitration, admin rotation, creator volume cap, KYC for recipients#240
Merged
Kingsman-99 merged 2 commits intoJun 24, 2026
Conversation
…ar-split#195: dispute arbitration, admin rotation, creator volume cap, KYC for recipients - Stellar-split#188: Add arbiter/disputed fields, raise_dispute/resolve_dispute functions - Stellar-split#189: Add propose_admin/accept_admin admin rotation - Stellar-split#193: Add creator volume cap with set/get functions + creation-time check - Stellar-split#195: Wire require_kyc through _create_invoice_inner, validate recipients at creation
|
@Ebuka321 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! 🚀 |
7 tasks
Kingsman-99
pushed a commit
that referenced
this pull request
Jun 26, 2026
Implements get_invoice_storage_footprint(env, invoice_id) -> u32 as requested in issue #240. This pure view function (no auth required) returns the minimum remaining TTL (in ledgers) across an invoice's persistent storage entries: - invoice core (inv key) - invoice_ext (inv_ext key) - invoice_ext2 (inv_ex2 key) - audit_log (log key) Returns 0 for archived invoices (stored in instance storage) or nonexistent invoices, serving as a sentinel value for ease of use. Acceptance Criteria Met: ✓ Returns minimum TTL across core/ext/ext2/audit-log storage entries ✓ Pure view function with no mutation or auth requirement ✓ Returns sensible value (0) for archived invoices ✓ Comprehensive test coverage including: - TTL decrease as ledger advances - TTL increase after extend_ttl operations - Archived invoice handling - Nonexistent invoice handling - Multiple storage key verification
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.
Closes #188
Closes #189
Closes #193
Closes #195
Summary
Implements 4 issues:
Build dispute arbitration with neutral third-party resolver #188 - Dispute Arbitration: Adds
arbiteranddisputedfields toInvoiceExt2. New functions:set_arbiter(admin sets arbiter per invoice),raise_dispute(arbiter blocks all actions),resolve_dispute(arbiter chooses release or refund). Dispute guards added to all state-mutating functions.Implement admin address rotation with two-step handoff #189 - Admin Rotation: Adds
propose_admin(current admin proposes new admin) andaccept_admin(pending admin accepts). Uses apending_adminstorage key for two-phase transfer.Add per-creator daily volume cap #193 - Creator Volume Cap: Admin can set per-creator volume caps via
set_creator_volume_cap. Enforced at invoice creation time — the total amount across all invoices by a creator cannot exceed the cap. Query withget_creator_volume_cap/get_creator_volume_used.Implement recipient KYC tier enforcement #195 - KYC for Recipients:
require_kycfield already existed onInvoiceOptions/InvoiceExt2/Invoicebut was hardcoded tofalse. Now wired through_create_invoice_innerand all callers, with recipient KYC verification against the configured KYC contract at creation time.Changes
contracts/split/src/types.rs: Addedarbiter: Option<Address>anddisputed: booltoInvoiceExt2andInvoice, updatedsplit()/assemble()/from_legacy()contracts/split/src/lib.rs: 269 lines added — storage keys, admin rotation, volume cap enforcement, dispute functions + guards, require_kyc wiring