> For the complete documentation index, see [llms.txt](https://gnosza.gitbook.io/token-price-oracle/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gnosza.gitbook.io/token-price-oracle/developer/smart-contracts/tickerusdfeedregistry.md).

# TickerUSDFeedRegistry

The TickerUSDFeedRegistry is the single source of truth for tracking the current feed addresses as well as keeping the relayers in sync on what tickers should be kept track of.

<figure><img src="https://3820821826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp1AG2kVgPxoINkE4ESqB%2Fuploads%2FjyfSIGHhNY2WDPinFCkt%2FScreenshot%202023-12-15%20at%2019.37.46.png?alt=media&amp;token=f05096ec-7644-436b-b356-b189f11ba6b8" alt=""><figcaption></figcaption></figure>

## The Smart Contract API <a href="#solidity-api" id="solidity-api"></a>

### ITickerUSDFeedRegistry <a href="#itickerusdfeedregistry" id="itickerusdfeedregistry"></a>

#### TickerFeedUpdated <a href="#tickerfeedupdated" id="tickerfeedupdated"></a>

```solidity
event TickerFeedUpdated(string ticker, address feedAddress)
```

Emitter when a new ticker and its corresponding feed are added

#### getTickerFeed <a href="#gettickerfeed" id="gettickerfeed"></a>

```solidity
function getTickerFeed(string ticker) external view returns (address feedAddress)
```

Function for fetching the Chainlink USD Price feed address for a given ticker

**Parameters**

| Name   | Type   | Description         |
| ------ | ------ | ------------------- |
| ticker | string | - The ticker symbol |

**Return Values**

| Name        | Type    | Description                                       |
| ----------- | ------- | ------------------------------------------------- |
| feedAddress | address | - Address of the Ticker<>USD Chainlink price feed |

#### setTickerFeed <a href="#settickerfeed" id="settickerfeed"></a>

```solidity
function setTickerFeed(string ticker, address feedAddress) external
```

Function for adding new ticker and its corresponding feed address to the registry

**Parameters**

| Name        | Type    | Description                                       |
| ----------- | ------- | ------------------------------------------------- |
| ticker      | string  | - The ticker symbol                               |
| feedAddress | address | - Address of the Ticker<>USD Chainlink price feed |

**📅 Events**

* Emits a `TickerFeedUpdated` event
