BaseToken

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

cacheTwap

getPriceFeed

Get the price feed address

priceFeed is now priceFeedDispatcher, which dispatches either Chainlink or UniswapV3 price

Return Values:

Name
Type
Description

priceFeed

address

the current price feed

isOpen

isPaused

isClosed

getPausedTimestamp

getPausedIndexPrice

getClosedPrice

getIndexPrice

Returns the index price of the token.

we overwrite the index price in BaseToken depending on the status

Parameters:

Name
Type
Description

interval

uint256

The interval represents twap interval.

Return Values:

Name
Type
Description

indexPrice

uint256

Twap price with interval

Last updated

Was this helpful?