PriceRepository
Inherits: IPriceRepository, ReentrancyGuard, RelayerAccessManager
Functions
setTokenPriceAt
Set the price of token
denominated in denomination
at the given timestamp
function setTokenPriceAt(address token, address denomination, uint256 timestamp, UD60x18 price) external virtual;
Parameters
Name | Type | Description |
---|---|---|
token | address | The exchange token (ERC20 token) |
denomination | address | The Chainlink token denomination to quote against (ETH, BTC, or USD) |
timestamp | uint256 | Reference timestamp (in seconds) |
price | UD60x18 | The amount of token denominated in denomination (18 decimals) |
_getTokenPriceAt
Returns the price of token
denominated in denomination
at a given timestamp, if zero, a price has
not been recorded
function _getTokenPriceAt(address token, address denomination, uint256 timestamp)
internal
view
returns (UD60x18 price);