Rube.Amm.Pair (rube v0.0.4)

Link to this section Summary

Link to this section Types

Specs

address() :: String.t()

Specs

symbol() :: Rube.Tokens.Token.symbol()

Specs

t() :: %Rube.Amm.Pair{
  address: address(),
  blockchain_id: Slurp.Blockchains.Blockchain.id(),
  k_last: integer(),
  precision: integer(),
  price0_cumulative_last: term(),
  price1_cumulative_last: term(),
  reserve0: integer(),
  reserve1: integer(),
  token0: address(),
  token0_symbol: String.t(),
  token1: address(),
  token1_symbol: String.t()
}

Link to this section Functions

Link to this function

delete(struct, key)

Link to this function

get(struct, key, default \\ nil)

Specs

price(t()) :: Decimal.t()
Link to this function

put(struct, key, val)