onSwap
onSwap
to ask the pool what the amounts should be. Pools that use weighted math only need the input/output tokens to determine price.enableOracle
getMiscData
getLargestSafeQueryWindow
getLatest
variable
enum you pass.getTimeWeightedAverage
secs
is the duration of the query in seconds, and ago
is the time in seconds from since end of that duration. Prices are represented as 18 decimal fixed point values.getTimeWeightedAverage
after the buffer is full, or it will revert with ORACLE_NOT_INITIALIZED
. If you call getSample(1023)
and it returns 0's, that means the buffer's not full yet.getPastAccumulators
ago
seconds ago for each query.