From 1a76a6fe01f1d2b9bf4dbfc245dadb0f118c9b3a Mon Sep 17 00:00:00 2001 From: "A.L." Date: Wed, 8 Jan 2025 20:41:12 +0800 Subject: [PATCH] fix: rm fix for #44 --- script/optimized-deployer-meta | 4 ++-- src/ReservoirDeployer.sol | 4 ++-- src/ReservoirPair.sol | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/script/optimized-deployer-meta b/script/optimized-deployer-meta index d81a34f2..f5f188ac 100644 --- a/script/optimized-deployer-meta +++ b/script/optimized-deployer-meta @@ -1,5 +1,5 @@ { - "constant_product_hash": "0xa49ba7e8b83be6b17358995a87c89151ef09aeb778b99e4baa93e81fd5a4b4db", + "constant_product_hash": "0xddd075b1901512190892da217db5c4d266a6831226e14669e690aeb663dd9cf3", "factory_hash": "0x87b0f73fafcf4bb41e013c8423dc679f6885527007d6c3f1e1834a670cbaadc5", - "stable_hash": "0xbc172f11e29b944a0cb3855c6390eb54763f6aa4ebc54719874d5319ffc44d69" + "stable_hash": "0xa52a6e20c3811c44bda8bc9f7988dd62da3c611711900f85d465b64bf97066af" } \ No newline at end of file diff --git a/src/ReservoirDeployer.sol b/src/ReservoirDeployer.sol index cac46aa4..c92b211a 100644 --- a/src/ReservoirDeployer.sol +++ b/src/ReservoirDeployer.sol @@ -27,8 +27,8 @@ contract ReservoirDeployer { // Bytecode hashes. bytes32 public constant FACTORY_HASH = bytes32(0x87b0f73fafcf4bb41e013c8423dc679f6885527007d6c3f1e1834a670cbaadc5); bytes32 public constant CONSTANT_PRODUCT_HASH = - bytes32(0xa49ba7e8b83be6b17358995a87c89151ef09aeb778b99e4baa93e81fd5a4b4db); - bytes32 public constant STABLE_HASH = bytes32(0xbc172f11e29b944a0cb3855c6390eb54763f6aa4ebc54719874d5319ffc44d69); + bytes32(0xddd075b1901512190892da217db5c4d266a6831226e14669e690aeb663dd9cf3); + bytes32 public constant STABLE_HASH = bytes32(0xa52a6e20c3811c44bda8bc9f7988dd62da3c611711900f85d465b64bf97066af); // Deployment addresses. GenericFactory public factory; diff --git a/src/ReservoirPair.sol b/src/ReservoirPair.sol index 6262dd16..0854e1b9 100644 --- a/src/ReservoirPair.sol +++ b/src/ReservoirPair.sol @@ -129,13 +129,12 @@ abstract contract ReservoirPair is IAssetManagedPair, ReservoirERC20, RGT { // a new sample is not written for the first mint // shortcut to calculate lTimeElapsed > 0 && aReserve0 > 0 && aReserve1 > 0 if (lTimeElapsed * aReserve0 * aReserve1 > 0) { - if (lPrevious.timestamp != 0) assert(aBlockTimestampLast == lPrevious.timestamp); (, int256 lLogInstantClampedPrice) = _calcClampedPrice( lInstantRawPrice, lLogInstantRawPrice, LogCompression.fromLowResLog(lPrevious.logInstantClampedPrice), lTimeElapsed, - aBlockTimestampLast + aBlockTimestampLast // assert: aBlockTimestampLast == lPrevious.timestamp ); _updateOracleNewSample( lPrevious, lLogInstantRawPrice, lLogInstantClampedPrice, lTimeElapsed, lBlockTimestamp, aIndex