feat(cli): bb swap execute — BitBadges-only auto-deploy, throw on Skip:Go-rerouted#249
Merged
Merged
Conversation
…outed `bb swap execute` and `bb swap estimate --execute` take a swap estimate, detect whether the whole route is BitBadges-only (single native gamm SwapExactAmountIn on a bitbadges chain, no Skip:Go rerouting / EVM / IBC leg / WETH redirect), and if so sign+broadcast it by reusing the existing shared deploy signing flags (--browser via the /sign handoff; default emits the signable msg for `| bb deploy`). Optional --track seeds the swap activity row; --force gates flagged routes. Anything routed through another chain still returns the estimate but the execute path throws an explicit NOT_IMPLEMENTED — no orchestrator, no partial execution, no second/EVM keyring (ticket 0440 design). The signable typeUrl is the TxModal alias `gamm/SwapExactAmountIn` the /sign messageTypes registry is keyed by (mirrors the frontend parseSkipGoMsgsToTxInfo) — the proto type URL would be a registry miss. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
trevormil
added a commit
that referenced
this pull request
May 17, 2026
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.
Summary
Implements backlog ticket 0440: closes the estimate→swap gap in
bb swapwithout adding a second keyring or a cross-chain orchestrator.bb swap execute [estimate](stdin-/@file/ inline JSON) andbb swap estimate --execute.SwapExactAmountInon abitbadges-*chain, everyassetPathchainId isbitbadges-*, and there is no Skip:Go reroute / EVM tx / IBC-transfer leg / WETH redirect.addDeployOptionssigning flags. Default (no deploy flag) emits the signable{typeUrl,value}sobb swap execute … | bb deployand scripting keep working;--browserbroadcasts via the canonical/signhandoff.--trackauto-seeds the swap activity row;--forcegates compliance/low-liquidity-flagged routes.NOT_IMPLEMENTEDpointing at/sign+bb swap track. No partial execution, no orchestrator.gamm/SwapExactAmountInthat the/signpage'smessageTypesregistry is keyed by (mirrors the frontendparseSkipGoMsgsToTxInfo); the proto type URL would be a registry miss and the wallet could not reconstruct the msg.--burneris explicitly refused for swaps (it is CREATE-collection only) rather than failing opaquely downstream.Test plan
swap.spec.ts: command-shape (newexecutesubcommand +--execute/--force/--track+ reused--browser/--burner/--sign-onlyonestimate).swap.spec.ts: exported pureclassifyBitBadgesOnlySwapcovering the three routing branches — BitBadges-only executable; rerouted/EVM/IBC/WETH/non-bitbadges refused; multi-hop refused; failed-estimate refused; bare-vs-wrapped estimate input.swap.spec.tsgreen (19/19). (Pre-existingsrc/cli/integration/suites need a builtdist/and are excluded by the repo's ownnpm test.)for-developers/cli/swap docs update tracked separately in the docs repo.🤖 Generated with Claude Code