normalise_mellow_created_log

Documentation for eth_defi.mellow.discovery.normalise_mellow_created_log function.

normalise_mellow_created_log(log)

Normalise a raw JSON-RPC or Hypersync log for Mellow decoding.

Hypersync returns attribute-like objects, while the JSON-RPC event reader returns dictionaries. This helper creates the small common surface consumed by decode_mellow_created_event() and create_mellow_factory_candidate().

Parameters

log (Any) – Raw log object.

Returns

Namespace with address, topics, data, block_number, transaction_hash and log_index attributes.

Return type

Any