From 9e1fdd7ecb22e521e51375544319b7981d5238b5 Mon Sep 17 00:00:00 2001 From: ChainBid Developer Date: Sat, 29 Aug 2026 17:01:12 +0100 Subject: [PATCH] docs: add field-level doc-comments to InvoiceExt (#700) --- contracts/split/src/types.rs | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/contracts/split/src/types.rs b/contracts/split/src/types.rs index 7b06b16..3f8a502 100644 --- a/contracts/split/src/types.rs +++ b/contracts/split/src/types.rs @@ -613,45 +613,85 @@ pub struct InvoiceCore { #[contracttype] #[derive(Clone, Debug)] pub struct InvoiceExt { + /// Addresses whose approval is required before the invoice can be released. pub co_signers: Vec
, + /// How many of `co_signers` approvals are required (≤ `co_signers.len()`). pub required_signatures: u32, + /// Addresses that have actually approved the release so far. pub signatures: Vec
, + /// Optional address permitted to call `approve_release` on behalf of the creator. pub approver: Option
, + /// Whether the release has been approved by the required approvers. pub approved: bool, + /// Optional oracle that must confirm a release condition before funds move. pub condition_oracle: Option
, + /// Whether the `condition_oracle` has signalled the condition is met. pub condition_met: bool, + /// Penalty applied (in basis points) to late payments. pub penalty_bps: u32, + /// Timestamp after which the `penalty_bps` penalty begins to apply. pub penalty_deadline: u64, + /// Minimum funding threshold (basis points) that must be reached before release. pub min_funding_bps: u32, + /// Configured release stages as basis points; empty = release all at once. pub release_stages: Vec, + /// Count of release stages already paid out. pub released_stages: u32, + /// Optional allowlist of payer addresses; `None` = open to anyone. pub allowed_payers: Option>, + /// Optional price oracle used for dynamic (oracle-priced) funding. pub price_oracle: Option
, + /// Cached per-recipient base amounts used during release math. pub base_amounts: Vec, + /// Per-recipient optional output token used for a DEX swap on release. pub swap_tokens: Vec>, + /// Tax levied on the invoice, in basis points. pub tax_bps: u32, + /// Address that receives the tax withheld from the invoice. pub tax_authority: Option
, + /// Insurance premium (basis points) charged on the invoice. pub insurance_premium_bps: u32, + /// Funds held in the insurance pool for this invoice. pub insurance_fund: i128, + /// Whether payouts are routed through a smart-order router for best execution. pub smart_route: bool, + /// When true, release registers the funds with the stream contract instead of a direct transfer. pub convert_to_stream: bool, + /// Additional tokens (beyond the base token) accepted by `pay_with_token`. pub accepted_tokens: Vec
, + /// Optional address that leftover funds are forwarded to on release. pub forward_to: Option
, + /// Optional invoice id that leftover funds are forwarded to on release. pub forward_invoice_id: Option, + /// Per-recipient split rules evaluated at release time; empty = use `amounts`. pub split_rules: Vec, + /// Pre-agreed auto-resolution rules evaluated in order by `auto_resolve`. pub auto_resolve_rules: Vec, + /// Optional creator cosigner that must co-author creator actions. pub creator_cosigner: Option
, + /// Velocity limit (token units) for a single payer over `velocity_window`. pub velocity_limit: i128, + /// Window length (seconds) for velocity limiting of payer contributions. pub velocity_window: u64, + /// Optional id of the parent invoice this one was cloned from. pub parent_invoice_id: Option, + /// Optional human-readable reason the invoice is paused. pub pause_reason: Option, + /// Optional timestamp at which a paused invoice auto-resumes. pub auto_resume_at: Option, + /// Optional per-payer cooldown (seconds) between payments. pub payment_cooldown_secs: Option, + /// Optional maximum number of payments allowed per `payment_window_secs`. pub max_payments_per_window: Option, + /// Optional window (seconds) for per-payer payment rate limiting. pub payment_window_secs: Option, + /// Optional timestamp at which release is scheduled to become available. pub scheduled_release_at: Option, + /// Configured penalty tiers applied at different late-payment thresholds. pub penalty_tiers: Vec, + /// Optional allowlist of callers permitted to invoke mutating entry points. pub allowed_callers: Option>, + /// Grace period (seconds) after `deadline` before a refund is allowed. pub refund_grace_secs: Option, }