Modules§

Enums§

Constants§

Functions§

  • Used for decimal conversion of an u64 price. This is useful when getting an u64 price from an oracle with a different decimal factor and converting to a desired decimal factor.
  • Get price for some asset. If you know the oracle type (Pyth or Switch), you can pass just the validation values required, or just pass both regardless:
  • Fetches the pyth price from the oracle price feed given. Checks that price is within confidence and freshness threshold.
  • Validates Oracle matches Pyth or Switchboard and returns the respective id
  • Validates Oracle matches Pyth or Switchboard