From 89ba783548b01f357833b9a7e4acb932f982ff17 Mon Sep 17 00:00:00 2001 From: "A.L" Date: Mon, 22 Jan 2024 22:17:52 +0800 Subject: [PATCH] feat: use mapping instead of array for oracle observations --- src/ReservoirPair.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ReservoirPair.sol b/src/ReservoirPair.sol index 01f8887e..48f0acdc 100644 --- a/src/ReservoirPair.sol +++ b/src/ReservoirPair.sol @@ -487,7 +487,7 @@ abstract contract ReservoirPair is IAssetManagedPair, ReservoirERC20 { string internal constant MAX_CHANGE_RATE_NAME = "Shared::maxChangeRate"; string internal constant ORACLE_CALLER_NAME = "Shared::oracleCaller"; - Observation[65_536] internal _observations; + mapping(uint16 => Observation) internal _observations; // maximum allowed rate of change of price per second // to mitigate oracle manipulation attacks in the face of post-merge ETH