Twa
Functions
updateValue
Update the TWA (Time-Weighted Average) value in the State memory.
Parameters
self
IMaverickV2Pool.State
The State memory to update.
value
int256
The new value to set.
lookback
uint256
The lookback period to use for calculating the TWA.
floor
Get the floored TWA value from the State memory.
Parameters
self
IMaverickV2Pool.State
The State memory to read from.
Returns
<none>
int32
The floored TWA value as an int32.
getTwa
Get the TWA value from the State memory, considering a lookback period.
Parameters
self
IMaverickV2Pool.State
The State memory to read from.
lookback
uint256
The lookback period to use for calculating the TWA.
Returns
<none>
int256
The TWA value as an int256.
getTwaFloor
Get the floored TWA value from the State memory, based on the lookback period.
Parameters
self
IMaverickV2Pool.State
The State memory to read from.
lookback
uint256
The lookback period to use for calculating the TWA.
Returns
<none>
int32
The floored TWA value as an int32.
Last updated