Skip to content

Commit

Permalink
fix: rm fix for #44
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Jan 8, 2025
1 parent 3b359d3 commit 1a76a6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions script/optimized-deployer-meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"constant_product_hash": "0xa49ba7e8b83be6b17358995a87c89151ef09aeb778b99e4baa93e81fd5a4b4db",
"constant_product_hash": "0xddd075b1901512190892da217db5c4d266a6831226e14669e690aeb663dd9cf3",
"factory_hash": "0x87b0f73fafcf4bb41e013c8423dc679f6885527007d6c3f1e1834a670cbaadc5",
"stable_hash": "0xbc172f11e29b944a0cb3855c6390eb54763f6aa4ebc54719874d5319ffc44d69"
"stable_hash": "0xa52a6e20c3811c44bda8bc9f7988dd62da3c611711900f85d465b64bf97066af"
}
4 changes: 2 additions & 2 deletions src/ReservoirDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/ReservoirPair.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a76a6f

Please sign in to comment.