fix(sdk-core): encode and decode slug_name as an ABI builtin - #90
Merged
Merged
Conversation
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
Contributor
|
emergency mer because both libraries and tools were broken |
Contributor
Author
|
E2E is green: run 36177781569. All 15 flows passed ( Branch combination: wire-sysio
|
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.
wire-sysio#619 made
slug_namean 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 withUnknown type.This PR registers
slug_nameinserializer/Builtins.tsnext tostringandbool:"ETHEREUM"), matching the chain's JSON carrier and the generatedSysioContractTypes.uint64.{ value }object, or an already-typed value such asChainsSlugName. The empty spelling encodes as zero.Tests (
tests/serializer/SlugName.test.ts) use an ABI with aslug_namefield and no struct: encode, a round trip includingslug_name[], carrier equivalence, zero, and rejected spellings. sdk-core: 581/581.Merge order: merge this before release PR #89.
tag-releasepublishes master at the moment #89 merges, so 1.0.93 must include this fix. wire-tools-ts#108 depends on that release.