Skip to content

fix(sdk-core): encode and decode slug_name as an ABI builtin - #90

Merged
jglanz merged 1 commit into
masterfrom
fix/slug-name-serializer-builtin
Sep 25, 2026
Merged

jglanz merged 1 commit into
masterfrom
fix/slug-name-serializer-builtin

Conversation

@heifner

@heifner heifner commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

wire-sysio#619 made slug_name an ABI builtin, so a deployed contract ABI names the type but has no struct definition for it. The typed action builders (ChainsSlugName, ReservSlugName) were unaffected. Anything encoded or decoded through the generic, ABI-driven serializer failed with Unknown type.

This PR registers slug_name in serializer/Builtins.ts next to string and bool:

  • In JS it is the canonical spelling ("ETHEREUM"), matching the chain's JSON carrier and the generated SysioContractTypes.
  • On the wire it is the packed uint64.
  • It accepts every carrier on the way in: a spelling, a packed number or bigint, a { value } object, or an already-typed value such as ChainsSlugName. The empty spelling encodes as zero.

Tests (tests/serializer/SlugName.test.ts) use an ABI with a slug_name field and no struct: encode, a round trip including slug_name[], carrier equivalence, zero, and rejected spellings. sdk-core: 581/581.

Merge order: merge this before release PR #89. tag-release publishes master at the moment #89 merges, so 1.0.93 must include this fix. wire-tools-ts#108 depends on that release.

wire-sysio#619 made slug_name a builtin, so a deployed ABI names the type with
no struct definition and the generic serializer failed with 'Unknown type'.
Register it beside string and bool: the canonical spelling in and out, the
packed uint64 on the wire, accepting every SlugNameValue carrier.

Change-Id: I680b32469bff4903f40135f03404370382466007
@jglanz
jglanz merged commit e3a2430 into master Sep 25, 2026
1 check failed
@jglanz

jglanz commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

emergency mer because both libraries and tools were broken

@heifner

heifner commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

E2E is green: run 36177781569. All 15 flows passed (flow-swap-epoch-stress is excluded by default).

Branch combination: wire-sysio master, wire-cdt master, wire-libraries-ts fix/slug-name-serializer-builtin (#90), wire-tools-ts fix/slug-name-string-carrier-actions (#108). Everything else was on its manifest default.

  • ✅ batch-operator-slashing (465s)
  • ✅ batch-operator-termination (1050s)
  • ✅ emissions-soak (2209s)
  • ✅ node-owner-nft (552s)
  • ✅ operator-collateral-deposit (824s)
  • ✅ producer-registration (998s)
  • ✅ reserve-lifecycle (943s)
  • ✅ swap-from-wire (706s)
  • ✅ swap-non-native-tokens (2121s)
  • ✅ swap-private-reserves (1968s)
  • ✅ swap-to-wire (720s)
  • ✅ swap-variance-revert (505s)
  • ✅ swap-with-underwriting (1111s)
  • ✅ underwriter-slashing (946s)
  • ✅ yield-distribution (747s)

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.

2 participants