Kujira.Orca (kujira v0.1.4)
Methods for querying the Orca Liquidation Queues, and related data
Summary
Functions
Fetches the Queue contract and its current config from the chain. This rarely changes and can be safely memoized with a manual flush
Fetches all Liquidation Queues. This will only change when new Queues are deployed, so it is recommended to memoize this function with a manual flush
Loads a bid for a specific Queue
Loads a user's bids for a specific Queue
Loads the current contract state into the Queue; the totals of each bid pool
Functions
get_queue(channel, address)
@spec get_queue(GRPC.Channel.t(), String.t()) :: {:ok, Kujira.Orca.Queue.t()} | {:error, :not_found}
Fetches the Queue contract and its current config from the chain. This rarely changes and can be safely memoized with a manual flush
list_queues(channel, code_ids \\ [108, 122, 216, 220])
@spec list_queues(GRPC.Channel.t(), [integer()]) :: :error | {:ok, any()}
Fetches all Liquidation Queues. This will only change when new Queues are deployed, so it is recommended to memoize this function with a manual flush
load_bid(channel, queue, idx)
@spec load_bid(GRPC.Channel.t(), Kujira.Orca.Queue.t(), String.t()) :: {:ok, Kujira.Orca.Bid.t()} | :error
Loads a bid for a specific Queue
load_bids(channel, queue, address, start_after \\ nil)
Loads a user's bids for a specific Queue
load_queue(channel, queue)
@spec load_queue(GRPC.Channel.t(), Kujira.Orca.Queue.t()) :: {:ok, Kujira.Orca.Queue.t()} | :error
Loads the current contract state into the Queue; the totals of each bid pool