chore: add initial setup comment to lib.rs#397
Merged
Haroldwonder merged 6 commits intoHaroldwonder:mainfrom Mar 30, 2026
Merged
chore: add initial setup comment to lib.rs#397Haroldwonder merged 6 commits intoHaroldwonder:mainfrom
Haroldwonder merged 6 commits intoHaroldwonder:mainfrom
Conversation
|
@Fidelis900 is attempting to deploy a commit to the Harold's projects Team on Vercel. A member of the Team first needs to authorize it. |
…rty arbitration window - Added DisputeWindow storage key and get/set_dispute_window() (default 72h) - Added DisbursedAmount, AgentDailyCap, AgentWithdrawals storage keys - mark_failed(): agent marks payout failed, records failed_at timestamp - raise_dispute(): sender challenges within window, transitions to Disputed - resolve_dispute(): admin resolves in favour of sender (refund) or agent (payout) - set_dispute_window() / get_dispute_window() public admin functions - New events: emit_dispute_raised, emit_dispute_resolved, emit_remittance_failed - New errors: DisputeWindowExpired (53), AlreadyDisputed (54), NotDisputed (55)
…ple disbursements - confirm_partial_payout(remittance_id, amount): disburses partial amount to agent - DisbursedAmount(u64) storage key tracks total disbursed per remittance - First call transitions Pending → Processing; final disbursement → Completed - Enforces per-agent daily cap on each partial disbursement - Emits emit_partial_payout event with running disbursed total - Amount validation: partial amount must not exceed remaining net payout
- AgentDailyCap(Address) persistent storage key per agent - AgentWithdrawals(Address) rolling 24h withdrawal records per agent - set_agent_daily_cap(agent, cap): admin sets cap (0 = no cap) - get_agent_daily_cap(agent): query current cap - check_and_record_agent_withdrawal(): enforced in confirm_payout and confirm_partial_payout - Emits emit_agent_cap_set event on cap change - Returns DailySendLimitExceeded if rolling window total would exceed cap
…integration - ramp-provider.ts: RampProvider interface + TransakProvider + MoonPayProvider adapters - HMAC-SHA256 signature verification for both providers - Normalises provider-specific payloads into canonical RampOrderEvent - Provider registry: registerProvider / getProvider / listProviders - ramp-event-hooks.ts: RampEventHooks singleton (rampHooks) - on/off/emit API for order.pending/processing/completed/failed/refunded/cancelled - hookNameForStatus() maps RampOrderStatus → RampHookName - ramp-webhook-handler.ts: Express route POST /webhooks/ramp/:provider - Raw body capture for signature verification - Provider lookup, signature check, event parse, hook emit - setupRampWebhookRoutes() wires into any Express app
|
@Fidelis900 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.
closes #361
closes #362
closes #360
closes #363
Feature 1 — Dispute Flow (dde618f)
Files: src/lib.rs, src/storage.rs, src/events.rs
transitions to Disputed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Feature 2 — Partial Payouts (9168725)
Files: src/lib.rs, src/storage.rs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Feature 3 — Per-Agent Daily Caps (68a98f4)
Files: src/lib.rs, src/storage.rs
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Feature 4 — Ramp Event Hooks (0a91abc)
Files: backend/src/ramp-provider.ts, backend/src/ramp-event-hooks.ts, backend/src/ramp-webhook-handler.ts