Return the latest stored price. Errors with [Error::PriceNotInitialized]
if update_price has never run successfully.
fn get_price(env: soroban_sdk::Env) -> Result
Verify a signed Pyth Lazer update, check it is fresh, and store the latest price for the configured feed. Rejects the update if its feed timestamp is not strictly newer than the currently stored price.
fn update_price(
env: soroban_sdk::Env,
payload: soroban_sdk::Bytes,
) -> Result<(), soroban_sdk::Error>
Store the deployment-time configuration:
lazer: the deployed pyth-lazer-stellar verifier contract address.feed_id: which Pyth Lazer price feed this contract tracks.freshness_threshold_us: how far in the past a feed's update timestamp
may lag the ledger time before the update is rejected (microseconds).fn __constructor(
env: soroban_sdk::Env,
lazer: soroban_sdk::Address,
feed_id: u32,
freshness_threshold_us: u64,
)