diff --git a/.gitmodules b/.gitmodules index 340530b2..44cc2bb5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "contracts/lib/v4-core"] - path = contracts/lib/v4-core - url = https://github.com/uniswap/v4-core -[submodule "contracts/lib/v4-periphery"] - path = contracts/lib/v4-periphery - url = https://github.com/uniswap/v4-periphery [submodule "forge-lib/v4-core"] path = forge-lib/v4-core url = https://github.com/uniswap/v4-core diff --git a/remappings.txt b/remappings.txt index 13ba5e09..2090bd55 100644 --- a/remappings.txt +++ b/remappings.txt @@ -7,4 +7,5 @@ forge-std/=forge-lib/v4-core/lib/forge-std/src/ hardhat/=forge-lib/v4-core/node_modules/hardhat/ openzeppelin-contracts/=forge-lib/v4-core/lib/openzeppelin-contracts/contracts/ solmate/=forge-lib/v4-core/lib/solmate/src/ -v4-core/=forge-lib/v4-core/ \ No newline at end of file +v4-core/=forge-lib/v4-core/ +forge-lib/v4-periphery:@uniswap/v4-core/=forge-lib/v4-core/ \ No newline at end of file diff --git a/src/pages/quoter/Quoter.sol b/src/pages/quoter/Quoter.sol index 2b908b1e..44766d6a 100644 --- a/src/pages/quoter/Quoter.sol +++ b/src/pages/quoter/Quoter.sol @@ -9,9 +9,9 @@ import {IPoolManager} from "v4-core/src/interfaces/IPoolManager.sol"; import {PoolKey} from "v4-core/src/types/PoolKey.sol"; import {BalanceDelta} from "v4-core/src/types/BalanceDelta.sol"; import {PoolId, PoolIdLibrary} from "v4-core/src/types/PoolId.sol"; -import {Constants} from "v4-core/src/../test/utils/Constants.sol"; +import {Constants} from "v4-core/test/utils/Constants.sol"; import {CurrencyLibrary, Currency} from "v4-core/src/types/Currency.sol"; -import {Deployers} from "v4-core/src/../test/utils/Deployers.sol"; +import {Deployers} from "v4-core/test/utils/Deployers.sol"; import {IQuoter} from "v4-periphery/interfaces/IQuoter.sol"; import {Quoter} from "v4-periphery/lens/Quoter.sol"; @@ -58,7 +58,7 @@ contract QuoterTest is Test, Deployers { console2.log("Quoted output amount: ", int256(outputAmount)); // Perform a test swap - BalanceDelta swapDelta = swap(poolKey, int256(uint256(amountIn)), zeroForOne, ZERO_BYTES); + BalanceDelta swapDelta = swap(poolKey, zeroForOne, int256(uint256(amountIn)), ZERO_BYTES); // quote agrees with the actual swap assertEq(outputAmount, swapDelta.amount1()); @@ -80,9 +80,9 @@ contract QuoterTest is Test, Deployers { console2.log("Quoted input amount: ", int256(inputAmount)); // Perform a exact-output swap - BalanceDelta swapDelta = swap(poolKey, -int256(uint256(amountOut)), zeroForOne, ZERO_BYTES); + BalanceDelta swapDelta = swap(poolKey, zeroForOne, -int256(uint256(amountOut)), ZERO_BYTES); assertEq(inputAmount, swapDelta.amount0()); - (uint160 sqrtPriceX96,,) = manager.getSlot0(poolId); + (uint160 sqrtPriceX96,,,) = manager.getSlot0(poolId); assertEq(sqrtPriceX96After, sqrtPriceX96); } }