Skip to content

Commit

Permalink
ci: update hash
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Dec 10, 2024
1 parent 0ad287c commit bd3c55c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion script/optimized-deployer-meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"constant_product_hash": "0xe174de1f7ab5f7c871f23787d956a8d1b4ebbb3b195eb2d6af27fb3a8c9e812e",
"factory_hash": "0x23864280088f6f71abfba47086784b3c758d1df19a55957e25f1f4bd9336792e",
"stable_hash": "0x3ae886aee24fa2cc0144d24306033a7ed47e91bc0f962e4bffcef5922ae175f5"
"stable_hash": "0x6f62531ebc702a07ab48405ba9437786af3664b83b0da26ec295402590ed738f"
}
2 changes: 1 addition & 1 deletion src/ReservoirDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract ReservoirDeployer {
bytes32 public constant FACTORY_HASH = bytes32(0x23864280088f6f71abfba47086784b3c758d1df19a55957e25f1f4bd9336792e);
bytes32 public constant CONSTANT_PRODUCT_HASH =
bytes32(0xe174de1f7ab5f7c871f23787d956a8d1b4ebbb3b195eb2d6af27fb3a8c9e812e);
bytes32 public constant STABLE_HASH = bytes32(0x3ae886aee24fa2cc0144d24306033a7ed47e91bc0f962e4bffcef5922ae175f5);
bytes32 public constant STABLE_HASH = bytes32(0x6f62531ebc702a07ab48405ba9437786af3664b83b0da26ec295402590ed738f);

// Deployment addresses.
GenericFactory public factory;
Expand Down
5 changes: 4 additions & 1 deletion test/unit/libraries/StableOracleMath.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
pragma solidity ^0.8.10;

import "forge-std/Test.sol";
import { FixedPointMathLib } from "solady/utils/FixedPointMathLib.sol";
import { StableOracleMath, StableMath } from "src/libraries/StableOracleMath.sol";
import { Constants } from "src/Constants.sol";
import { StableOracleMathCanonical } from "test/__mocks/StableOracleMathCanonical.sol";

contract StableOracleMathTest is Test {
using FixedPointMathLib for uint256;

uint256 internal _defaultAmp = Constants.DEFAULT_AMP_COEFF * StableMath.A_PRECISION;

// estimates the spot price by giving a very small input to simulate dx (an infinitesimally small x)
Expand All @@ -18,7 +21,7 @@ contract StableOracleMathTest is Test {
uint256 N_A
) internal pure returns (uint256 rPrice) {
uint256 lInputAmt = 1e8; // anything smaller than 1e7 the error becomes larger, as experimented
uint256 lOut = _getAmountOut(lInputAmt, reserve0, reserve1, token0Multiplier, token1Multiplier, true, 0, N_A);
uint256 lOut = StableMath._getAmountOut(lInputAmt, reserve0, reserve1, token0Multiplier, token1Multiplier, true, 0, N_A);
rPrice = lOut.divWadUp(lInputAmt);
}

Expand Down

0 comments on commit bd3c55c

Please sign in to comment.