♾️ INFINIT CLI Alpha release is now available!
API References
@infinit-xyz/uniswap-v3

Uniswap V3 Module

Config

  • protocol_module = uniswap-v3

Registry

The available fields in the Uniswap V3 module to use in the infinit.registry.json are as follows:

FieldTypeDescription
uniswapV3FactorystringAddress of the Uniswap V3 Factory.
nftDescriptorstringAddress of the NFT Descriptor.
tickLensstringAddress of the Tick Lens.
proxyAdminstringAddress of the Proxy Admin.
swapRouter02stringAddress of the Swap Router 02.
quoterV2stringAddress of the Quoter V2.
nonfungibleTokenPositionDescriptorImplstringAddress of the Nonfungible Token Position Descriptor Implementation.
nonfungibleTokenPositionDescriptorstringAddress of the Nonfungible Token Position Descriptor.
nonfungiblePositionManagerstringAddress of the Nonfungible Position Manager.
uniswapV3StakerstringAddress of the Uniswap V3 Staker.
permit2stringAddress of the Permit2.
universalRouterstringAddress of the Universal Router.
unsupportedProtocolstringAddress of the Unsupported Protocol.

Actions

The actions available in the @infinit-xyz/uniswap-v3/actions are as follows:

import {
  DeployUniswapV3Action,
  DeployUniversalRouterAction,
  CollectProtocolAction,
  EnableFeeAmountsAction,
  SetFactoryOwnerAction,
  SetFeeProtocolAction,
  TransferProxyAdminOwnerAction,
} from '@infinit-xyz/uniswap-v3/actions'

DeployUniswapV3Action

DeployUniswapV3Action is an action that deploys the whole Uniswap V3 protocol smart contracts.

Parameters

FieldTypeRequiredDescription
nativeCurrencyLabelstringYesNative currency label (e.g., ETH)
proxyAdminOwnerAddressYesAddress of the owner of the proxy admin
factoryOwnerAddressYesAddress of the owner of the factory
wrappedNativeTokenAddressYesAddress of the wrapped native token (e.g., WETH)
uniswapV2FactoryAddressNoAddress of the Uniswap V2 factory

Signers

  • deployer: The deployer of the protocol.

DeployUniversalRouterAction

DeployUniversalRouterAction is an action that deploys the Universal Router (opens in a new tab)

Parameters

FieldTypeRequiredDescription
wrappedNativeTokenAddressYesAddress of the wrapped native token (e.g., WETH)
pairInitCodeHashHexYesHash of creation bytecode for Uniswap V2 pair
poolInitCodeHashHexYesHash of creation bytecode for Uniswap V3 pool
seaportV1_5AddressNoAddress of the seaportV1_5
seaportV1_4AddressNoAddress of the seaportV1_4
openseaConduitAddressNoAddress of the openseaConduit
nftxZapAddressNoAddress of the nftxZap
x2y2AddressNoAddress of the x2y2
foundationAddressNoAddress of the foundation
sudoswapAddressNoAddress of the sudoswap
elementMarketAddressNoAddress of the elementMarket
nft20ZapAddressNoAddress of the nft20Zap
cryptopunksAddressNoAddress of the cryptopunks
looksRareV2AddressNoAddress of the looksRareV2
routerRewardsDistributorAddressNoAddress of the routerRewardsDistributor
looksRareRewardsDistributorAddressNoAddress of the looksRareRewardsDistributor
looksRareTokenAddressNoAddress of the looksRareToken
v2FactoryAddressNoAddress of the v2Factory
v3FactoryAddressNoAddress of the v3Factory

Signers

  • deployer: The deployer of the Universal Router.

CollectProtocolAction

CollectProtocolAction is an action that collects the protocol fees from the given pools.

Parameters

FieldTypeRequiredDescription
recipientAddressYesThe recipient's address for the collected fees.
poolsAddress[]YesArray of pool addresses to collect fees from.

Signers

  • factoryOwner: The owner of the factory.

EnableFeeAmountsAction

EnableFeeAmountsAction is an action that enables the fee amounts for the given pools.

Parameters

FieldTypeRequiredDescription
uniswapV3FactoryAddressYesAddress of the Uniswap V3 factory
feeAmountsArrayYesArray of fee amounts and their tick spacings
feenumberYesSwap fee in hundredths of a bip (1e-6) (e.g., 3000 for 0.3%)
tickSpacingnumberYesTick spacing of the pool

Signers

  • factoryOwner: The owner of the factory.

SetFactoryOwnerAction

SetFactoryOwnerAction is an action that sets the owner of the Uniswap V3 factory.

Parameters

FieldTypeRequiredDescription
uniswapV3FactoryAddressYesAddress of the Uniswap V3 factory
newOwnerAddressYesAddress of the new owner of the factory

Signers

  • factoryOwner: The owner of the factory.

SetFeeProtocolAction

SetFeeProtocolAction is an action that sets the fee protocol for the given pools.

Parameters

FieldTypeRequiredDescription
uniswapV3FactoryAddressYesAddress of the Uniswap V3 factory
feeProtocolInfosArrayYesArray of pool addresses and their fee protocols
feeProtocolInfos.poolAddressYesAddress of the Uniswap V3 pool
feeProtocolInfos.feeProtocol0numberYesFee protocol of pool's token0 (e.g., feeProtocol0 = 4 means fee protocol of token0 is 25%)
feeProtocolInfos.feeProtocol1numberYesFee protocol of pool's token1 (e.g., feeProtocol1 = 4 means fee protocol of token1 is 25%)

Signers

  • factoryOwner: The owner of the factory.

TransferProxyAdminOwnerAction

TransferProxyAdminOwnerAction is an action that transfers the ownership of the Proxy Admin to a new address.

FieldTypeRequiredDescription
proxyAdminAddressYesAddress of the proxy admin contract
newOwnerAddressYesAddress of the owner of the proxy admin

Signers

  • proxyAdminOwner: The owner of the proxy admin.