diff --git a/script/optimized-deployer-meta b/script/optimized-deployer-meta index f951129d..1bd97351 100644 --- a/script/optimized-deployer-meta +++ b/script/optimized-deployer-meta @@ -1,6 +1,6 @@ { - "constant_product_hash": "0x7b0f16c5cf2f4e78c4f697bfefb1365008f8865aaaa942f46ced4e0dea45c42a", - "factory_hash": "0xab6a26d7fb7b6df7e81d9f9354f8b767b5ac11b732f1b3f2e9d6e5b69a7d0754", - "oracle_caller_hash": "0x0d71d4a05b676bfbccd00e8422375c347a056fb93cc502cc962d5e6912213b04", - "stable_hash": "0xc5b9d3031f577510c547b9465241780111ad9d25a80dbe2292d1dc4290d9cd5a" + "constant_product_hash": "0x356ae496acb4119a46481b3326102cb38281aad285e579d14598f6c5bb76f5e2", + "factory_hash": "0xae59efa1baf1113957e748f189c8eb9271c4a0d919c8af03d26ae4fbddb51e81", + "oracle_caller_hash": "0xf130f5cb7eebcf57bac9f5d273fd8cc18dfb1b3f48d114a5e6a8230440d50e0f", + "stable_hash": "0xa4bb872f2e22f611d0fd1ff88d960edc58283528282cb20aab4fbe14da557300" } \ No newline at end of file diff --git a/src/ReservoirDeployer.sol b/src/ReservoirDeployer.sol index 21ed0f04..1a46177b 100644 --- a/src/ReservoirDeployer.sol +++ b/src/ReservoirDeployer.sol @@ -17,12 +17,12 @@ contract ReservoirDeployer { uint256 public step = 0; // Bytecode hashes. - bytes32 public constant FACTORY_HASH = bytes32(0xab6a26d7fb7b6df7e81d9f9354f8b767b5ac11b732f1b3f2e9d6e5b69a7d0754); + bytes32 public constant FACTORY_HASH = bytes32(0xae59efa1baf1113957e748f189c8eb9271c4a0d919c8af03d26ae4fbddb51e81); bytes32 public constant CONSTANT_PRODUCT_HASH = - bytes32(0x7b0f16c5cf2f4e78c4f697bfefb1365008f8865aaaa942f46ced4e0dea45c42a); - bytes32 public constant STABLE_HASH = bytes32(0xc5b9d3031f577510c547b9465241780111ad9d25a80dbe2292d1dc4290d9cd5a); + bytes32(0x356ae496acb4119a46481b3326102cb38281aad285e579d14598f6c5bb76f5e2); + bytes32 public constant STABLE_HASH = bytes32(0xa4bb872f2e22f611d0fd1ff88d960edc58283528282cb20aab4fbe14da557300); bytes32 public constant ORACLE_CALLER_HASH = - bytes32(0x0d71d4a05b676bfbccd00e8422375c347a056fb93cc502cc962d5e6912213b04); + bytes32(0xf130f5cb7eebcf57bac9f5d273fd8cc18dfb1b3f48d114a5e6a8230440d50e0f); // Deployment addresses. GenericFactory public factory; diff --git a/test/unit/OracleWriter.t.sol b/test/unit/OracleWriter.t.sol index 6fecd727..96b81f71 100644 --- a/test/unit/OracleWriter.t.sol +++ b/test/unit/OracleWriter.t.sol @@ -7,6 +7,7 @@ import { LogCompression } from "src/libraries/LogCompression.sol"; import { FactoryStoreLib } from "src/libraries/FactoryStore.sol"; import { ConstantProductOracleMath } from "src/libraries/ConstantProductOracleMath.sol"; import { StableOracleMath } from "src/libraries/StableOracleMath.sol"; +import { Buffer } from "src/libraries/Buffer.sol"; import { GenericFactory } from "src/GenericFactory.sol"; import { Constants } from "src/Constants.sol"; @@ -193,7 +194,7 @@ contract OracleWriterTest is BaseTest { // sanity (,,, uint16 lIndex) = _pair.getReserves(); Observation memory lObs = _oracleCaller.observation(_pair, lIndex); - assertEq(lIndex, type(uint16).max); + assertEq(lIndex, Buffer.SIZE - 1); assertEq(LogCompression.fromLowResLog(lObs.logInstantRawPrice), lOriginalPrice, "instant 1"); // act @@ -204,7 +205,7 @@ contract OracleWriterTest is BaseTest { (,,, lIndex) = _pair.getReserves(); lObs = _oracleCaller.observation(_pair, lIndex); - assertEq(lIndex, type(uint16).max); + assertEq(lIndex, Buffer.SIZE - 1); assertNotEq(LogCompression.fromLowResLog(lObs.logInstantRawPrice), lOriginalPrice); assertNotEq(LogCompression.fromLowResLog(lObs.logInstantClampedPrice), lOriginalPrice);