You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add underlying_asset to the SRC-6 specification. This would return the AssetId of the underlying asset for a vault or sub-vault.
Motivation
A standard way to get the underlying token address from a vault. Asset ID is used to retrieve information in the existing read functions and is critical for the context of a vault.
This standard used ERC4626 as a reference, which has the asset function.
Specification
fn underlying_asset(vault_sub_id: SubId) -> Option<AssetId>
The function returns the AssetId of the underlying asset for a vault. The function takes vault_sub_id as an argument and returns the ID of the asset deposited in the vault.
The function MUST return Some if the vault_sub_id exists
The function MUST return None if the vault_sub_id does not exist
The text was updated successfully, but these errors were encountered:
I dont expect wallets to show the live underlying amount, or even the asset, and if they do they will likely use the indexer. To reduce storage costs as much as possible we have not made the mentioned method mandatory. However ofcourse if your usecase needs it you are free to implement it for your contract
Motivation
Description
Add underlying_asset to the SRC-6 specification. This would return the AssetId of the underlying asset for a vault or sub-vault.
Motivation
A standard way to get the underlying token address from a vault. Asset ID is used to retrieve information in the existing read functions and is critical for the context of a vault.
This standard used ERC4626 as a reference, which has the
asset
function.Specification
fn underlying_asset(vault_sub_id: SubId) -> Option<AssetId>
The function returns the AssetId of the underlying asset for a vault. The function takes vault_sub_id as an argument and returns the ID of the asset deposited in the vault.
The text was updated successfully, but these errors were encountered: