MidasRegistryProduct

Documentation for eth_defi.midas.registry.MidasRegistryProduct Python class.

class MidasRegistryProduct

Bases: object

Scanner-friendly Midas product entry.

Attributes summary

network

Midas Hardhat network key from the upstream registry.

chain_id

EVM chain id.

symbol

Midas product symbol, e.g.

token

mToken address.

data_feed

Midas IDataFeed contract exposing getDataInBase18().

custom_feed

Chainlink-compatible public product feed, when present.

deposit_vault

Preferred deposit vault address, when present.

redemption_vault

Preferred redemption vault address, when present.

first_seen_at_block

First block where the product token bytecode exists, when scanned.

first_seen_at

Timestamp of first_seen_at_block as naive UTC datetime, when scanned.

raw

Raw product dictionary from MIDAS_ADDRESSES_PER_NETWORK.

has_required_adapter_data

Can this product be promoted to the shared vault scanner adapter.

has_required_historical_contracts

Can this product be read with the Midas historical datafeed scanner.

rpc_env_var

Get the local JSON-RPC environment variable for this product chain.

Methods summary

__init__(network, chain_id, symbol, token, ...)

network: str

Midas Hardhat network key from the upstream registry.

chain_id: int

EVM chain id.

symbol: str

Midas product symbol, e.g. mTBILL.

token: Optional[str]

mToken address. None for incomplete or bridge-only entries.

data_feed: Optional[str]

Midas IDataFeed contract exposing getDataInBase18().

custom_feed: Optional[str]

Chainlink-compatible public product feed, when present.

deposit_vault: Optional[str]

Preferred deposit vault address, when present.

redemption_vault: Optional[str]

Preferred redemption vault address, when present.

first_seen_at_block: Optional[int]

First block where the product token bytecode exists, when scanned.

first_seen_at: Optional[datetime.datetime]

Timestamp of first_seen_at_block as naive UTC datetime, when scanned.

raw: dict[str, Any]

Raw product dictionary from MIDAS_ADDRESSES_PER_NETWORK.

property rpc_env_var: Optional[str]

Get the local JSON-RPC environment variable for this product chain.

property has_required_historical_contracts: bool

Can this product be read with the Midas historical datafeed scanner.

property has_required_adapter_data: bool

Can this product be promoted to the shared vault scanner adapter.

__init__(network, chain_id, symbol, token, data_feed, custom_feed, deposit_vault, redemption_vault, first_seen_at_block, first_seen_at, raw)
Parameters
Return type

None