Repository navigation
Fix signing and submission in the archival and simulation examples - #2933
Merged
Merged
Conversation
The archival examples signed the builder from assembleTransaction and used Operation without an import. The restore transaction had no time bounds. The submitTx helper returned and threw undefined names. The simulation examples called Server() without new and missed awaits. The multi-party example also used removed XDR getters. All examples now build before signing and run on SDK 17.2.1. Closes #2906
Contributor
Author
|
/triage |
Contributor
Contributor
|
🤖 Automated message from the Stellar Triage Bot. Reviewing because @kaankacar asked with /triage. Verified: the fixed calls match the Note: Example 2 now uses SDK 17 XDR fields, so it needs SDK 17 (the current |
…d-assembled-tx-before-signing
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
ElliotFriend
approved these changes
Nov 2, 2026
This branch was successfully deployed
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.
Closes #2906
What
docs/build/guides/archival/restore-data-js.mdxanddocs/learn/fundamentals/contract-development/storage/state-archival.mdx("My data is archived!"): call.build()on theassembleTransaction()result before signing. ImportOperation. Set time bounds on the restore transaction.docs/build/guides/transactions/submit-transaction-wait-js.mdx:submitTxnow returns or throwsfinalStatus.docs/learn/fundamentals/contract-development/contract-interactions/transaction-simulation.mdx, Examples 1 and 2:new Server(),getAccount(), namedinvokeContractFunctionarguments, time bounds andawait. Fix the imports.Promise.all(), usessimResult.latestLedgerfor the expiration, and builds before signing.Verification
@stellar/stellar-sdk17.2.1 with local RPC fixtures: 44 of 44 checks pass. The original code fails as the issue says. The fixed code passes both archival branches, allsubmitTxoutcomes, and Examples 1 to 3.4639bdeca92fe9eb5bb1f788688c5e95d92601f066a89a81c72fa3899944b282,7a2e994b4c332a1fdd787dfac78681b88fa2635c756cb33bfb71bfb77ef7ae3b,ab3b538b5bfd709f28d09c0f1e5c8305ab971b3a412e4b9eeb795ba49cba1d3d).sorobanCredentialsAddressV2for address auth. Example 2 handles that type and the legacy type.tsc --strictpasses on the fixed snippets.pnpm check:mdx,scripts/check-relative-links.shand an MDX compile pass.Notes
state-archival.mdxdoes not parse. It also uses pre-v17 XDR getters, has no time bounds, and reads the WASM hash from a ledger key. It needs its own rewrite.Apiwhen you combine them with thesubmitTxguide imports.