VaultSpec
Documentation for eth_defi.vault.base.VaultSpec Python class.
- class VaultSpec
Bases:
objectUnique id for a vault.
Each vault can be identified by smart contract address by one of the contracts, related to its deployment. Usually this contract is vault contract itself.
We need both chain and address to specify vault we mean.
Attributes summary
Ethereum chain id
Vault smart contract address or whatever is the primary address for unravelling a vault deployment for a vault protocol.
Methods summary
__init__(chain_id, vault_address)as_string_id()parse_string(spec[, separator])Parse vault spec from a string.
- chain_id: int
Ethereum chain id
- vault_address: Union[eth_typing.evm.HexAddress, str]
Vault smart contract address or whatever is the primary address for unravelling a vault deployment for a vault protocol.
Always forced to lowercase.
- static parse_string(spec, separator='auto')
Parse vault spec from a string.
- __init__(chain_id, vault_address)
- Parameters
chain_id (int) –
vault_address (Union[eth_typing.evm.HexAddress, str]) –
- Return type
None