Skip to content

fix(a12): decode real blockchain-config param values - #21

Merged
Gift-Stack merged 2 commits into
mainfrom
fix/a12-config-decode
Jul 8, 2026
Merged

Gift-Stack merged 2 commits into
mainfrom
fix/a12-config-decode

Conversation

@Gift-Stack

Copy link
Copy Markdown
Contributor

config.get read the real config dictionary but emitted value: "0" for every labeled fee param (18 storage, 20/21 gas, 24/25 fwd, 34 validators) — so A12 showed 0 for exactly the params that matter, and A9's storage-fee story had no real prices behind it.

What this does

Decodes labeled params for real using @ton/ton's own TL-B parsers — no hand-rolling:

  • p18 configParse18 (storage prices), p20/p21 configParseGasLimitsPrices, p24/p25 configParseMsgPrices, p34 parseValidatorSet.
  • New decodeConfigParam(id, cell) → { label, value }[]; wrapped in try/catch so an unexpected tag falls back to the raw boc (never fabricated data). Raw boc is preserved for labeled params too. The raw-param path is unchanged.

Contract type (kept in lockstep)

Added DecodedConfigField + a named ConfigParam interface to rpc/contract.ts (value unchanged; new optional fields?). Updated bridge handler, mock-bridge (same shape, non-zero fixtures), and ConfigPanel (renders decoded fields, Kind badge now uses param.kind, filter/copy cover decoded values).

Verification

  • pnpm tsc green; bridge smoke ALL OK.
  • Live-bridge check printed real sandbox values, e.g. p20 gas_price=655360000, gas_limit=1000000; p24 lump_price=10000000, bit_price=655360000; p18 cell_price_ps=135, mc_cell_price_ps=500000.

@Gift-Stack
Gift-Stack merged commit afdb4c2 into main Jul 8, 2026
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