Typed IHub.SpokeConfig — add/draw caps, risk-premium threshold, and flags.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
from_raw | 1 | Convert 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
@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
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{}"}
}