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
Validates that the given asset is compatible with this adapter
Reverts with InvalidAdapter if the asset is not compatible
Parameters
| Name | Type | Description |
|---|---|---|
| asset | address | The address of the asset to validate |