fix(frontend): retail gas inventory guardrail and faucet drip (#475) #1015

Merged
PlasticDigits merged 1 commit from fix/475-gas-limit-audit into main 2026-07-12 09:22:48 +00:00
PlasticDigits commented 2026-07-12 09:10:37 +00:00 (Migrated from gitlab.com)

Summary

  • Audit retail executeTerraContract* shapes vs getGasLimitForTx and add CI inventory fixtures (terraGasRetailInventory.ts, invariants G-RETAIL-1 / G-RETAIL-2).
  • Fix Mint faucet OOG: map { drip } → FAUCET_DRIP_GAS_LIMIT (400k) (also closes #474).
  • Map CW20 send → inner unwrap to UNWRAP_GAS_LIMIT (was legacy SWAP_GAS_LIMIT).
  • Explicit BASE_GAS_LIMIT_ALLOWLIST for intentional 200k (increase_allowance / decrease_allowance only) + DEV console.warn on unmapped fallback.
  • Docs/skills crosslinks + make verify-issue-475.

Closes #475
Closes #474

Test plan

  • Unit: terraGas.retailShapes, terraGas.feeDiscount, transactions gas cases
  • make verify-issue-475 (unit + constant floor; live LocalTerra drip SKIP until faucet redeploy)
  • Optional: redeploy LocalTerra with faucet wasm, re-run make verify-issue-475 for live gas_used < 400k
  • Spot-check /mint drip after Coolify rebuild

Checklist for reviewers

  • Every retail execute shape appears in RETAIL_GAS_SHAPE_FIXTURES
  • drip no longer returns BASE_GAS_LIMIT
  • Allowlist stays allowance-only
  • Docs + AGENTS_TERRACLASSIC_GAS.md / faucet skill updated
## Summary - Audit retail `executeTerraContract*` shapes vs `getGasLimitForTx` and add CI inventory fixtures (`terraGasRetailInventory.ts`, invariants **G-RETAIL-1 / G-RETAIL-2**). - Fix Mint faucet OOG: map `{ drip }` → **`FAUCET_DRIP_GAS_LIMIT` (400k)** (also closes **#474**). - Map CW20 `send` → inner `unwrap` to **`UNWRAP_GAS_LIMIT`** (was legacy `SWAP_GAS_LIMIT`). - Explicit **`BASE_GAS_LIMIT_ALLOWLIST`** for intentional 200k (`increase_allowance` / `decrease_allowance` only) + DEV `console.warn` on unmapped fallback. - Docs/skills crosslinks + `make verify-issue-475`. Closes #475 Closes #474 ## Test plan - [x] Unit: `terraGas.retailShapes`, `terraGas.feeDiscount`, `transactions` gas cases - [x] `make verify-issue-475` (unit + constant floor; live LocalTerra drip SKIP until faucet redeploy) - [ ] Optional: redeploy LocalTerra with faucet wasm, re-run `make verify-issue-475` for live `gas_used < 400k` - [ ] Spot-check `/mint` drip after Coolify rebuild ## Checklist for reviewers - [ ] Every retail execute shape appears in `RETAIL_GAS_SHAPE_FIXTURES` - [ ] `drip` no longer returns `BASE_GAS_LIMIT` - [ ] Allowlist stays allowance-only - [ ] Docs + `AGENTS_TERRACLASSIC_GAS.md` / faucet skill updated
PlasticDigits commented 2026-07-12 09:11:59 +00:00 (Migrated from gitlab.com)

mentioned in issue #475

mentioned in issue #475
PlasticDigits commented 2026-07-12 09:22:48 +00:00 (Migrated from gitlab.com)

mentioned in commit b598b37758

mentioned in commit b598b3775898defea541ddc8379977cc6cd10a3e
PlasticDigits (Migrated from gitlab.com) merged commit b598b37758 into main 2026-07-12 09:22:48 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1015
No description provided.