test: LocalTerra community-tax seed + AutoLP + Mint/Transfer funding + indexer env #620
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent / siblings
Follow-up to community tax on-chain work (#592, #601, #605, #610, #615). This issue is the LocalTerra stack wiring so later swarm / Playwright / tax-on harness issues can see a real listed tax market. Do not reopen those tickets unless an invariant is wrong.
Sibling implementation issues (open with this one): tax-aware swarm, Playwright
e2e-txmatrix, named tax-on Layer B suite.Current codebase
scripts/deploy-dex-local.shstores mintable CW20s and seeds factory pairs for gems (EMBER,CORAL,JADE,ONYX,RUBY,TOPAZ,OPAL,COBALT,SLATE,AMBER, plus laterIRON/NEON), wrap CW20s (cLUNC/cUSTC), andTCL8Y. It does not storecl8y_community_tax_token,cl8y_community_token_launcher, orcl8y_community_tax_autolp. It does not instantiate a launcher, create a tax token,CreatePair, orRegisterListedPair..env.localnever getsVITE_COMMUNITY_TAX_CODE_ID/VITE_COMMUNITY_TOKEN_LAUNCHER/ a tax token address. There is no local UST1.Downstream funding assumes every factory CW20 (except wraps) can
Mint:scripts/e2e-provision-dev-wallet.sh— paginate factorypairs,{"mint":{…}}when balance < floor; skip onlyVITE_LUNC_C_TOKEN_ADDRESS/VITE_USTC_C_TOKEN_ADDRESS.packages/localnet-trading-swarm/src/funding.ts— same Mint over all factory CW20s (no wrap skip).Indexer local
.envfrom deploy does not setCOMMUNITY_TAX_CODE_ID/COMMUNITY_TOKEN_LAUNCHER/CMM_GOVERNANCE_ADDR/COMMUNITY_TAX_OPTION2_*. Catalog API staysconfigured: false.#601smoke (scripts/qa/localterra-community-tax-smoke.sh) already stores current token+launcher, creates a throwaway mintable UST1, free-profileCreateToken, pair vs EMBER,RegisterListedPair, extra-debit/outbound, invoices. It is ephemeral: nothing is written to.env.local, AutoLP isautolp_code_id: null, and the pair is not reused by E2E/swarm.Launcher AutoLP today: paid
Sku::AutoV2Lpinstantiate+binds at create withpair: None; manager/UpdateConfigsets the factory-listed tax pair later (#610 M610-1). TokenBindAutolpis launcher-only.Why this is needed
Gems “just work” in infra E2E and swarm because deploy puts them on the factory and funding Mints them. The community tax template is listed on columbus-5 (
11611/11619) and crate-tested, but LocalTerra QA never sees a registered tax pair. Adding the pair without a funding fork will breakmake test-e2e/ swarm startup (Minton a free-profile token fails). Without indexer env,#594/#615stay unit-only. AutoLP skim vs a live factory pair is an O601-7 residual;#601smoke does not bind AutoLP.Constraints / guardrails
AddWhitelistedCodeIdcolumbus-511611/11619from this evidence. Never whitelist launcher / AutoLP / ALPHA 8654.MintControlon the default QA tax token just to reuse gem Mint funding. Top up withTransferfromtest1(largeinitial_balances).trading_enabled=true,cooldown_blocks=0, high/nullmax_wallet. A “safe launch” preset will brick swarm/E2E.autolp_code_id, paid create (50 UST1 stand-in) or Enable Feature after free create. AfterCreatePair+RegisterListedPair,UpdateConfigAutoLPpairvia factory lookup.SkimToLpis permissionless and never called from tokenTransfer/Send(T592-10 / M610-5). Floormax_spreaddefault 100 bps, cap 200 (M610-3).test1(wasm admin + catalog). Document that this is not columbus-5 CMMterra16j5u6….DEPLOY_SKIP_COMMUNITY_TAX=1) for wasm-less / fast gem-only deploys.make reset/--freshmust recreate the tax market; do not rely on stale.qa-deploy-stampalone (#325).Relevant files
scripts/deploy-dex-local.shscripts/e2e-provision-dev-wallet.shpackages/localnet-trading-swarm/src/funding.tsscripts/qa/localterra-community-tax-smoke.shcw20-codeid-audits/scripts/lib-layer-lt.shfrontend-dapp/.env.exampleVITE_COMMUNITY_TAX_*empty todayfrontend-dapp/src/utils/constants.tsCOMMUNITY_TAX_CODE_ID/COMMUNITY_TOKEN_LAUNCHERindexerenv from deployCOMMUNITY_TAX_*,CMM_GOVERNANCE_ADDR,COMMUNITY_TAX_OPTION2_*skills/AGENTS_COMMUNITY_TAX_CW20.mdskills/AGENTS_COMMUNITY_TAX_AUTOLP.mdskills/AGENTS_INDEXER_COMMUNITY_TOKENS.mdskills/AGENTS_LOCAL_POSTGRES_DEV.md.envRecommended direction
scripts/lib/deploy-community-tax-local.sh(or phase indeploy-dex-local.sh) called after factory + EMBER exist:cl8y_community_tax_token, launcher, AutoLP). Fail if wasm missing (or build via existing optimize path).#601); writeVITE_UST1_TOKEN_ADDRESSfor local only if unset.token_code_id= local store,autolp_code_id= local AutoLP,ust1= stand-in,factory/routerfrom deploy, CMM =test1.AddWhitelistedCodeIdlocal token id only.features: ["auto_v2_lp"](exact SKU name as crate) + largeinitial_balancestotest1, buy/sell 500 bps, QA launch guards. Invoice 50 UST1 to launcher.CreatePairtax vs EMBER (pay factory fee),RegisterListedPair.≥ 10Mraw / side, alignliquidityGuards.ts/BOTS_MIN_RESERVE_PER_SIDE).UpdateConfig { pair }after factory listing; optional small Transfer to AutoLP + oneSkimToLpin deploy smoke (or leave skim to the tax-on suite)..env.local+indexer/.env: localVITE_COMMUNITY_TAX_CODE_ID(store id),VITE_COMMUNITY_TOKEN_LAUNCHER,VITE_TOKEN_COMMUNITY_TAX_ADDRESS,VITE_PAIR_COMMUNITY_TAX_EMBER, indexerCOMMUNITY_TAX_CODE_ID/COMMUNITY_TOKEN_LAUNCHER/CMM_GOVERNANCE_ADDR=test1/COMMUNITY_TAX_OPTION2_CODE_IDS=<local token code>.GetLauncherOriginor matchesVITE_TOKEN_COMMUNITY_TAX_ADDRESS, Transfer fromtest1to deficit addresses; never Mint. Keep wrap Mint skip. TCL8Y stays Mint.docs/local-development.md,docs/testing.md,AGENTS_COMMUNITY_TAX_CW20.md— QA token is not a license to whitelist other tax wasm.Acceptance criteria
make deploy-local(default) produces a factory-listed tax/EMBER pair withRegisterListedPairdone and reserves ≥ swarm floor.GetConfig.pairis the factory pair (or documented follow-upUpdateConfigin the same deploy)..env.localandindexer/.envcontain community-tax + local UST1 pins; Create Token page is available without baking columbus-511611.e2e-provision-dev-wallet.shand TS swarm funding succeed (no Mint on the tax token);test1and bots can be topped up by Transfer.GET /api/v1/community-tokensisconfigured: trueand lists the QA token asattested_cmmafter ingest/probe.GET /api/v1/tokens/{tax}may embedcommunity_tax;route/solvecan seebuy_bps/sell_bpsfor ranking (R615).DEPLOY_SKIP_COMMUNITY_TAX=1still deploys gems only.GetWhitelistedCodeIdson LocalTerra includes the local token code only (not 11611 from this script).#601smoke andmake verify-issue-592/610/594stay green.Test plan (all paths)
make reset && make deploy-local— tax phase runs; env files set; LCDGetConfig/GetLauncherOrigin/ factoryPair/ AutoLPpairmatch.--fresh— idempotent skip or safe no-op (no second pair, no double whitelist panic).DEPLOY_SKIP_COMMUNITY_TAX=1— no tax store; provision/swarm unchanged.--dry-runafter deploy — funding path does not Mint tax token.configured: true; rogue--admininstantiate (if present) not catalogued (O601-4).SkimToLponce at deploy depth; floor revert if spread too tight (M610-3/4).Test plan (attack / hack / abuse)
11611/11612/11621/8654from LocalTerrargguard likeverify-issue-601Mintwhen Transfer failsUpdateConfigpointed at a non-factory or wrong-token contracttrading_enabled=false--admininstantiateGetLauncherOrigin.launcher == null→ notattested_cmmSkimToLpinvoked from tokenSend/TransferCOMMUNITY_TAX_CODE_IDset to columbus-511619while instances are local storeVerification
Close only when sibling swarm/E2E issues can run against this deploy without extra manual instantiate.
marked as related to #592
marked as related to #601
marked as related to #610
marked as related to #615
marked as related to #594
marked as related to #621
marked as related to #622
marked as related to #623
Implementation split (opened together)
Foundation (this issue) unblocks the three dependents:
e2e-txmatrixImplement #620 first. Do not merge a tax pair into factory enumeration until Mint vs Transfer funding is in the same MR.
mentioned in merge request !1132
mentioned in commit
f85a8e408bMerge !1132 — verification (no CI wait)
Merged
!1132at994e5bf5→mainf85a8e40. GitLab reported mergeable / no conflicts; localgit merge-treewas a clean tree (53a99637…). Did not use auto-merge. Did not wait for CI.What passed (this pass)
make verify-issue-620: 8/8 (docs L620, deploy hooks +bash -n, no columbus-5 whitelist, bash classify unit, swarmfunding.test.ts7/7, live LCD, retest).GetConfig.pair+ local store id whitelisted, columbus-5 11611 / 11619 / 11612 / 11621 / 8654 not whitelisted.VITE_COMMUNITY_TAX_CODE_ID=77, launcher / QA tax / pair / SmokeUST1 /VITE_CMM_GOVERNANCE_ADDR=test1(terra1x46rq…).auto_v2_lp; AutoLPUpdateConfig { pair }afterRegisterListedPair; env pins +DEPLOY_SKIP_COMMUNITY_TAX=1; LP seed100_000_000_000raw/side; stand-in UST1 + CMM=test1.RegisterListedPairis idempotent on-chain (already=true).Problems / leftovers (not merge blockers)
ci_quota_exceeded(all jobs). Not a code defect. Project does not require a green pipeline to merge.make reset && make deploy-localwas not re-run on a clean volume. Live LCD used a prior seed (.qa-deploy-stampgit_sha=7fdc3a44, not994e5bf5/f85a8e40).indexer/.envtax pins in this checkout; nothing listening on:3001.GET /api/v1/community-tokensconfigured: true+attested_cmmis still open.--dry-rundoes not exercise Transfer.startSwarmskipsfundBotWalletswhendryRunis true, sonpm run start -- --dry-runcannot prove the tax token is not Minted.make deploy-localwithout the stamp skip: it always stores new wasm and paid-creates a new QA token. Pair lookup is only for that new token. Intended skip is.qa-deploy-stampinsetup-cloud-agent-localterra/start-qa(#325), not an in-script no-op.make verify-issue-601/592/610/594. No contract changes in !1132; still unchecked live.Siblings #621 / #622 / #623 stay open. Post-merge leftover tracker will be filed separately (same pattern as #616).
mentioned in issue #624
marked as related to #624
Post-merge leftovers tracked on #624 (
ops: post-merge !1132 LocalTerra community-tax seed leftovers).mentioned in merge request !1133
mentioned in merge request !1135
mentioned in issue #621
mentioned in issue #623
mentioned in issue #625
mentioned in issue #633