Files
q-fund-v2/docs/RELEASE_NOTES_v1.0.0.md
2025-08-23 19:47:40 -04:00

2.8 KiB
Raw Permalink Blame History

QFund v1.0.0 — Release Notes

Release date: 20250823

Highlights

  • Dual AT support (v1 refund / v2 nonrefund) with creatorselectable payout policy.
  • Awardee address field with validation and optional name resolution.
  • Clear inapp labeling of Status, Awardee, and Payout behavior.
  • Robust dataBytes builder with canonical v1/v2 code bytes and ABI parity.

Changes

1) Dual Crowdfund AT Variants

  • Added a variant toggle during creation: “Refund Donors (if goal not reached)”.
    • Off (default) → v2 nonrefund: pays the awardee even if goal not met.
    • On → v1 refund: refunds donors if the goal is not met.
  • Implementation details:
    • Pinned canonical codeBytes Base64 and codeHash:
      • v1 (refund): codeHash 9gS2L74FdaG3zuEeYv815xVyHkhvLguq7ZGD6pf24i8F, length 167.
      • v2 (nonrefund): codeHash HaqJBVVr9gZqgARZ5UZd7EU9ybyvVK2fCo9sx3gMMFsr, length 104.
    • ABI parity respected:
      • Common: [0..7] sleepMinutes, [8..15] goalAtoms (u64, bigendian).
      • v1: write PAYMENT (2) at [64..71]; awardee at [80..111].
      • v2: awardee at [48..79].
    • Creation parity: codeBytes are immutable; only dataBytes vary per deployment.

2) Awardee Address Input + Validation

  • New optional Awardee field on the creation form.
  • Defaults to creators address if left blank.
  • Validates using /addresses/validate/{address}.
  • If the input appears to be a Qortal name, resolves via GET_NAME_DATA to the owner address, then validates.
  • Address encoding: Base58 decode is written into a 32byte slot; if the decoded length < 32 (typical 25 bytes), the remainder is zerofilled for ABI compatibility.

3) InApp Labels for Donors

  • Crowdfund page now displays:
    • Status (existing),
    • Awardee (with optional name lookup via GET_PRIMARY_NAME),
    • Payout behavior (v1 refund vs v2 nonrefund).

4) Technical: Centralized AT Builder

  • Added src/lib/at/crowdfund.ts with:
    • Pinned code bytes / codeHash constants,
    • Variantaware buildCrowdfundDataBytes() using bigendian u64 writes,
    • qortToAtoms() utility,
    • Optional assertCreationParity() to verify codeBytes hash from creationBytes.

Also included since last prerelease

  • Fix back button

    • Ensures consistent navigation back to the homepage and avoids stale state when returning from crowdfund details.
  • Add multiple name support

    • Accounts with multiple registered names are now supported. We load and show the primary name while retaining the full list for selection.

Developer Notes

  • When adding new variants in future, keep codeBytes immutable and adjust only dataBytes offsets.
  • Unit tests recommended for:
    • BE u64 writes for sleep/goal,
    • v1 payment type constant at byte 64,
    • awardee placement offsets per variant,
    • codeHash parity via assertCreationParity().