Skip to content

feat(launch): handle the mandatory 1M $CLAWNCH burn across all launch surfaces (v0.19.0) - #46

Merged
clawnchdev merged 3 commits into
mainfrom
feat/mandatory-burn
Jun 10, 2026
Merged

feat(launch): handle the mandatory 1M $CLAWNCH burn across all launch surfaces (v0.19.0)#46
clawnchdev merged 3 commits into
mainfrom
feat/mandatory-burn

Conversation

@clawnchdev

Copy link
Copy Markdown
Owner

Why

The Clawnch launchpad now requires a verified 1,000,000+ $CLAWNCH burn for every launch (clawnchdev/clawnch#7). /api/prepare/deploy and /api/deploy reject no-burn deploys with HTTP 402:

{"ok":false,"code":"burn_required","meta":{"minBurnTokens":"1000000","burnAddress":"0x000000000000000000000000000000000000dEaD"}}

clawmes still treated the burn as an optional vault-allocation perk. The failure mode today:

  1. A burn-less /launch confirm gets the 402, which lib/http's tenacity predicate retries 3× with backoff (despite the module docstring promising 4xx is never retried)
  2. _reclassify has no 402/burn_required mapping, so the raw httpx.HTTPStatusError bubbles up
  3. The user sees Prepare failed: Client error '402 Payment Required' — no mention of the burn, the amount, or the address
  4. The clawnch_launch LLM tool has no burn_tx_hash param at all, so that surface can't launch under the new rules, period

What changed

services/clawnch.py

  • ClawnchError gains a meta dict (carries minBurnTokens / burnAddress from upstream)
  • _reclassify maps HTTP 402 / burn_required / BURN_PAYMENT_REQUIREDburn_required with meta
  • prepare_deploy's ok:false map handles burn_required on 2xx bodies too

commands/launch.pyburn_required renders exact burn instructions on all four surfaces (confirm non-custodial + custodial, check, export): required amount, dead address, the /launch burn <amount|tx_hash> next step, and the vault % the same burn earns. Help text reframed (burn = required, vault = bonus).

tools/clawnch_launch.py — new burn_tx_hash schema param forwarded to deploy(); burn_required errors include retry instructions; bypass copy corrected 0.001 → 0.005 ETH (the actual default).

lib/http.py — retry predicate now skips all 4xx (5xx + transport errors keep the existing backoff). A burn-less prepare fails in one request instead of three.

Docs — README launch section, clawnch-launch skill (drops "free deploys", adds a Launch cost section + burn_required/invalid_burn recovery), plugin.yaml (both copies), /burn + /launch usage text.

Tests

  • burn_required mapping with + without meta, BURN_PAYMENT_REQUIRED legacy hint, bare-402 fallback (test_clawnch.py)
  • Command rendering on confirm/check/export (test_launch.py)
  • Tool burn_tx_hash passthrough + error copy (test_clawnch_launch.py)
  • 4xx-never-retried (400/402/404/429) + 5xx-still-retried (test_http_request.py)

4658 passed, 8 skipped · ruff clean · verified live: GET /api/prepare/deploy without burnTxHash → 402 burn_required with the documented meta shape.

Version

0.18.2 → 0.19.0 (_version.py + both plugin.yaml copies + pyproject.toml, changelog entry under Keep-a-Changelog format).

… surfaces (v0.19.0)

The launchpad now rejects every no-burn deploy with HTTP 402
{code: burn_required, meta: {minBurnTokens, burnAddress}}. clawmes
treated the burn as an optional vault perk — a burn-less confirm
surfaced as a raw 'Client error 402 Payment Required' after 3
pointless tenacity retries, and the clawnch_launch tool had no way
to pass a burn hash at all.

- services/clawnch: ClawnchError gains meta; burn_required
  classification in _reclassify (402 / burn_required /
  BURN_PAYMENT_REQUIRED) and in prepare_deploy's ok:false map
- commands/launch: burn_required renders exact burn instructions
  (amount, dead address, /launch burn next step, vault upside) in
  confirm (both paths), check, and export
- tools/clawnch_launch: new burn_tx_hash schema param forwarded to
  deploy(); burn_required errors include retry instructions; bypass
  copy corrected to the real 0.005 ETH default
- lib/http: stop retrying 4xx (docstring always promised it; the
  predicate retried every HTTPStatusError) — 5xx + transport keep
  backoff
- docs: README, clawnch-launch skill, plugin.yaml (both copies),
  /burn + /launch help reframed: burn required, vault is the bonus

Tests: burn_required mapping w/ + w/o meta, BURN_PAYMENT_REQUIRED
legacy hint, bare-402 fallback, command rendering on all four
surfaces, tool passthrough + error copy, 4xx-no-retry + 5xx-retry.
4658 passed, ruff clean.
CI enforces 100% coverage; the except ValueError in
_render_burn_required (meta.minBurnTokens not an int) was the only
uncovered branch.
@clawnchdev
clawnchdev merged commit 75e4478 into main Jun 10, 2026
4 checks passed
@clawnchdev
clawnchdev deleted the feat/mandatory-burn branch June 10, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant