ChainlinkPriceFeed

Git Source

Inherits: IPriceFeed

State Variables

FEED_TYPE

The type of the price feed.

string public constant FEED_TYPE = 'CHAINLINK';

source

The address of the price feed source (Chainlink Aggregator).

address public immutable source;

stalePriceDelay

The amount of time after which an asset price is considered stale.

uint256 public immutable stalePriceDelay;

decimals

The number of decimals used by the price feed.

uint8 public immutable decimals;

description

The description of the price feed.

string public description;

Functions

constructor

constructor(address source_, uint256 stalePriceDelay_);

Parameters

NameTypeDescription

source_

address

The address of the price feed source (Chainlink Aggregator).

stalePriceDelay_

uint256

The amount of time after which an asset price is considered stale.

getPrice

Get the current price.

function getPrice() external view returns (uint256);

Last updated