Skip to content

Commit

Permalink
chore: update v4 core (#115)
Browse files Browse the repository at this point in the history
* Update v4-core

* CurrencySettleTake -> CurrencySettler

* Snapshots
  • Loading branch information
qiwu7 authored May 31, 2024
1 parent ad7976a commit 5082779
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeAddInitialLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
311243
311073
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeAddLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
123052
122882
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeFirstSwap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
82356
80283
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeInitialize.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1016091
1015169
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeRemoveLiquidity.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
110705
110476
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeRemoveLiquidityAndRebalance.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
240800
239954
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeSecondSwap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
47770
45993
2 changes: 1 addition & 1 deletion .forge-snapshots/FullRangeSwap.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
81129
79414
2 changes: 1 addition & 1 deletion .forge-snapshots/TWAMMSubmitOrder.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
122417
122355
4 changes: 2 additions & 2 deletions contracts/hooks/examples/FullRange.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {BaseHook} from "../../BaseHook.sol";
import {SafeCast} from "@uniswap/v4-core/src/libraries/SafeCast.sol";
import {IHooks} from "@uniswap/v4-core/src/interfaces/IHooks.sol";
import {CurrencyLibrary, Currency} from "@uniswap/v4-core/src/types/Currency.sol";
import {CurrencySettleTake} from "@uniswap/v4-core/src/libraries/CurrencySettleTake.sol";
import {CurrencySettler} from "@uniswap/v4-core/test/utils/CurrencySettler.sol";
import {TickMath} from "@uniswap/v4-core/src/libraries/TickMath.sol";
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {IERC20Minimal} from "@uniswap/v4-core/src/interfaces/external/IERC20Minimal.sol";
Expand All @@ -28,7 +28,7 @@ import "../../libraries/LiquidityAmounts.sol";

contract FullRange is BaseHook, IUnlockCallback {
using CurrencyLibrary for Currency;
using CurrencySettleTake for Currency;
using CurrencySettler for Currency;
using PoolIdLibrary for PoolKey;
using SafeCast for uint256;
using SafeCast for uint128;
Expand Down
4 changes: 2 additions & 2 deletions contracts/hooks/examples/LimitOrder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {IERC20Minimal} from "@uniswap/v4-core/src/interfaces/external/IERC20Mini
import {IERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import {BaseHook} from "../../BaseHook.sol";
import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol";
import {CurrencySettleTake} from "@uniswap/v4-core/src/libraries/CurrencySettleTake.sol";
import {CurrencySettler} from "@uniswap/v4-core/test/utils/CurrencySettler.sol";
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
import {StateLibrary} from "@uniswap/v4-core/src/libraries/StateLibrary.sol";
Expand All @@ -33,7 +33,7 @@ contract LimitOrder is BaseHook {
using EpochLibrary for Epoch;
using PoolIdLibrary for PoolKey;
using CurrencyLibrary for Currency;
using CurrencySettleTake for Currency;
using CurrencySettler for Currency;
using StateLibrary for IPoolManager;

error ZeroLiquidity();
Expand Down
4 changes: 2 additions & 2 deletions contracts/hooks/examples/TWAMM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import {Currency, CurrencyLibrary} from "@uniswap/v4-core/src/types/Currency.sol
import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {PoolGetters} from "../../libraries/PoolGetters.sol";
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
import {CurrencySettleTake} from "@uniswap/v4-core/src/libraries/CurrencySettleTake.sol";
import {CurrencySettler} from "@uniswap/v4-core/test/utils/CurrencySettler.sol";
import {StateLibrary} from "@uniswap/v4-core/src/libraries/StateLibrary.sol";
import {BeforeSwapDelta, BeforeSwapDeltaLibrary} from "@uniswap/v4-core/src/types/BeforeSwapDelta.sol";

contract TWAMM is BaseHook, ITWAMM {
using TransferHelper for IERC20Minimal;
using CurrencyLibrary for Currency;
using CurrencySettleTake for Currency;
using CurrencySettler for Currency;
using OrderPool for OrderPool.State;
using PoolIdLibrary for PoolKey;
using TickMath for int24;
Expand Down
2 changes: 1 addition & 1 deletion lib/v4-core
Submodule v4-core updated 143 files
4 changes: 2 additions & 2 deletions test/utils/HookEnabledSwapRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {BalanceDelta} from "@uniswap/v4-core/src/types/BalanceDelta.sol";
import {PoolKey} from "@uniswap/v4-core/src/types/PoolKey.sol";
import {PoolTestBase} from "@uniswap/v4-core/src/test/PoolTestBase.sol";
import {Test} from "forge-std/Test.sol";
import {CurrencySettleTake} from "@uniswap/v4-core/src/libraries/CurrencySettleTake.sol";
import {CurrencySettler} from "@uniswap/v4-core/test/utils/CurrencySettler.sol";

contract HookEnabledSwapRouter is PoolTestBase {
using CurrencyLibrary for Currency;
using CurrencySettleTake for Currency;
using CurrencySettler for Currency;

error NoSwapOccurred();

Expand Down

0 comments on commit 5082779

Please sign in to comment.