Skip to content

Support FOC Platform registry lifecycle generation or wrapper mode #80

Description

@snissn

Goal

Design and implement the Token Host Builder path for a custom FOC Platform contract module, or explicitly document the boundary where generated UI wraps a hand-written FocPlatformRegistry contract.

Parent tracker: FIL-Builders/foc-platform#3
Platform spec source: FIL-Builders/foc-platform spec.md section 6.7 and section 10.

Scope

Evaluate and implement the smallest generated module that can preserve the FOC Platform v1 contract/API semantics:

  • requestUpload
  • startUpload
  • finalizeUpload
  • failUpload
  • cancelUpload
  • expireUpload
  • coordinator and relayer allowlists
  • idempotency by (accountId, idempotencyKey)
  • quota/cost reservation and release semantics
  • compact receipt, copy receipt, dataset record, and usage structs/events
  • section 6.7 custom errors and terminal state behavior

If full generation is too large for the first pass, produce a documented adapter mode where Token Host Builder generates ABI-bound UI/read/admin surfaces around a hand-written registry.

Non-Goals

  • Do not weaken the FOC Platform lifecycle to fit generic CRUD generation.
  • Do not implement smart-account payer, contract treasury payer, or proof/challenge finalization unless separately scoped.
  • Do not make this dependent on a production upload runner.

Milestones

  1. Produce a design note comparing generic CRUD, generated FOC module, and hand-written registry wrapper options.
  2. Implement the selected first increment.
  3. Add Solidity generation/compile tests or ABI-wrapper tests, depending on the selected mode.
  4. Add docs describing what is production-compatible and what remains prototype-only.

Required Evidence

  • Tests proving generated or wrapped surfaces preserve section 6.7 lifecycle and access-control expectations for the implemented increment.
  • PR notes listing any section 6.7 semantics still hand-written or unsupported.
  • Gas/contract-size evidence if generated production Solidity is added.

Completion Criteria

This issue is complete when Token Host Builder has a concrete, tested path for FOC Platform lifecycle semantics: either a generated FOC module for the supported subset or a clearly documented hand-written registry wrapper mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions