SPIKE: Protocol 28 (CAP-0084)#981
Draft
sisuresh wants to merge 4 commits into
Draft
Conversation
Bump XDR pin to stellar-xdr#306 (7b56181) and regen for CAP-0084 muxed contract addresses. Add Address-level encode/decode for the SC_ADDRESS_TYPE_MUXED_CONTRACT arm (muxedContract factory, contractId()/muxedId(), <C-strkey>:<id> display). Canonical strkey deferred — no upstream version byte yet.
The SC_ADDRESS_TYPE_MUXED_CONTRACT arm was leaking into the released `curr` codec. Per the feature-flag contract a gated CAP def must be `next`-only until the protocol is enabled. - Makefile: split XDR_FEATURES into XDR_FEATURES_CURR (CAP_0083) and XDR_FEATURES_NEXT (CAP_0083,CAP_0084_MUXED_CONTRACT); regen curr. - curr_generated.js + types/curr.d.ts: drop the muxed-contract arm. - address.js: guard the fromScAddress case label with optional chaining so the curr-bound Address codec no longer throws when the arm is absent (the write path stays dormant until the arm lands in curr). - address_test.js: codec round-trip cases run only when the active codec defines the arm; Address-level assertions stay codec-agnostic.
This was referenced Jul 3, 2026
Author
This was referenced Jul 3, 2026
sisuresh
added a commit
to sisuresh/js-stellar-sdk
that referenced
this pull request
Jul 3, 2026
The Makefile pinned 68fa1ac5, which predates the CAP-0084 XDR commit,
and left XDR_FEATURES undefined, so `make generate` could not reproduce
the committed generated codec. Pin XDR_BASE_URL_{CURR,NEXT} to
stellar-xdr@787382ef (CAP-0084 muxed-contract arm) and split into
XDR_FEATURES_CURR=CAP_0083 / XDR_FEATURES_NEXT=CAP_0083,CAP_0084_MUXED_CONTRACT
so curr excludes and next includes the muxed-contract arm, mirroring
stellar/js-stellar-base#981. Drop `docker run -it` for non-TTY/CI regen
and wire the xdrgen#152 const-inlining post-process (scripts/post-process-generated.py)
for curr and next.
Regen deferred: Docker is unavailable in this environment, so
`make generate` was not re-run. The Makefile is now reproducible against
787382ef and the const post-process is wired but not yet executed; the
committed src/base/generated/* (correct CAP-0084 arm content, CI green)
are unchanged.
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.
Regenerates JS XDR for CAP-0084 (Muxed Contract Addresses), gated to the
nextchannel.Changes
787382ef2099cca168ca1cb282730d6b7b9e2f16;XDR_FEATURES_NEXT += CAP_0084_MUXED_CONTRACT(CAP-0084 gated tonextonly).SC_ADDRESS_TYPE_MUXED_CONTRACTarm;currunchanged.AddressgainsmuxedContract(contractId, id),contractId()/muxedId()accessors,fromScAddress/toScAddresssupport, and display-only<C-strkey>:<id>toString().types/index.d.ts,types/next.d.ts,types/test.ts; added codec-gatedaddress_test.jscases; CHANGELOG entry.Deferred
ScAddress/ScVal; the<C-strkey>:<id>string is display-only and not parsable by theAddressconstructor.Upstream
Downstream