Commit 7c32e54
feat(deploy): on-chain binary publish + reusable publish workflow (CD-loop publish side) (#160)
* chore(deploy): record v0 publish for trading blueprints + race-fix in publish-binary
* blueprints.tsv: replace "no_v0_published" with "v0=<sha>; release=v0.1.3" for
ids 13/14/15/16 — all four ai-trading blueprints now have a genesis binary
version on-chain (Base Sepolia, setActiveBinaryVersion confirmed).
* publish-binary.sh: poll getBinaryVersionCount up to 5x after publishBinaryVersion
to ride out the read-back gap immediately following cast send (where the call
occasionally still sees stale state and parses to 0 → version_id=-1 → setActive
reverts). Fail loudly with a clear error if the publish landed but the read
still says 0 after retries.
* feat(script): RequestTradingService — register+request+approve service in one shot
Reusable operator go-live script for any blueprint, compiled against tnt-core's
own ITangle interfaces so selectors always match the deployment (the reliable
path when cargo-tangle bindings are version-skewed — symptom UnknownSelector on
requestService). Env-driven: TANGLE_CORE / BLUEPRINT_ID / OPERATOR_KEY /
OPERATOR_ADDR / OPERATOR_PUBKEY / OPERATOR_RPC. Proven: ai-trading blueprint 13,
service 0 ACTIVE on Base Sepolia.
* feat(deploy): make publish-blueprint-binary reusable via workflow_call
Add a workflow_call trigger alongside workflow_dispatch so a blueprint
repo's release CI can invoke the on-chain publish directly. Inputs mirror
the manual trigger; PUBLISH_RPC_URL and BLUEPRINT_OWNER_KEY are exposed as
workflow_call secrets so the owner key stays in tnt-core. The shared job
reads inputs.*/secrets.* identically for both triggers.
* refactor(script): generalize RequestTradingService → RequestService (blueprint-agnostic)
The script is generic protocol ops (registerOperator → requestService →
approveService for any BLUEPRINT_ID env). Only its name/comments were
trading-specific; rename + de-trading the docs so tnt-core stays
blueprint-agnostic. Logic unchanged.
---------
Co-authored-by: Drew Stone <drewstone329@gmail.com>1 parent ea604fd commit 7c32e54
2 files changed
Lines changed: 111 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
41 | 77 | | |
42 | 78 | | |
43 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments