feat(oracle): add Pyth Lazer getters and event to interface - #16
Conversation
Mirrors the Pyth Lazer surface from alphalend-contracts#151 into the published interface: the LazerPriceUpdationEvent struct, the get_conf reader, and the is_lazer_enabled / get_lazer_feed_ids_for_coin / get_coin_type_for_lazer_feed_id config getters. Stub bodies, matching the existing interface convention.
Adds the Lazer writer stub parallel to update_price_from_pyth, taking pyth_lazer::update_v2::Update. Vendors the pyth_lazer ABI stub (types-only, mirroring alphalend-contracts#151) so the interface exposes the same signature consumers link against.
…et stub variant F1: completes the Lazer getter surface (real oracle exposes it). F2: pyth_lazer stub now carries an explicit active-mainnet + commented-testnet published-at, matching the Pyth/Wormhole dep convention so the testnet republish has a swap point.
|
<!-- operate.md-review --> Verified the stub types ( 🔴-to-verify (INFO, load-bearing) — 🔵 Low — 🔵 Low — self-referential doc comment. Nits: Automated review; no approval implied. Merge decision remains with the maintainers. operate.md 2026-07-11 — status: SECURITY-CLEAN, recommend approval (gated) Re-derived on head Automated review; no approval implied. |
|
Addressed in
|
jangid
left a comment
There was a problem hiding this comment.
operate.md review — Lazer interface mirror
ABI verified clean against the source of truth and consumers:
interface.moveis byte-identical to alphalend-contracts#151.- Every consumed signature matches #151 exactly —
LazerPriceUpdationEventfields,get_conf,ingest_lazer_update(&mut Oracle, LazerUpdate, &Clock), and all four Lazer getters. - Consistent with the SDKs: alphalend-sdk-rust#207 and alphalend-sdk-js#155 both call
oracle::ingest_lazer_updateand invokeparse_and_verify_le_ecdsa_update_v2against the real deployed Lazer package id — so the stub correctly ships types only and never links the verifier (survives Pyth verifier upgrades without republish).
Remaining, non-ABI:
- 🟡 Regenerate/commit
alphafi_oracle/Move.lock— the new[dependencies.pyth_lazer]inMove.tomlisn't reflected in the committed lock. - 🟡 Add
deps-mainnet/lazer_interface/Move.lock— every other mainnet dep (and #151) commits one; it's the artifact that pinsoriginal-published-id = 0x7b50…. - 🟢 Consider mirroring
LazerPriceSkippedEventtoo (#151 ships both Lazer events). - 🟢 Harmonize the
lazer_interface/Move.tomltype-origin comment with #151's wording (0xefbf introducing-version vs 0x7b50 canonical id — no ABI impact, just avoid contradictory guidance on a future re-sync/on-chain check).
|
operate.md review — new finding (deduplicated vs existing approval) ✅ ABI stub verified byte-identical to the impl in alphalend-contracts#151: 🟢 [LOW] Interface omits |
jangid
left a comment
There was a problem hiding this comment.
operate.md: approved per CTO authorization — pure ABI stub (abort 0 bodies, no fund path), verified byte-identical to the impl in alphalend-contracts#151. Non-blocking LOW already noted above: add LazerPriceSkippedEvent for indexer decode-parity.
operate.md review —
|
operate.md review — ✅ approvable; contract-adjacent → merge gatedStatus re-derived this run: Merge-order note (this is part of the Pyth Lazer stack): this interface package declares the new Lazer getters/event that |
696aa74
jangid
left a comment
There was a problem hiding this comment.
operate.md: approving on explicit maintainer authorisation for this contract PR (contract PRs are otherwise held for a human glance).
Re-derived at HEAD 1cfc635: CI green on all four contexts (install-sui, build, lint, test), MERGEABLE/BLOCKED (pending review, not a conflict). Zorag44's approval (2026-07-23T11:23Z) post-dates HEAD (2026-07-21T18:12Z), so it is current — this makes it 2/2.
The Move ABI surface was audited symbol-by-symbol against alphalend-contracts#151 on 2026-07-31, at a point newer than this PR's head, and the head has not moved since: LazerPriceSkippedEvent byte-identical to #151, all new getters take &Oracle / &PriceInfo only (no capability returned, no store object returned by value, no new PTB attack surface), and the interface Oracle layout correctly stays unchanged because #151 keeps Lazer config in a dynamic field. Nothing in that audit is re-litigated here.
Remaining open items are 🟡 dependency-pinning and CI hygiene (notably sui_system pinned to the moving 'mainnet' branch with override = true and no committed lock) — non-blocking, worth closing separately.
Approvals: 2/2 — merge-ready.
Mirrors the Pyth Lazer surface from alphalend-contracts#151 into the published interface package: the
LazerPriceUpdationEventstruct, theget_confreader, and theis_lazer_enabled/get_lazer_feed_ids_for_coin/get_coin_type_for_lazer_feed_idconfig getters.Stub bodies, matching the existing interface convention (consumers link the real package at publish). Additive and flag-gated upstream — no consumer behavior changes until Lazer is enabled.