RoycoAssetClaims
Documentation for eth_defi.erc_4626.vault_protocol.royco.vault.RoycoAssetClaims Python class.
- class RoycoAssetClaims
Bases:
objectRoyco tranche asset claims.
Royco tranche vaults return this struct from
totalAssets(),convertToAssets(uint256),previewRedeem(uint256)andredeem(...).Attributes summary
st_assetsjt_assetsnavMethods summary
__init__(st_assets, jt_assets, nav)convert_jt_assets_to_decimal(tranche_unit_token)Convert junior tranche asset claims to a decimal value.
convert_nav_to_decimal(nav_unit_token)Convert Royco raw NAV units to a decimal value.
convert_st_assets_to_decimal(tranche_unit_token)Convert senior tranche asset claims to a decimal value.
- __init__(st_assets, jt_assets, nav)
- convert_jt_assets_to_decimal(tranche_unit_token)
Convert junior tranche asset claims to a decimal value.
Royco’s
AssetClaimsstruct stores tranche asset claims as raw token-like units. Useeth_defi.token.TokenDetailsfor the conversion so the caller chooses the correct unit precision instead of hardcoding decimals.- Parameters
tranche_unit_token (eth_defi.token.TokenDetails) – Token details that define the junior tranche asset unit precision.
- Returns
Junior tranche asset claims as a decimal value.
- Return type
- convert_nav_to_decimal(nav_unit_token)
Convert Royco raw NAV units to a decimal value.
Royco’s ABI exposes NAV values as
NAV_UNITinstead of a plain ERC-20 asset amount. For the currently deployed tranche contracts, this unit uses the tranche share token precision, while the denomination token may have a different number of decimals. Useeth_defi.token.TokenDetailsfor the conversion so the reader does not hardcode token precision.- Parameters
nav_unit_token (eth_defi.token.TokenDetails) – Token details that define the NAV unit decimal precision.
- Returns
Decimal NAV value.
- Return type
- convert_st_assets_to_decimal(tranche_unit_token)
Convert senior tranche asset claims to a decimal value.
Royco’s
AssetClaimsstruct stores tranche asset claims as raw token-like units. Useeth_defi.token.TokenDetailsfor the conversion so the caller chooses the correct unit precision instead of hardcoding decimals.- Parameters
tranche_unit_token (eth_defi.token.TokenDetails) – Token details that define the senior tranche asset unit precision.
- Returns
Senior tranche asset claims as a decimal value.
- Return type