TWAPOracleUpdater
Inherits: ERC20Permit, VaultOwned
State Variables
_dexPoolsTWAPSources
EnumerableSet.AddressSet private _dexPoolsTWAPSources;
twapOracle
ITWAPOracle public twapOracle;
twapEpochPeriod
uint256 public twapEpochPeriod;
Functions
constructor
constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_, decimals_);
changeTWAPOracle
function changeTWAPOracle(address newTWAPOracle_) external onlyOwner;
changeTWAPEpochPeriod
function changeTWAPEpochPeriod(uint256 newTWAPEpochPeriod_) external onlyOwner;
addTWAPSource
function addTWAPSource(address newTWAPSourceDexPool_) external onlyOwner;
removeTWAPSource
function removeTWAPSource(address twapSourceToRemove_) external onlyOwner;
_uodateTWAPOracle
function _uodateTWAPOracle(address dexPoolToUpdateFrom_, uint256 twapEpochPeriodToUpdate_) internal;
_beforeTokenTransfer
function _beforeTokenTransfer(address from_, address to_, uint256 amount_) internal virtual override;
Events
TWAPOracleChanged
event TWAPOracleChanged(address indexed previousTWAPOracle, address indexed newTWAPOracle);
TWAPEpochChanged
event TWAPEpochChanged(uint256 previousTWAPEpochPeriod, uint256 newTWAPEpochPeriod);
TWAPSourceAdded
event TWAPSourceAdded(address indexed newTWAPSource);
TWAPSourceRemoved
event TWAPSourceRemoved(address indexed removedTWAPSource);