feat(launch): handle the mandatory 1M $CLAWNCH burn across all launch surfaces (v0.19.0) - #46
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Clawnch launchpad now requires a verified 1,000,000+ $CLAWNCH burn for every launch (clawnchdev/clawnch#7).
/api/prepare/deployand/api/deployreject 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:
/launch confirmgets the 402, whichlib/http's tenacity predicate retries 3× with backoff (despite the module docstring promising 4xx is never retried)_reclassifyhas no 402/burn_requiredmapping, so the rawhttpx.HTTPStatusErrorbubbles upPrepare failed: Client error '402 Payment Required'— no mention of the burn, the amount, or the addressclawnch_launchLLM tool has noburn_tx_hashparam at all, so that surface can't launch under the new rules, periodWhat changed
services/clawnch.pyClawnchErrorgains ametadict (carriesminBurnTokens/burnAddressfrom upstream)_reclassifymaps HTTP 402 /burn_required/BURN_PAYMENT_REQUIRED→burn_requiredwith metaprepare_deploy'sok:falsemap handlesburn_requiredon 2xx bodies toocommands/launch.py—burn_requiredrenders exact burn instructions on all four surfaces (confirmnon-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— newburn_tx_hashschema param forwarded todeploy();burn_requirederrors 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-launchskill (drops "free deploys", adds a Launch cost section +burn_required/invalid_burnrecovery), plugin.yaml (both copies),/burn+/launchusage text.Tests
burn_requiredmapping with + withoutmeta,BURN_PAYMENT_REQUIREDlegacy hint, bare-402 fallback (test_clawnch.py)test_launch.py)burn_tx_hashpassthrough + error copy (test_clawnch_launch.py)test_http_request.py)4658 passed, 8 skipped·ruffclean · verified live:GET /api/prepare/deploywithoutburnTxHash→ 402burn_requiredwith the documented meta shape.Version
0.18.2 → 0.19.0 (
_version.py+ bothplugin.yamlcopies +pyproject.toml, changelog entry under Keep-a-Changelog format).