Typed Aave V4 ISpoke.Reserve data.
Amounts and risk parameters remain raw integers. The packed reserve flags are retained and also exposed as named booleans.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
from_raw | 1 | Convert a decoded ISpoke.Reserve tuple into a typed struct. | raw: exchange_data |
Summary
Functions
Convert a decoded ISpoke.Reserve tuple into a typed struct.
Types
@type t() :: %Onchain.Aave.V4.Types.SpokeReserveData{ asset_id: non_neg_integer(), borrowable: boolean(), collateral_risk: non_neg_integer(), decimals: non_neg_integer(), dynamic_config_key: non_neg_integer(), flags: non_neg_integer(), frozen: boolean(), hub: String.t(), paused: boolean(), receive_shares_enabled: boolean(), underlying: String.t() }
Functions
Convert a decoded ISpoke.Reserve tuple into a typed struct.
Parameters
raw- 7-element tuple returned by getReserve (exchange_data)
Returns
%SpokeReserveData{} with checksummed addresses and decoded flags (struct)
# descripex:contract
%{
params: %{
raw: %{
description: "7-element tuple returned by getReserve",
source: "Onchain.Aave.V4.Spoke.get_reserve/3",
kind: :exchange_data
}
},
returns: %{
type: :struct,
description: "%SpokeReserveData{} with checksummed addresses and decoded flags"
}
}