ISLAYOracle
Interface for the SatLayer Oracle contract to manage and retrieve price data for vaults.
Functions
getPriceId
Returns the price ID for a given asset.
function getPriceId(address asset) external view returns (bytes32);
Parameters
Name | Type | Description |
---|---|---|
asset | address | The asset address to query. |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes32 | priceId The price feed identifier for the asset. |
setPriceId
Sets or updates the price ID for an asset.
Only callable by the contract owner.
function setPriceId(address asset, bytes32 priceId) external;
Parameters
Name | Type | Description |
---|---|---|
asset | address | The asset address as key. |
priceId | bytes32 | The price feed identifier to associate with the asset. |
getPrice
Fetches the price for a given price ID.
function getPrice(bytes32 priceId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
priceId | bytes32 | The price feed identifier to query. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | price The price in minor units (18 decimals). |
getPrice
Fetches the price for a given asset
function getPrice(address asset) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
asset | address | The asset address to query. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | price The price in minor units (18 decimals). |
getOperatorAUM
Computes an operator’s total Assets Under Management (AUM) in USD minor units (18 decimals).
Any underlying asset with more than 18 decimals might lose precision.
function getOperatorAUM(address operator) external view returns (uint256 aum);
Parameters
Name | Type | Description |
---|---|---|
operator | address | The operator address whose vaults will be aggregated. |
Returns
Name | Type | Description |
---|---|---|
aum | uint256 | Total AUM in USD expressed with 18 decimals. |
getVaultAUM
Computes a vault’s Assets Under Management (AUM) in USD minor units (18 decimals).
Any underlying asset with more than 18 decimals might lose precision.
function getVaultAUM(address vault) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
vault | address | The vault address to query. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | aum Vault AUM in USD expressed with 18 decimals. |
Events
PriceIdSet
Emitted when a price ID is set or updated for an asset.
event PriceIdSet(address indexed asset, bytes32 indexed priceId);
Parameters
Name | Type | Description |
---|---|---|
asset | address | The asset address. |
priceId | bytes32 | The price feed identifier associated with the asset. |
Errors
PriceIdNotSet
Emitted when a price ID is not set for an asset.
error PriceIdNotSet(address asset);
Parameters
Name | Type | Description |
---|---|---|
asset | address | The asset address. |