Skip to content

IAssetManager

IAssetManager

registerAsset

function registerAsset(bytes4 assetClass, address original) external

Register a new asset.

Name Type Description
assetClass bytes4 Asset class identifier.
original address The original assets address.

depositAsset

function depositAsset(struct Assets.Asset asset, address from) external

Transfers an asset to the vault using associated controller.

Name Type Description
asset struct Assets.Asset Asset and its value.
from address The owner of the asset.

withdrawAsset

function withdrawAsset(struct Assets.Asset asset) external

Withdraw asset from the vault using associated controller to owner.

Name Type Description
asset struct Assets.Asset Asset and its value.

assetClassController

function assetClassController(bytes4 assetClass) external view returns (address)

Retrieve the asset class controller for a given assetClass.

Name Type Description
assetClass bytes4 Asset class identifier.
Name Type Description
[0] address The asset class controller.

supportedAssetCount

function supportedAssetCount() external view returns (uint256)

Returns the number of currently supported assets.

Name Type Description
[0] uint256 Asset count.

supportedAssets

function supportedAssets(uint256 offset, uint256 limit) external view returns (address[], struct Assets.AssetConfig[])

Returns the list of all supported asset addresses.

Name Type Description
offset uint256 Starting index.
limit uint256 Max number of items.
Name Type Description
[0] address[] List of original asset addresses.
[1] struct Assets.AssetConfig[] List of asset config structures.