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
- Produce a design note comparing generic CRUD, generated FOC module, and hand-written registry wrapper options.
- Implement the selected first increment.
- Add Solidity generation/compile tests or ABI-wrapper tests, depending on the selected mode.
- 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.
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
FocPlatformRegistrycontract.Parent tracker: FIL-Builders/foc-platform#3
Platform spec source:
FIL-Builders/foc-platformspec.mdsection 6.7 and section 10.Scope
Evaluate and implement the smallest generated module that can preserve the FOC Platform v1 contract/API semantics:
requestUploadstartUploadfinalizeUploadfailUploadcancelUploadexpireUpload(accountId, idempotencyKey)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
Milestones
Required Evidence
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.