feat(lazer/stellar): add Soroban example consumer using published SDK#127
Merged
Conversation
Port the Pyth Lazer Soroban example consumer from pyth-lazer into pyth-examples at lazer/stellar/, matching the per-chain layout used by the other Lazer examples (evm, solana, sui). The example depends on the published `pyth-lazer-stellar-sdk = "0.2"` from crates.io rather than a workspace path, so it reflects what an external user would write. It is a standalone crate (no Cargo workspace). Unit tests are dropped in the move: they depended on the unpublished `pyth-lazer-stellar` verifier contract crate; the verification logic is covered by pyth-lazer's own integration tests. Builds clean with: cargo build --release --target wasm32-unknown-unknown Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every other Lazer example (evm, solana, sui, js, publisher, anchor) has a dedicated CI job; the new lazer/stellar example had none, so nothing in CI verified it compiles against the published SDK. Add ci-lazer-stellar.yml that fmt/clippy-checks and builds the wasm contract, modeled on ci-lazer-solana.yml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aditya520
approved these changes
Jun 25, 2026
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.
PR 1 of 2 for [[i-omrblycq]]
Adds the Pyth Lazer Soroban example consumer to pyth-examples at
lazer/stellar/, ported frompyth-lazer/contracts/stellar/contracts/example/.What changed
lazer/stellar/, matching the per-chain layout of the other Lazer examples (lazer/evm,lazer/solana,lazer/sui).src/lib.rs,src/state.rs,src/error.rs): copied verbatim.Cargo.toml: standalone crate (no Cargo workspace); SDK dep is the published crates.io versionpyth-lazer-stellar-sdk = "0.2",soroban-sdk = "22.0.5"(withalloc) inlined,overflow-checks = truepreserved.README.md: build/deploy/invoke steps, testnet verifierCD2KMDOR274ZVPVVSDIBWNBLGAXJOHKJBQGNWYQHF3O6H767UOYJJYJZ, pointers to docs.pyth.network/lazer + crates.io.Cargo.lock: committed (matches thelazer/solanaexample convention)..github/workflows/ci-lazer-stellar.yml. Every other Lazer example (evm, solana, sui, js, publisher, anchor) ships a dedicated CI job; the stellar example had none, so nothing in CI verified it compiles against the published SDK. The new workflow (modeled onci-lazer-solana.yml) checks Cargo.toml/Rust formatting, runs clippy with-D warnings, and builds the wasm contract — all against the pinned1.91.1toolchain that pyth-lazer uses. Unit tests were dropped in the move (option 1), so there is no test step.Test trade-off (option 1)
Dropped the unit tests (
src/test.rs) in the move; they depended on the unpublishedpyth-lazer-stellarverifier contract crate (private repo). Verification logic remains covered by pyth-lazer's own integration tests.PR 2 (removing the example from pyth-lazer) is deferred until this merges.