FeedRegistry
Inherits: IFeedRegistry
State Variables
WRAPPED_NATIVE_TOKEN
address internal immutable WRAPPED_NATIVE_TOKEN;
WRAPPED_BTC_TOKEN
address internal immutable WRAPPED_BTC_TOKEN;
Functions
constructor
constructor(address _wrappedNativeToken, address _wrappedBTCToken);
batchRegisterFeedMappings
Registers mappings of ERC20 token, and denomination (ETH, BTC, or USD) to feed
function batchRegisterFeedMappings(FeedMappingArgs[] memory args) external virtual;
Parameters
Name | Type | Description |
---|---|---|
args | FeedMappingArgs[] | The arguments for the new mappings |
feed
Returns the feed for token
and denomination
function feed(address token, address denomination) external view returns (address);
Parameters
Name | Type | Description |
---|---|---|
token | address | The exchange token (ERC20 token) |
denomination | address | The Chainlink token denomination to quote against (ETH, BTC, or USD) |
Returns
Name | Type | Description |
---|---|---|
<none> | address | The feed address |
_feed
Returns the feed for token
and denomination
function _feed(address token, address denomination) internal view returns (address);
_feedExists
Returns true if a feed exists for token
and denomination
function _feedExists(address token, address denomination) internal view returns (bool);
_tokenToDenomination
Returns the denomination mapped to token
, if it has one
Should only map wrapped tokens which are guaranteed to have a 1:1 ratio
function _tokenToDenomination(address token) internal view returns (address);
_mapToDenominationAndSort
Returns the sorted and mapped tokens for tokenA
and tokenB
function _mapToDenominationAndSort(address tokenA, address tokenB) internal view returns (address, address);
_mapToDenomination
Returns the mapped tokens for tokenA
and tokenB
function _mapToDenomination(address tokenA, address tokenB)
internal
view
returns (address mappedTokenA, address mappedTokenB);