Onchain.Aave.V4.Hub.SpokeConfig (onchain_aave v0.4.0)

Copy Markdown View Source

Typed IHub.SpokeConfig — add/draw caps, risk-premium threshold, and flags.

API Functions

FunctionArityDescriptionParam Kinds
from_raw1Convert a decoded IHub.SpokeConfig tuple into a typed struct.raw: exchange_data

Summary

Functions

Convert a decoded IHub.SpokeConfig tuple into a typed struct.

Types

t()

@type t() :: %Onchain.Aave.V4.Hub.SpokeConfig{
  active: boolean(),
  add_cap: non_neg_integer(),
  draw_cap: non_neg_integer(),
  halted: boolean(),
  risk_premium_threshold: non_neg_integer()
}

Functions

from_raw(arg)

@spec from_raw(tuple()) :: t()

Convert a decoded IHub.SpokeConfig tuple into a typed struct.

Parameters

  • raw - 5-element tuple from getSpokeConfig (exchange_data)

Returns

%Onchain.Aave.V4.Hub.SpokeConfig{} (struct)

# descripex:contract
%{
  params: %{
    raw: %{
      description: "5-element tuple from getSpokeConfig",
      source: "Onchain.Aave.V4.Hub.get_spoke_config/4",
      kind: :exchange_data
    }
  },
  returns: %{type: :struct, description: "%Onchain.Aave.V4.Hub.SpokeConfig{}"}
}