create_wildcat_market_candidate
Documentation for eth_defi.erc_4626.vault_protocol.wildcat.discovery.create_wildcat_market_candidate function.
- create_wildcat_market_candidate(chain_id, log, timestamp)
Decode a version 2 market from a registry
MarketAddedlog.marketis not indexed, so it is decoded from the log data. The indexed controller identifies the market version:HooksFactoryregisters version 2 markets, while per-borrower controllers registered version 1 markets.- Parameters
chain_id (int) – EVM chain id of the log.
log (Any) – Hypersync log of a registry
MarketAddedevent, with hex stringtopicsanddata.timestamp (datetime.datetime) – Naive UTC timestamp of the log block.
- Returns
Market candidate, or
Nonefor a version 1 market.- Raises
ValueError – If the log does not have the expected layout.
- Return type
Optional[eth_defi.erc_4626.vault_protocol.wildcat.discovery.WildcatMarketCandidate]