Skip to content

Fix test code in deploying-a-sac guide - #2688

Merged
ElliotFriend merged 1 commit into
stellar:mainfrom
leighmcculloch:fix-fabricated-test-code-deploying-a-sac
Aug 3, 2026
Merged

ElliotFriend merged 1 commit into
stellar:mainfrom
leighmcculloch:fix-fabricated-test-code-deploying-a-sac

Conversation

@leighmcculloch

Copy link
Copy Markdown
Member

What

Replace the SAC deployment test snippet's made-upTestEnv/SacDeployer::default()/string-literal Bytes calls with the actual test code required to register the contract, serializes a real XDR asset, and deploys it.

Why

None of the original types or calls exist in the SDK, so the example couldn't be compiled as shown. Unclear where the examples came from, maybe this is from a misfired AI contribution.

### What
Replace the SAC deployment test snippet's made-up `TestEnv`/`SacDeployer::default()`/string-literal `Bytes` calls with real, compiling test code that registers the contract, serializes a real XDR asset, and deploys it.

### Why
None of the original types or calls exist in the SDK, so the example couldn't be copy-pasted or compiled as shown.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the SAC guide with a compilable Soroban SDK test using real XDR serialization and contract registration.

Changes:

  • Registers SacDeployer and invokes it through its generated client.
  • Serializes the native XLM asset and verifies its deterministic SAC address.

Recommendation: MERGE-READY — verified against Soroban SDK v27.0.2.

@ElliotFriend ElliotFriend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix!

@ElliotFriend
ElliotFriend merged commit 3797afc into stellar:main Aug 3, 2026
6 checks passed
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.

3 participants