fetch_tranche_id

Documentation for eth_defi.erc_4626.vault_protocol.centrifuge.centrifuge_utils.fetch_tranche_id function.

fetch_tranche_id(web3, vault_address, block_identifier='latest')

Fetch the Centrifuge tranche ID for a given vault.

Each Centrifuge vault belongs to a specific tranche within a pool, identified by a bytes16 trancheId.

Parameters
  • web3 (web3.main.Web3) – Web3 instance

  • vault_address (str) – The address of the Centrifuge LiquidityPool vault contract

  • block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, int]) – Block number or ‘latest’

Returns

The tranche ID as bytes

Return type

bytes