Skip to content

Clarify on-chain campaign creation in project creation flow #523

Description

@0xdevcollins

Problem

The project creation flow has a gap between off-chain campaign creation and on-chain campaign deployment. It's unclear when/how the campaign is created on-chain and how the `onChainId` is populated.

Current State

  • `CreationFlow` creates campaign via `publishProject()` API
  • `onChainId` is passed as optional parameter but source is unclear
  • No smart wallet signing visible in the creation flow
  • `ProjectFundEscrow.tsx` exists but is unused in the campaign flow
  • Escrow address setup timing is ambiguous

Expected Behavior

The creation flow should clearly:

  1. Step 1: Create campaign off-chain (existing — save draft, details, milestones)
  2. Step 2: Deploy campaign on-chain via `use-crowdfund-contract.ts`
    • Call `createCampaign()` on the registry contract
    • Get back `campaignId` and `escrowAddress`
    • Show signing UI (wallet interaction)
  3. Step 3: Link on-chain and off-chain via `PUT /:id/escrow`
    • Store `onChainId`, `escrowAddress`, `transactionHash`
  4. Step 4: Submit for review (on-chain `submit_for_review()` + backend `publishProject()`)

UI Changes

  • Add a "Deploy to Blockchain" step in the creation wizard
  • Show transaction signing UI
  • Show success state with on-chain ID and escrow address
  • Handle wallet connection and errors gracefully

Acceptance Criteria

  • Clear step-by-step flow from draft → on-chain deployment → submission
  • Wallet signing integrated into creation wizard
  • On-chain ID and escrow address stored after deployment
  • Error recovery if on-chain deployment fails
  • Milestone percentages validated to sum to 100%

Priority

High — The creation-to-deployment bridge is the most critical gap.

Labels

crowdfunding, blockchain, critical

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions