Skip to content

feat(lazer/stellar): add Soroban example consumer using published SDK#127

Merged
jayantk merged 2 commits into
mainfrom
hydra/i-omrblycq/head
Jun 25, 2026
Merged

feat(lazer/stellar): add Soroban example consumer using published SDK#127
jayantk merged 2 commits into
mainfrom
hydra/i-omrblycq/head

Conversation

@jayantk

@jayantk jayantk commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

PR 1 of 2 for [[i-omrblycq]]

Adds the Pyth Lazer Soroban example consumer to pyth-examples at lazer/stellar/, ported from pyth-lazer/contracts/stellar/contracts/example/.

What changed

  • Location: placed at lazer/stellar/, matching the per-chain layout of the other Lazer examples (lazer/evm, lazer/solana, lazer/sui).
  • Source (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 version pyth-lazer-stellar-sdk = "0.2", soroban-sdk = "22.0.5" (with alloc) inlined, overflow-checks = true preserved.
  • README.md: build/deploy/invoke steps, testnet verifier CD2KMDOR274ZVPVVSDIBWNBLGAXJOHKJBQGNWYQHF3O6H767UOYJJYJZ, pointers to docs.pyth.network/lazer + crates.io.
  • Cargo.lock: committed (matches the lazer/solana example convention).
  • CI (rework): added .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 on ci-lazer-solana.yml) checks Cargo.toml/Rust formatting, runs clippy with -D warnings, and builds the wasm contract — all against the pinned 1.91.1 toolchain 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 unpublished pyth-lazer-stellar verifier 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.

Hydra Worker and others added 2 commits June 25, 2026 21:20
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>
@jayantk jayantk merged commit 50675e3 into main Jun 25, 2026
6 checks passed
@jayantk jayantk deleted the hydra/i-omrblycq/head branch June 25, 2026 22:36
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.

2 participants