Functions
initialize
function initialize(
) external
pause
function pause(
) external
close
function close(
) external
close
function close(
) external
setPriceFeed
function setPriceFeed(
) external
priceFeed is now priceFeedDispatcher, which dispatches either Chainlink or UniswapV3 price
function cacheTwap(
) external
function getPriceFeed(
) external returns (address)
Get the price feed address
priceFeed is now priceFeedDispatcher, which dispatches either Chainlink or UniswapV3 price
function isOpen(
) external returns (bool)
function isPaused(
) external returns (bool)
function isClosed(
) external returns (bool)
function getPausedTimestamp(
) external returns (uint256)
function getPausedIndexPrice(
) external returns (uint256)
function getClosedPrice(
) external returns (uint256)
function getIndexPrice(
uint256 interval
) public returns (uint256)
Returns the index price of the token.
we overwrite the index price in BaseToken depending on the status
1. Open: the price is from the price feed
2. Paused or Closed: the price is twap when the token was paused
The interval represents twap interval.