Skip to content

FE: use-bounty-publish (escrow publish via shared runner) #601

Description

@0xdevcollins

Context

Part of the Bounty Configure (Host a Bounty) milestone. Wires the publish action: build the escrow request and drive it to completion using the shared escrow runner. Mirrors use-hackathon-publish.ts.

Blueprint to mirror

  • hooks/use-hackathon-publish.ts
  • features/hackathons/api/use-escrow.ts (useEscrowOpRunner)

Tasks

  • hooks/use-bounty-publish.ts building PublishBountyEscrowDto:
    • ownerAddress
    • tokenAddress via lib/config/tokens.ts getTokenAddress('USDC')
    • budget = sum of tier amounts (string, token units)
    • submissionDeadline (unix) from the draft deadline
    • optional applicationCreditCost
    • optional winnerDistribution via shared buildWinnerDistribution
    • fundingMode (MANAGED / EXTERNAL)
    • sourceWalletId if the backend treasury-parity issue lands
  • Reuse useEscrowOpRunner for publish -> (sign if EXTERNAL via lib/wallet/wallet-kit.ts signXdrWithKit) -> submit -> poll. MANAGED returns PENDING_CONFIRM then polls.
  • On COMPLETED, refetch; the bounty has moved draft_awaiting_funding -> open.

Acceptance criteria

  • MANAGED publish on testnet drives draft -> open.
  • EXTERNAL path signs and submits the returned XDR.
  • One winner for a single-claim bounty; the multi-position split for a competition (multiple winners).

Depends on

  • Bounty data layer (escrow client) and the wizard shell.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions