IPriceAdapter
IPriceAdapter
Interface for price adapters
getPriceData
function getPriceData(address asset) external view returns (uint256 price, uint8 decimals)
Get the price data for an asset
The asset shall be whitelisted in the OrionConfig contract. The registry will handle normalization to priceAdapterDecimals.
Parameters
| Name | Type | Description |
|---|---|---|
| asset | address | The address of the asset to get the price for |
Return Values
| Name | Type | Description |
|---|---|---|
| price | uint256 | The raw price of the asset |
| decimals | uint8 | The number of decimals for the returned price |
validatePriceAdapter
function validatePriceAdapter(address asset) external view returns (bool)
Validates that the given asset is compatible with this adapter
Parameters
| Name | Type | Description |
|---|---|---|
| asset | address | The address of the asset to validate |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | bool | true if the asset is compatible, reverts otherwise |