IRioLRTAssetRegistry
Functions
initialize
Initializes the asset registry contract.
Parameters
Name | Type | Description |
---|---|---|
|
| The initial owner of the contract. |
|
| The address of the liquid restaking token. |
|
| The number of decimals that all price feeds must use. |
|
| The initial supported asset configurations. |
getTVL
Returns the total value of all assets in the unit of account.
getTVLForAsset
Returns the total value of the underlying asset in the unit of account.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getTotalBalanceForAsset
Returns the total balance of the asset, including the deposit pool and EigenLayer.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
isSupportedAsset
Checks if a given asset is supported.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to check. |
getAssetInfoByAddress
Returns information about an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetStrategy
Returns the asset's EigenLayer strategy.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetSharesHeld
Returns the amount of EigenLayer shares held for an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getAssetDepositCap
Returns the asset's current deposit cap.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
getSupportedAssets
Returns an array of all supported assets.
getAssetStrategies
Returns the EigenLayer strategies for all supported assets.
increaseSharesHeldForAsset
Increases the number of EigenLayer shares held for an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The amount of EigenLayer shares to increase. |
decreaseSharesHeldForAsset
Decreases the number of EigenLayer shares held for an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The amount of EigenLayer shares to decrease. |
increaseUnverifiedValidatorETHBalance
Increases the unverified validator ETH balance.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to increase. |
decreaseUnverifiedValidatorETHBalance
Decreases the unverified validator ETH balance.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to decrease. |
convertToUnitOfAccountFromAsset
Converts an asset amount to its equivalent value in the unit of account. The unit of account is the price feed's quote asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to convert. |
|
| The amount of the asset to convert. |
convertFromUnitOfAccountToAsset
Converts the unit of account value to its equivalent in the asset. The unit of account is the price feed's quote asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to convert to. |
|
| The asset's value in the unit of account. |
convertToSharesFromAsset
Converts an amount of an asset to the equivalent amount of EigenLayer shares.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset to convert. |
|
| The amount of the asset to convert. |
convertFromSharesToAsset
Converts an amount of EigenLayer shares to the equivalent amount of an asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The EigenLayer strategy. |
|
| The amount of EigenLayer shares. |
Events
AssetAdded
Emitted when a new asset is added.
Parameters
Name | Type | Description |
---|---|---|
|
| The asset's configuration. |
AssetRemoved
Emitted when an asset is removed.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| True if the asset was removed by force, regardless of its balance. |
AssetDepositCapSet
Emitted when an asset's EigenLayer strategy is set.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The new deposit cap. |
AssetPriceFeedSet
Emitted when an asset's price feed is set.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The new price feed. |
AssetSharesIncreased
Emitted when the number of EigenLayer shares held for an asset is increased.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The amount of EigenLayer shares to increase. |
AssetSharesDecreased
Emitted when the number of EigenLayer shares held for an asset is decreased.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
|
| The amount of EigenLayer shares to decrease. |
UnverifiedValidatorETHBalanceIncreased
Emitted when the unverified validator ETH balance is increased.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to increase. |
UnverifiedValidatorETHBalanceDecreased
Emitted when the unverified validator ETH balance is decreased.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to decrease. |
Errors
ONLY_WITHDRAWAL_QUEUE_OR_DEPOSIT_POOL
Thrown when the caller is not the LRT withdrawal queue or deposit pool.
ASSET_NOT_SUPPORTED
Thrown when attempting an action on an unsupported asset.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
ASSET_ALREADY_SUPPORTED
Thrown when attempting to add an asset that is already supported.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the asset. |
ASSET_HAS_BALANCE
Thrown when attempting to remove an asset with a non-zero balance.
INVALID_ASSET_ADDRESS
Thrown when attempting to add an asset with an invalid address.
INVALID_ASSET_DECIMALS
Thrown when an asset has greater than 18 decimals.
INVALID_STRATEGY
Thrown when a srategy's underlying token does not match the asset.
INVALID_PRICE_FEED_DECIMALS
Thrown when a provided price feed has an unexpected amount of decimals.
INVALID_PRICE_FEED
Thrown when a price feed is provided when not needed, or not provided when required.
Structs
AssetConfig
The configuration used to add a new asset.
AssetInfo
Information about a supported asset.
Last updated