erc_4626.scan
Documentation for eth_defi.erc_4626.scan Python module.
Turn vault discoveries to human-readable and machine-readable tables.
Module Attributes
Permission reporting is optional, but must not hide adapter programming errors. |
Functions
|
Create a row in the result table. |
Process remaining vault data reads using multiprocessing |
|
|
Read a vault-wide deposit permission policy for a scan record. |
- DEPOSIT_PERMISSION_READ_EXCEPTIONS = (<class 'NotImplementedError'>, <class 'ConnectionError'>, <class 'TimeoutError'>, <class 'eth_abi.exceptions.DecodingError'>, <class 'web3.exceptions.BadFunctionCallOutput'>, <class 'web3.exceptions.ContractLogicError'>, <class 'eth_defi.provider.fallback.ExtraValueError'>, <class 'web3.exceptions.MismatchedABI'>, <class 'requests.exceptions.RequestException'>, <class 'web3.exceptions.Web3RPCError'>)
Permission reporting is optional, but must not hide adapter programming errors. Keep this deliberately narrower than BEST_EFFORT_READ_EXCEPTIONS.
- fetch_deposit_permission(vault)
Read a vault-wide deposit permission policy for a scan record.
The report remains usable when a deployed adapter version lacks the protocol-specific view method or its node cannot answer a view call. It intentionally catches only concrete transport, ABI and contract-call failures: implementation bugs such as
AttributeErrorandTypeErrorpropagate to the row-level scanner guard instead of becomingunknown.- Parameters
vault (eth_defi.vault.base.VaultBase) – Protocol adapter whose vault-wide policy is queried.
- Returns
JSON-compatible enum representing whitelist policy or an explicitly unknown policy.
- Return type
- create_vault_scan_record(web3, detection, block_identifier, token_cache)
Create a row in the result table.
Connect to the chain to read further vault metadata via JSON-RPC calls
- Returns
Dict for human-readable tables, with internal columns prefixed with å underscore
- Parameters
web3 (web3.main.Web3) –
detection (eth_defi.erc_4626.core.ERC4262VaultDetection) –
block_identifier (Union[Literal['latest', 'earliest', 'pending', 'safe', 'finalized'], eth_typing.evm.BlockNumber, eth_typing.evm.Hash32, eth_typing.encoding.HexStr, hexbytes.main.HexBytes, int]) –
token_cache (eth_defi.token.TokenDiskCache) –
- Return type
- create_vault_scan_record_subprocess(web3factory, detection, block_number)
Process remaining vault data reads using multiprocessing
Runs in a subprocess
Because
Vaultclasses does reads using Python instance objects in serial manner, we want to speed up by doing many vaults parallel
- Parameters
web3factory (eth_defi.event_reader.web3factory.Web3Factory) –
detection (eth_defi.erc_4626.core.ERC4262VaultDetection) –
block_number (int) –
- Return type