Skip to content

Commit

Permalink
temporary position descriptor constructor arg
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Oct 11, 2024
1 parent 650f31c commit 7d0343f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/integration-tests/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ export const V3_FACTORY_MAINNET = '0x1F98431c8aD98523631AE4a59f267346ea31F984'
export const V3_INIT_CODE_HASH_MAINNET = '0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54'
export const V2_INIT_CODE_HASH_MAINNET = '0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f'
export const V3_NFT_POSITION_MANAGER_MAINNET = '0xC36442b4a4522E871399CD717aBDD847Ab11FE88'
export const V4_POSITION_DESCRIPTOR_ADDRESS = '0x0000000000000000000000000000000000000000' // TODO, deploy this in-line and use the proper address in posm's constructor
3 changes: 2 additions & 1 deletion test/integration-tests/shared/deployUniversalRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
V3_INIT_CODE_HASH_MAINNET,
PERMIT2_ADDRESS,
V3_NFT_POSITION_MANAGER_MAINNET,
V4_POSITION_DESCRIPTOR_ADDRESS,
} from './constants'
import { deployV4PoolManager, deployV4PositionManager } from './v4Helpers'

Expand All @@ -22,7 +23,7 @@ export async function deployRouter(v4PoolManager?: string, mockReentrantWETH?: s
poolInitCodeHash: V3_INIT_CODE_HASH_MAINNET,
v4PoolManager: poolManager,
v3NFTPositionManager: V3_NFT_POSITION_MANAGER_MAINNET,
v4PositionManager: (await deployV4PositionManager(poolManager, PERMIT2_ADDRESS)).address,
v4PositionManager: (await deployV4PositionManager(poolManager, PERMIT2_ADDRESS, V4_POSITION_DESCRIPTOR_ADDRESS)).address,
}

const routerFactory = await ethers.getContractFactory('UniversalRouter')
Expand Down
5 changes: 3 additions & 2 deletions test/integration-tests/shared/v4Helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ export const ETH_USDC = {
tickUpper: ETH_USDC_TICK_UPPER,
}

export async function deployV4PositionManager(v4PoolManager: string, permit2: string): Promise<PositionManager> {
export async function deployV4PositionManager(v4PoolManager: string, permit2: string, v4PositionDescriptor: string): Promise<PositionManager> {
const positionManagerFactory = await ethers.getContractFactory('PositionManager')
const positionManager = (await positionManagerFactory.deploy(
v4PoolManager,
permit2,
50000
50000,
v4PositionDescriptor
)) as unknown as PositionManager
return positionManager
}
Expand Down

0 comments on commit 7d0343f

Please sign in to comment.