Kujira.Oracle (kujira v0.1.23)

Utility functions for querying the on-chain oracle

Summary

Functions

Loads the price for a specfic price from the on-chain oracle. Default cache 200ms

Loads all prices from the on-chain oracle. Default cache 200ms

Functions

Link to this function

invalidate(atom)

Link to this function

invalidate(atom, denom)

Link to this function

load_price(channel, denom)

@spec load_price(GRPC.Channel.t(), any()) ::
  {:ok, Decimal.t()} | {:error, GRPC.RPCError.t()}

Loads the price for a specfic price from the on-chain oracle. Default cache 200ms

Clear wth Kujira.Oracle.invalidate(:load_price, denom)

Link to this function

load_prices(channel)

@spec load_prices(GRPC.Channel.t()) :: {:ok, map()} | {:error, GRPC.RPCError.t()}

Loads all prices from the on-chain oracle. Default cache 200ms

Clear wth Kujira.Oracle.invalidate(:load_prices)