From d8d921c27dd79b049ecc9f18396e9319ce5eb88e Mon Sep 17 00:00:00 2001 From: mr-uniswap <144828035+mr-uniswap@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:27:43 -0400 Subject: [PATCH 1/8] chore(infra): don't run trufflehog on main (#96) --- .github/workflows/trufflehog.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/trufflehog.yml b/.github/workflows/trufflehog.yml index 52cabac6c..4f15be8d7 100644 --- a/.github/workflows/trufflehog.yml +++ b/.github/workflows/trufflehog.yml @@ -1,9 +1,6 @@ name: Trufflehog on: - push: - branches: - - main pull_request: types: - opened From 45d05b8e5d5c0ef944705ec45726049eb470fdf3 Mon Sep 17 00:00:00 2001 From: "Siyu Jiang (See-You John)" <91580504+jsy1218@users.noreply.github.com> Date: Fri, 13 Sep 2024 09:38:12 -0700 Subject: [PATCH 2/8] feat(sdk-core): add mixed quoter v2 property (#95) --- sdks/sdk-core/src/addresses.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdks/sdk-core/src/addresses.ts b/sdks/sdk-core/src/addresses.ts index ebbdec7fb..ebde2daea 100644 --- a/sdks/sdk-core/src/addresses.ts +++ b/sdks/sdk-core/src/addresses.ts @@ -11,6 +11,7 @@ type ChainAddresses = { tickLensAddress?: string swapRouter02Address?: string mixedRouteQuoterV1Address?: string + mixedRouteQuoterV2Address?: string } const DEFAULT_NETWORKS = [ChainId.MAINNET, ChainId.GOERLI, ChainId.SEPOLIA] @@ -162,6 +163,8 @@ const SEPOLIA_ADDRESSES: ChainAddresses = { nonfungiblePositionManagerAddress: '0x1238536071E1c677A632429e3655c799b22cDA52', tickLensAddress: '0xd7f33bcdb21b359c8ee6f0251d30e94832baad07', swapRouter02Address: '0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E', + // TODO: ROUTE-277 - update deploy address once after quoter refactoring. + mixedRouteQuoterV2Address: '0xa8b0be287acB850952DE4287b84B7222cc654C09', } // Avalanche v3 addresses From 0e336dba2fbff2e795067b0614ba3c874fc68dfe Mon Sep 17 00:00:00 2001 From: "Siyu Jiang (See-You John)" <91580504+jsy1218@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:07:43 -0700 Subject: [PATCH 3/8] feat(router-sdk): support mixed route with v4 route (#94) --- .gitignore | 3 + sdks/router-sdk/src/constants.ts | 13 ++- .../src/utils/encodeMixedRouteToPath.test.ts | 37 +++++- .../src/utils/encodeMixedRouteToPath.ts | 110 +++++++++++++----- 4 files changed, 128 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 8e7e999ac..3811e8cb8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ # dependencies node_modules + +# Intellij IDEA artifacts +.idea/ \ No newline at end of file diff --git a/sdks/router-sdk/src/constants.ts b/sdks/router-sdk/src/constants.ts index 4b246f089..d75fa6cd8 100644 --- a/sdks/router-sdk/src/constants.ts +++ b/sdks/router-sdk/src/constants.ts @@ -8,8 +8,17 @@ export const ADDRESS_THIS = '0x0000000000000000000000000000000000000002' export const ZERO = JSBI.BigInt(0) export const ONE = JSBI.BigInt(1) -// = 1 << 23 or 100000000000000000000000 -export const V2_FEE_PATH_PLACEHOLDER = 8388608 +// = 1 << 23 or 0b0100000000000000000000000 +export const MIXED_QUOTER_V1_V2_FEE_PATH_PLACEHOLDER = 1 << 23 + +// = 10 << 4 or 0b00100000 +export const MIXED_QUOTER_V2_V2_FEE_PATH_PLACEHOLDER = 2 << 4 + +// = 11 << 20 or 0b001100000000000000000000 +export const MIXED_QUOTER_V2_V3_FEE_PATH_PLACEHOLDER = 3 << 20 + +// = 100 << 20 or 0b010000000000000000000000 +export const MIXED_QUOTER_V2_V4_FEE_PATH_PLACEHOLDER = 4 << 20 export const ZERO_PERCENT = new Percent(ZERO) export const ONE_HUNDRED_PERCENT = new Percent(100, 100) diff --git a/sdks/router-sdk/src/utils/encodeMixedRouteToPath.test.ts b/sdks/router-sdk/src/utils/encodeMixedRouteToPath.test.ts index 0baadf57e..500f5ee18 100644 --- a/sdks/router-sdk/src/utils/encodeMixedRouteToPath.test.ts +++ b/sdks/router-sdk/src/utils/encodeMixedRouteToPath.test.ts @@ -20,6 +20,17 @@ describe('#encodeMixedRouteToPath', () => { const pool_V3_1_weth = new V3Pool(token1, weth, FeeAmount.MEDIUM, encodeSqrtRatioX96(1, 1), 0, 0, []) const pool_V4_0_1 = new V4Pool(token0, token1, FeeAmount.MEDIUM, 30, ADDRESS_ZERO, encodeSqrtRatioX96(1, 1), 0, 0, []) + const pool_V4_0_eth = new V4Pool( + token0, + ETHER, + FeeAmount.MEDIUM, + 30, + ADDRESS_ZERO, + encodeSqrtRatioX96(1, 1), + 0, + 0, + [] + ) const pair_0_1 = new Pair(CurrencyAmount.fromRawAmount(token0, '100'), CurrencyAmount.fromRawAmount(token1, '200')) const pair_1_2 = new Pair(CurrencyAmount.fromRawAmount(token1, '150'), CurrencyAmount.fromRawAmount(token2, '150')) @@ -47,6 +58,8 @@ describe('#encodeMixedRouteToPath', () => { const route_0_V3_weth_V2_1_V2_2 = new MixedRouteSDK([pool_V3_0_weth, pair_1_weth, pair_1_2], token0, token2) const route_0_V3_1_v3_weth_V2_2 = new MixedRouteSDK([pool_V3_0_1_medium, pool_V3_1_weth, pair_2_weth], token0, token2) const route_0_V3_weth_V4_1 = new MixedRouteSDK([pool_V3_0_weth, pool_V4_0_1], ETHER, token1) + const route_eth_V4_0_V3_1 = new MixedRouteSDK([pool_V4_0_eth, pool_V3_0_1_medium], ETHER, token1) + const route_eth_V3_0_V4_1 = new MixedRouteSDK([pool_V3_0_weth, pool_V4_0_1], ETHER, token1) describe('pure V3', () => { it('packs them for exact input single hop', () => { @@ -87,8 +100,10 @@ describe('#encodeMixedRouteToPath', () => { }) describe('pure v4', () => { - it('throws if MixedRouteSDK is a pure v4 route', () => { - expect(() => encodeMixedRouteToPath(route_0_V4_1)).toThrow('Encoding mixed routes with V4 not supported') + it('packs them for exact input single hop', () => { + expect(encodeMixedRouteToPath(route_0_V4_1)).toEqual( + '0x0000000000000000000000000000000000000001400bb800001e00000000000000000000000000000000000000000000000000000000000000000000000000000002' + ) }) }) @@ -149,8 +164,22 @@ describe('#encodeMixedRouteToPath', () => { ) }) - it('throws if it contains a v4 pool', () => { - expect(() => encodeMixedRouteToPath(route_0_V3_weth_V4_1)).toThrow('Encoding mixed routes with V4 not supported') + it('packs them for exact input v3 -> v4', () => { + expect(encodeMixedRouteToPath(route_0_V3_weth_V4_1)).toEqual( + '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2300bb80000000000000000000000000000000000000001400bb800001e00000000000000000000000000000000000000000000000000000000000000000000000000000002' + ) + }) + + it('packs them for exact input native eth v4 -> v3', () => { + expect(encodeMixedRouteToPath(route_eth_V4_0_V3_1)).toEqual( + '0x0000000000000000000000000000000000000000400bb800001e00000000000000000000000000000000000000000000000000000000000000000000000000000001300bb80000000000000000000000000000000000000002' + ) + }) + + it('packs them for exact input native eth v3 -> v4', () => { + expect(encodeMixedRouteToPath(route_eth_V3_0_V4_1)).toEqual( + '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2300bb80000000000000000000000000000000000000001400bb800001e00000000000000000000000000000000000000000000000000000000000000000000000000000002' + ) }) }) }) diff --git a/sdks/router-sdk/src/utils/encodeMixedRouteToPath.ts b/sdks/router-sdk/src/utils/encodeMixedRouteToPath.ts index 845403427..dabcf12b1 100644 --- a/sdks/router-sdk/src/utils/encodeMixedRouteToPath.ts +++ b/sdks/router-sdk/src/utils/encodeMixedRouteToPath.ts @@ -1,9 +1,16 @@ import { pack } from '@ethersproject/solidity' import { Currency } from '@uniswap/sdk-core' +import { Pair } from '@uniswap/v2-sdk' import { Pool as V3Pool } from '@uniswap/v3-sdk' import { Pool as V4Pool } from '@uniswap/v4-sdk' +import { + ADDRESS_ZERO, + MIXED_QUOTER_V2_V2_FEE_PATH_PLACEHOLDER, + MIXED_QUOTER_V2_V3_FEE_PATH_PLACEHOLDER, + MIXED_QUOTER_V2_V4_FEE_PATH_PLACEHOLDER, + MIXED_QUOTER_V1_V2_FEE_PATH_PLACEHOLDER, +} from '../constants' import { MixedRouteSDK } from '../entities/mixedRoute/route' -import { V2_FEE_PATH_PLACEHOLDER } from '../constants' import { TPool } from './TPool' /** @@ -13,36 +20,81 @@ import { TPool } from './TPool' * @returns the exactIn encoded path */ export function encodeMixedRouteToPath(route: MixedRouteSDK): string { - const firstInputToken: Currency = route.input.wrapped - - const { path, types } = route.pools.reduce( - ( - { inputToken, path, types }: { inputToken: Currency; path: (string | number)[]; types: string[] }, - pool: TPool, - index - ): { inputToken: Currency; path: (string | number)[]; types: string[] } => { - if (pool instanceof V4Pool) throw 'Encoding mixed routes with V4 not supported' - const outputToken: Currency = pool.token0.equals(inputToken) ? pool.token1 : pool.token0 - if (index === 0) { - return { - inputToken: outputToken, - types: ['address', 'uint24', 'address'], - path: [ - inputToken.wrapped.address, - pool instanceof V3Pool ? pool.fee : V2_FEE_PATH_PLACEHOLDER, - outputToken.wrapped.address, - ], - } + const containsV4Pool = route.pools.some((pool) => pool instanceof V4Pool) + + let path: (string | number)[] + let types: string[] + + if (containsV4Pool) { + path = [route.adjustedInput.isNative ? ADDRESS_ZERO : route.adjustedInput.address] + types = ['address'] + let currencyIn = route.adjustedInput + + for (const pool of route.pools) { + const currencyOut = currencyIn.equals(pool.token0) ? pool.token1 : pool.token0 + + if (pool instanceof V4Pool) { + const v4Fee = pool.fee + MIXED_QUOTER_V2_V4_FEE_PATH_PLACEHOLDER + path.push( + v4Fee, + pool.tickSpacing, + pool.hooks, + currencyOut.isNative ? ADDRESS_ZERO : currencyOut.wrapped.address + ) + types.push('uint24', 'uint24', 'address', 'address') + } else if (pool instanceof V3Pool) { + const v3Fee = pool.fee + MIXED_QUOTER_V2_V3_FEE_PATH_PLACEHOLDER + path.push(v3Fee, currencyOut.wrapped.address) + types.push('uint24', 'address') + } else if (pool instanceof Pair) { + const v2Fee = MIXED_QUOTER_V2_V2_FEE_PATH_PLACEHOLDER + path.push(v2Fee, currencyOut.wrapped.address) + types.push('uint8', 'address') } else { - return { - inputToken: outputToken, - types: [...types, 'uint24', 'address'], - path: [...path, pool instanceof V3Pool ? pool.fee : V2_FEE_PATH_PLACEHOLDER, outputToken.wrapped.address], - } + throw new Error(`Unsupported pool type ${JSON.stringify(pool)}`) } - }, - { inputToken: firstInputToken, path: [], types: [] } - ) + + currencyIn = currencyOut + } + } else { + // TODO: ROUTE-276 - delete this else block + // We introduced this else block as a safety measure to prevent non-v4 mixed routes from potentially regressing + // We'd like to gain more confidence in the new implementation before removing this block + const result = route.pools.reduce( + ( + { inputToken, path, types }: { inputToken: Currency; path: (string | number)[]; types: string[] }, + pool: TPool, + index + ): { inputToken: Currency; path: (string | number)[]; types: string[] } => { + const outputToken: Currency = pool.token0.equals(inputToken) ? pool.token1 : pool.token0 + if (index === 0) { + return { + inputToken: outputToken, + types: ['address', 'uint24', 'address'], + path: [ + inputToken.wrapped.address, + pool instanceof V3Pool ? pool.fee : MIXED_QUOTER_V1_V2_FEE_PATH_PLACEHOLDER, + outputToken.wrapped.address, + ], + } + } else { + return { + inputToken: outputToken, + types: [...types, 'uint24', 'address'], + path: [ + ...path, + pool instanceof V3Pool ? pool.fee : MIXED_QUOTER_V1_V2_FEE_PATH_PLACEHOLDER, + outputToken.wrapped.address, + ], + } + } + }, + { inputToken: route.input, path: [], types: [] } + ) + + path = result.path + types = result.types + } return pack(types, path) } From 93df082eeec99106be3ca2b29e0fbd3e40387bfe Mon Sep 17 00:00:00 2001 From: xrsv Date: Wed, 18 Sep 2024 08:43:59 -0700 Subject: [PATCH 4/8] feat(v3-sdk): Adding extra fee tiers for V3 (#99) --- sdks/v3-sdk/src/constants.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdks/v3-sdk/src/constants.ts b/sdks/v3-sdk/src/constants.ts index 086ccd1a5..c66b6439d 100644 --- a/sdks/v3-sdk/src/constants.ts +++ b/sdks/v3-sdk/src/constants.ts @@ -21,6 +21,9 @@ export function poolInitCodeHash(chainId?: ChainId): string { */ export enum FeeAmount { LOWEST = 100, + LOW_200 = 200, + LOW_300 = 300, + LOW_400 = 400, LOW = 500, MEDIUM = 3000, HIGH = 10000, @@ -31,6 +34,9 @@ export enum FeeAmount { */ export const TICK_SPACINGS: { [amount in FeeAmount]: number } = { [FeeAmount.LOWEST]: 1, + [FeeAmount.LOW_200]: 4, + [FeeAmount.LOW_300]: 6, + [FeeAmount.LOW_400]: 8, [FeeAmount.LOW]: 10, [FeeAmount.MEDIUM]: 60, [FeeAmount.HIGH]: 200, From 4fb086e4d57d8c6f0007a05481b6dee0d1b364d7 Mon Sep 17 00:00:00 2001 From: Emily Williams Date: Thu, 19 Sep 2024 10:34:46 -0400 Subject: [PATCH 5/8] update tests --- sdks/universal-router-sdk/package.json | 2 +- .../test/forge/interop.json | 2 +- .../test/forge/utils/DeployRouter.sol | 36 ++++--------------- .../test/forge/utils/ICryptopunksMarket.sol | 13 ------- yarn.lock | 20 +++++------ 5 files changed, 19 insertions(+), 54 deletions(-) delete mode 100644 sdks/universal-router-sdk/test/forge/utils/ICryptopunksMarket.sol diff --git a/sdks/universal-router-sdk/package.json b/sdks/universal-router-sdk/package.json index bd44adaf8..bdeed6d39 100644 --- a/sdks/universal-router-sdk/package.json +++ b/sdks/universal-router-sdk/package.json @@ -33,7 +33,7 @@ "@uniswap/permit2-sdk": "^1.3.0", "@uniswap/router-sdk": "^1.11.0", "@uniswap/sdk-core": "^5.3.1", - "@uniswap/universal-router": "1.6.0", + "@uniswap/universal-router": "1.6.1-beta.1", "@uniswap/v2-sdk": "^4.4.1", "@uniswap/v3-sdk": "^3.13.1", "@uniswap/v4-sdk": "^1.0.0", diff --git a/sdks/universal-router-sdk/test/forge/interop.json b/sdks/universal-router-sdk/test/forge/interop.json index d4c1e5557..0bc773c9d 100644 --- a/sdks/universal-router-sdk/test/forge/interop.json +++ b/sdks/universal-router-sdk/test/forge/interop.json @@ -247,4 +247,4 @@ "calldata": "0x24856bc30000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030b000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000003eb3459f0ce6ae000b00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb8a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f46b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000000000000000000000000000000000000000000000000000000000000", "value": "1000000000000000000" } -} +} \ No newline at end of file diff --git a/sdks/universal-router-sdk/test/forge/utils/DeployRouter.sol b/sdks/universal-router-sdk/test/forge/utils/DeployRouter.sol index 6eedea6af..ffce92756 100644 --- a/sdks/universal-router-sdk/test/forge/utils/DeployRouter.sol +++ b/sdks/universal-router-sdk/test/forge/utils/DeployRouter.sol @@ -10,25 +10,14 @@ import {Permit2} from "permit2/src/Permit2.sol"; import {IAllowanceTransfer} from "permit2/src/interfaces/IAllowanceTransfer.sol"; contract DeployRouter is Test { - address public constant LOOKS_TOKEN = 0xf4d2888d29D722226FafA5d9B24F9164c092421E; address public constant V2_FACTORY = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f; address public constant V3_FACTORY = 0x1F98431c8aD98523631AE4a59f267346ea31F984; bytes32 public constant PAIR_INIT_CODE_HASH = 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f; bytes32 public constant POOL_INIT_CODE_HASH = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54; address public constant WETH9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; - address public constant SEAPORT_V1_5 = 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC; - address public constant SEAPORT_V1_4 = 0x00000000000001ad428e4906aE43D8F9852d0dD6; - address public constant NFTX_ZAP = 0x941A6d105802CCCaa06DE58a13a6F49ebDCD481C; - address public constant X2Y2 = 0x74312363e45DCaBA76c59ec49a7Aa8A65a67EeD3; - address public constant FOUNDATION = 0xcDA72070E455bb31C7690a170224Ce43623d0B6f; - address public constant SUDOSWAP = 0x2B2e8cDA09bBA9660dCA5cB6233787738Ad68329; - address public constant NFT20_ZAP = 0xA42f6cADa809Bcf417DeefbdD69C5C5A909249C0; - address public constant CRYPTOPUNKS = 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB; - address public constant LOOKS_RARE_V2 = 0x0000000000E655fAe4d56241588680F86E3b2377; - address public constant ROUTER_REWARDS_DISTRIBUTOR = 0x0000000000000000000000000000000000000000; - address public constant LOOKSRARE_REWARDS_DISTRIBUTOR = 0x0554f068365eD43dcC98dcd7Fd7A8208a5638C72; - address public constant OPENSEA_CONDUIT = 0x1E0049783F008A0085193E00003D00cd54003c71; - address public constant ELEMENT_MARKET = 0x20F780A973856B93f63670377900C1d2a50a77c4; + address public constant V4_POOL_MANAGER_PLACEHOLDER = 0x4444444444444444444444444444444444444444; + address public constant V4_POSITION_MANAGER_PLACEHOLDER = 0x4444444444444444400000000000000000000000; + address public constant V3_POSITION_MANAGER = 0xC36442b4a4522E871399CD717aBDD847Ab11FE88; address internal constant RECIPIENT = 0xaAaAaAaaAaAaAaaAaAAAAAAAAaaaAaAaAaaAaaAa; address internal constant FEE_RECIPIENT = 0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB; @@ -48,24 +37,13 @@ contract DeployRouter is Test { RouterParameters({ permit2: _permit2, weth9: WETH9, - seaportV1_5: SEAPORT_V1_5, - seaportV1_4: SEAPORT_V1_4, - openseaConduit: OPENSEA_CONDUIT, - nftxZap: NFTX_ZAP, - x2y2: X2Y2, - foundation: FOUNDATION, - sudoswap: SUDOSWAP, - elementMarket: ELEMENT_MARKET, - nft20Zap: NFT20_ZAP, - cryptopunks: CRYPTOPUNKS, - looksRareV2: LOOKS_RARE_V2, - routerRewardsDistributor: ROUTER_REWARDS_DISTRIBUTOR, - looksRareRewardsDistributor: LOOKSRARE_REWARDS_DISTRIBUTOR, - looksRareToken: LOOKS_TOKEN, v2Factory: V2_FACTORY, v3Factory: V3_FACTORY, pairInitCodeHash: PAIR_INIT_CODE_HASH, - poolInitCodeHash: POOL_INIT_CODE_HASH + poolInitCodeHash: POOL_INIT_CODE_HASH, + v4PoolManager: V4_POOL_MANAGER_PLACEHOLDER, + v3NFTPositionManager: V3_POSITION_MANAGER, + v4PositionManager: V4_POSITION_MANAGER_PLACEHOLDER }) ); } diff --git a/sdks/universal-router-sdk/test/forge/utils/ICryptopunksMarket.sol b/sdks/universal-router-sdk/test/forge/utils/ICryptopunksMarket.sol deleted file mode 100644 index 90d1223bc..000000000 --- a/sdks/universal-router-sdk/test/forge/utils/ICryptopunksMarket.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -pragma solidity ^0.8.4; - -/// @title Interface for CryptoPunksMarket -interface ICryptopunksMarket { - function balanceOf(address) external returns (uint256); - - function punkIndexToAddress(uint256) external returns (address); - - function buyPunk(uint256 punkIndex) external payable; - - function transferPunk(address to, uint256 punkIndex) external; -} diff --git a/yarn.lock b/yarn.lock index fc48b7daa..32c586052 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3476,10 +3476,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.7.0": - version: 4.7.0 - resolution: "@openzeppelin/contracts@npm:4.7.0" - checksum: ac917e668505ffbd300fcb00fd2f39b5f1153f77f82d482988336a881134b806b2d820f4293962691ef4d6f9f8ee5ecc71da82c6eb6ad2f02810511e90fa0d96 +"@openzeppelin/contracts@npm:5.0.2": + version: 5.0.2 + resolution: "@openzeppelin/contracts@npm:5.0.2" + checksum: 0cce6fc284bd1d89e2a447027832a62f1356b44ee31088899453e10349a63a62df2f07da63d76e4c41aad9c86b96b650b2b6fc85439ef276850dda1170a047fd languageName: node linkType: hard @@ -4724,7 +4724,7 @@ __metadata: "@uniswap/permit2-sdk": ^1.3.0 "@uniswap/router-sdk": ^1.11.0 "@uniswap/sdk-core": ^5.3.1 - "@uniswap/universal-router": 1.6.0 + "@uniswap/universal-router": 1.6.1-beta.1 "@uniswap/v2-sdk": ^4.4.1 "@uniswap/v3-sdk": ^3.13.1 "@uniswap/v4-sdk": ^1.0.0 @@ -4743,14 +4743,14 @@ __metadata: languageName: unknown linkType: soft -"@uniswap/universal-router@npm:1.6.0": - version: 1.6.0 - resolution: "@uniswap/universal-router@npm:1.6.0" +"@uniswap/universal-router@npm:1.6.1-beta.1": + version: 1.6.1-beta.1 + resolution: "@uniswap/universal-router@npm:1.6.1-beta.1" dependencies: - "@openzeppelin/contracts": 4.7.0 + "@openzeppelin/contracts": 5.0.2 "@uniswap/v2-core": 1.0.1 "@uniswap/v3-core": 1.0.0 - checksum: c91e4a248f983378f806b2d7b1e2c9cdac5996d7ab46c323c35147f6f8e32a67ca330916ac0692275525236b557b5d39230fadf88ab2af7ba7c814cd81ed903b + checksum: 69b81680867cee2074591a39ce0dbf5677d8f63e7cf6cd6217f372b7cfd31f50da9d2ce49c27ea2ddb58f5d945de5da67c7b03cac2a65efe82ef8775e2c4dc7f languageName: node linkType: hard From d9300e754dc33f5ed09fa6c970a49e2ae377d8e2 Mon Sep 17 00:00:00 2001 From: Emily Williams Date: Thu, 19 Sep 2024 12:14:48 -0400 Subject: [PATCH 6/8] update to new ur-sdk --- sdks/universal-router-sdk/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdks/universal-router-sdk/package.json b/sdks/universal-router-sdk/package.json index bdeed6d39..d0193d2a7 100644 --- a/sdks/universal-router-sdk/package.json +++ b/sdks/universal-router-sdk/package.json @@ -33,7 +33,7 @@ "@uniswap/permit2-sdk": "^1.3.0", "@uniswap/router-sdk": "^1.11.0", "@uniswap/sdk-core": "^5.3.1", - "@uniswap/universal-router": "1.6.1-beta.1", + "@uniswap/universal-router": "2.0.0-beta.1", "@uniswap/v2-sdk": "^4.4.1", "@uniswap/v3-sdk": "^3.13.1", "@uniswap/v4-sdk": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 32c586052..f808014e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4724,7 +4724,7 @@ __metadata: "@uniswap/permit2-sdk": ^1.3.0 "@uniswap/router-sdk": ^1.11.0 "@uniswap/sdk-core": ^5.3.1 - "@uniswap/universal-router": 1.6.1-beta.1 + "@uniswap/universal-router": 2.0.0-beta.1 "@uniswap/v2-sdk": ^4.4.1 "@uniswap/v3-sdk": ^3.13.1 "@uniswap/v4-sdk": ^1.0.0 @@ -4743,14 +4743,14 @@ __metadata: languageName: unknown linkType: soft -"@uniswap/universal-router@npm:1.6.1-beta.1": - version: 1.6.1-beta.1 - resolution: "@uniswap/universal-router@npm:1.6.1-beta.1" +"@uniswap/universal-router@npm:2.0.0-beta.1": + version: 2.0.0-beta.1 + resolution: "@uniswap/universal-router@npm:2.0.0-beta.1" dependencies: "@openzeppelin/contracts": 5.0.2 "@uniswap/v2-core": 1.0.1 "@uniswap/v3-core": 1.0.0 - checksum: 69b81680867cee2074591a39ce0dbf5677d8f63e7cf6cd6217f372b7cfd31f50da9d2ce49c27ea2ddb58f5d945de5da67c7b03cac2a65efe82ef8775e2c4dc7f + checksum: 69a4a294df166f36d07b33f7eb5d519f66574840336d19657c60b42f352d891151258fdb61a6a3266af5fdeafb40f26494a7231605793f526d63f1d5a492f9bb languageName: node linkType: hard From b576c719c24aabd5232cefb5456b8e713bc43c5a Mon Sep 17 00:00:00 2001 From: Emily Williams Date: Thu, 19 Sep 2024 12:17:52 -0400 Subject: [PATCH 7/8] lint interop --- sdks/universal-router-sdk/test/forge/interop.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/universal-router-sdk/test/forge/interop.json b/sdks/universal-router-sdk/test/forge/interop.json index 0bc773c9d..d4c1e5557 100644 --- a/sdks/universal-router-sdk/test/forge/interop.json +++ b/sdks/universal-router-sdk/test/forge/interop.json @@ -247,4 +247,4 @@ "calldata": "0x24856bc30000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030b000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000003eb3459f0ce6ae000b00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000bb8a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480001f46b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000000000000000000000000000000000000000000000000000000000000", "value": "1000000000000000000" } -} \ No newline at end of file +} From 91b6c9bfea612e0914af9bb8ed0bc3da074f4109 Mon Sep 17 00:00:00 2001 From: Emily Williams Date: Thu, 19 Sep 2024 13:19:14 -0400 Subject: [PATCH 8/8] progress on getting new UR package in?? --- sdks/universal-router-sdk/lib/permit2 | 2 +- sdks/universal-router-sdk/remappings.txt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sdks/universal-router-sdk/lib/permit2 b/sdks/universal-router-sdk/lib/permit2 index a7cd18694..cc56ad0f3 160000 --- a/sdks/universal-router-sdk/lib/permit2 +++ b/sdks/universal-router-sdk/lib/permit2 @@ -1 +1 @@ -Subproject commit a7cd186948b44f9096a35035226d7d70b9e24eaf +Subproject commit cc56ad0f3439c502c246fc5cfcc3db92bb8b7219 diff --git a/sdks/universal-router-sdk/remappings.txt b/sdks/universal-router-sdk/remappings.txt index 67eac5196..9b96c8e41 100644 --- a/sdks/universal-router-sdk/remappings.txt +++ b/sdks/universal-router-sdk/remappings.txt @@ -1,6 +1,4 @@ @ensdomains/=node_modules/@uniswap/universal-router/node_modules/@ensdomains/ -@openzeppelin/=lib/openzeppelin-contracts/ -@uniswap/=node_modules/@uniswap/ base64-sol/=node_modules/base64-sol/ ds-test/=lib/forge-std/lib/ds-test/src/ forge-std/=lib/forge-std/src/