ChainlinkLatestBundleData

Documentation for eth_defi.chainlink.bundle_aggregator.ChainlinkLatestBundleData Python class.

class ChainlinkLatestBundleData

Bases: object

Current state returned by a Chainlink bundle aggregator proxy.

Attributes summary

proxy

Bundle proxy contract.

bundle

Feed-specific opaque bundle payload.

updated_at

Chainlink report timestamp as Unix seconds.

decimals

Decimal metadata for feed fields.

description

Human-readable feed description.

aggregator_address

Underlying DataFeedsCache contract emitting report events.

update_time

Return the report timestamp as a naive UTC datetime.

Methods summary

__init__(proxy, bundle, updated_at, ...)

decode_decimal(index, *[, signed])

Decode a numeric field using the proxy-provided decimal scale.

proxy: web3.contract.contract.Contract

Bundle proxy contract.

bundle: bytes

Feed-specific opaque bundle payload.

updated_at: int

Chainlink report timestamp as Unix seconds.

decimals: tuple[int, ...]

Decimal metadata for feed fields.

description: str

Human-readable feed description.

aggregator_address: eth_typing.evm.HexAddress

Underlying DataFeedsCache contract emitting report events.

property update_time: datetime.datetime

Return the report timestamp as a naive UTC datetime.

decode_decimal(index, *, signed=False)

Decode a numeric field using the proxy-provided decimal scale.

Parameters
  • index (int) – Zero-based bundle field index.

  • signed (bool) – Decode a signed integer field.

Returns

Human-readable decimal value.

Raises

IndexError – If the proxy has no decimal metadata for index.

Return type

decimal.Decimal

__init__(proxy, bundle, updated_at, decimals, description, aggregator_address)
Parameters
Return type

None