Expand description
Pyth Hermes pull-feed helpers (PriceUpdateV2 accounts).
Replaces the legacy pyth-sdk-solana push-oracle dependency. Price update accounts are
posted on-chain by the executor crank just before each oracle-gated instruction by calling
the Pyth Receiver program (PYTH_RECEIVER_PROGRAM). This module reads them directly
via borsh deserialization (no anchor-lang dependency required).
§Flow
- Executor fetches signed price update VAA from Hermes REST API.
- Executor posts it via
PYTH_RECEIVER_PROGRAM::post_update→PriceUpdateV2account. - Executor calls our instruction with that account as
pyth_price_feed_info. - Program validates owner, feed ID, staleness, then reads price.
Structs§
Functions§
- anchor_
open_ snapshot - Writes
open_*fields from a HermesPriceUpdateV2account. - assert_
pyth_ receiver_ owner - load_
fresh_ price_ hermes - Parse a
PriceUpdateV2account into our internalPricetype. - outcome_
from_ open_ close - UP/DOWN from open vs close prices at a common exponent (tie → DOWN).