Skip to content

Commit 206e559

Browse files
committed
latest updates
1 parent 9e8e049 commit 206e559

18 files changed

Lines changed: 573 additions & 121 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Spec-aligned (new) pipeline:
1111
- Contracts generator: `packages/generator` (single-contract, mapping-based CRUD `App.sol`, Solidity 0.8.24).
1212
- CLI: `packages/cli` (`th init|studio|validate|import-legacy|generate|build|deploy|verify|doctor`).
1313
- Build output: `th build <schema> --out <dir>` writes `contracts/App.sol`, `compiled/App.json`, `schema.json`, `manifest.json`.
14-
- Deploy: `th deploy <buildDir> --chain anvil|sepolia` (anvil + sepolia supported).
14+
- Deploy: `th deploy <buildDir> --chain anvil|sepolia|filecoin_calibration|filecoin_mainnet` (all supported).
15+
- Runtime tx mode: `manifest.extensions.tx.mode` supports `userPays|sponsored`; `th build/th up` support `--tx-mode auto|userPays|sponsored`.
1516

1617
Legacy (deprecated path; no longer source-of-truth in this repo):
1718
- Input: legacy `contracts.json` shape (`contracts{}` with `fields`, `initRules`, `readRules`, `writeRules`).
@@ -150,6 +151,7 @@ Goal: replace ad-hoc scripts with a coherent CLI that runs locally and in CI.
150151
Phase 5 progress (done/partial):
151152
- Implemented: `th init`, `th studio` (local schema builder), `th validate`, `th import-legacy`, `th generate` (contracts + UI), `th build`, `th deploy`, `th verify` (Sourcify + Etherscan), `th doctor`, `th up|run|dev`.
152153
- `th generate --with-tests` emits generated app test scaffold and generated app CI workflow.
154+
- Local preview now supports a sponsored relay endpoint (`/__tokenhost/relay`) for anvil, with faucet gated off when tx mode is `sponsored`.
153155

154156
Remaining:
155157
- `th publish` (if/when in scope).

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ Execution backlog and current gap-tracking is in `AGENTS.md`.
1111
- Legacy frontend continuity lives in `tokenhost/app-tokenhost-com-frontend`.
1212
- Preserved migration/behavior notes: `docs/legacy-tokenhost-web-template-notes.md`.
1313

14+
## First-class chain targets
15+
16+
- `anvil`
17+
- `sepolia`
18+
- `filecoin_calibration`
19+
- `filecoin_mainnet`
20+
1421
## Current generated-app testing model
1522

1623
- `th generate <schema> --with-tests` emits generated app tests and a generated app CI workflow.
@@ -46,3 +53,25 @@ Use `th verify <buildDir>` after deployment to verify on Sourcify and/or Ethersc
4653
- Writes verification status back into `manifest.json` under `deployments[*].verified`
4754
and `manifest.extensions.verification[chainId]`.
4855
- Re-publishes manifest into `ui-site/` when present.
56+
57+
## Transaction modes (generated UI)
58+
59+
Builder supports transaction mode metadata in `manifest.extensions.tx`:
60+
61+
- `userPays`: browser wallet signs/sends writes directly.
62+
- `sponsored`: generated UI posts writes to a relay endpoint.
63+
64+
CLI controls:
65+
66+
- `th build <schema> --tx-mode auto|userPays|sponsored`
67+
- `th up <schema> --tx-mode auto|userPays|sponsored`
68+
69+
Default `auto` behavior:
70+
71+
- anvil/local chain => `sponsored`
72+
- other chains => `userPays`
73+
74+
Local preview endpoints:
75+
76+
- `GET/POST /__tokenhost/relay` for sponsored local writes (anvil).
77+
- `GET/POST /__tokenhost/faucet` remains available for non-sponsored local mode.

0 commit comments

Comments
 (0)