diff --git a/src/deploy.ts b/src/deploy.ts index ab8db77..ff1cf4b 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -15,6 +15,7 @@ import { DEPLOY_V3_CORE_FACTORY } from './steps/deploy-v3-core-factory' import { DEPLOY_V3_MIGRATOR } from './steps/deploy-v3-migrator' import { DEPLOY_V3_STAKER } from './steps/deploy-v3-staker' import { DEPLOY_V3_SWAP_ROUTER_02 } from './steps/deploy-v3-swap-router-02' +import { DEPLOY_V3_SWAP_ROUTER_03 } from './steps/deploy-v3-swap-router-03' import { TRANSFER_PROXY_ADMIN } from './steps/transfer-proxy-admin' import { TRANSFER_V3_CORE_FACTORY_OWNER } from './steps/transfer-v3-core-factory-owner' @@ -34,6 +35,7 @@ const MIGRATION_STEPS: MigrationStep[] = [ DEPLOY_V3_STAKER, DEPLOY_QUOTER_V2, DEPLOY_V3_SWAP_ROUTER_02, + DEPLOY_V3_SWAP_ROUTER_03, TRANSFER_PROXY_ADMIN, ] diff --git a/src/migrations.ts b/src/migrations.ts index 13b6e3c..1cc4563 100644 --- a/src/migrations.ts +++ b/src/migrations.ts @@ -5,6 +5,7 @@ import { GenericMigrationStep } from './migrate' export interface MigrationState { readonly v3CoreFactoryAddress?: string readonly swapRouter02?: string + readonly swapRouter03?: string readonly nftDescriptorLibraryAddressV1_3_0?: string readonly nonfungibleTokenPositionDescriptorAddressV1_3_0?: string readonly descriptorProxyAddress?: string diff --git a/src/steps/deploy-v3-swap-router-03.ts b/src/steps/deploy-v3-swap-router-03.ts new file mode 100644 index 0000000..d2db7a7 --- /dev/null +++ b/src/steps/deploy-v3-swap-router-03.ts @@ -0,0 +1,17 @@ +import SwapRouter03 from '@uniswap/v3-periphery/artifacts/contracts/SwapRouter.sol/SwapRouter.json' +import createDeployContractStep from './meta/createDeployContractStep' + +export const DEPLOY_V3_SWAP_ROUTER_03 = createDeployContractStep({ + key: 'swapRouter03', + artifact: SwapRouter03, + computeArguments(state, config) { + if (state.v3CoreFactoryAddress === undefined) { + throw new Error('Missing V3 Core Factory') + } + + return [ + state.v3CoreFactoryAddress, + config.weth9Address, + ] + }, +})