MigratorZap

MigratorZap.sol

Migrates positions from NFTX V2 to V3.

Table of Contents

Constants
Public Write Functions

Constants

DEADLINE

uint256 private constant DEADLINE =
    0xf000000000000000000000000000000000000000000000000000000000000000

A sufficiently large value used for Uniswap V2's deadline.

DUST_THRESHOLD

uint256 private constant DUST_THRESHOLD = 0.005 ether

Threshold for what amount of V2 vTokens (left after redeeming) constitutes "dust." Used to determine whether to swap dust to WETH or not.

WETH

function WETH() external view returns (address)

Address of WETH contract.

v2NFTXFactory

function v2NFTXFactory() external view returns (address)

NFTX V2 vault factory address.

v2Inventory

function v2Inventory() external view returns (address)

NFTX V2 inventory staking address.

sushiRouter

function sushiRouter() external view returns (address)

Sushi router address.

positionManager

function positionManager() external view returns (address)

Address of NFTX V3's NonfungiblePositionManager contract.

v3NFTXFactory

function v3NFTXFactory() external view returns (address)

Address of NFTXVaultFactoryUpgradeableV3 contract.

v3Inventory

function v3Inventory() external view returns (address)

Address of NFTXInventoryStakingV3Upgradeable contract.

Write Functions

sushiToNFTXAMM

function sushiToNFTXAMM(
    SushiToNFTXAMMParams calldata params
) external returns (uint256 positionId)

Migrates Sushi vToken liquidity to NFTX v3 AMM.

v2InventoryToXNFT

function v2InventoryToXNFT(
    uint256 vaultIdV2,
    uint256 shares,
    uint256[] calldata idsToRedeem,
    bool is1155,
    uint256 vaultIdV3,
    uint256 minWethToReceive
) external returns (uint256 xNFTId)

Migrates V2 inventory position to V3 xNFT inventory staking position.

v2VaultToXNFT

function v2VaultToXNFT(
    address vTokenV2,
    uint256 vTokenV2Balance,
    uint256[] calldata idsToRedeem,
    bool is1155,
    uint256 vaultIdV3,
    uint256 minWethToReceive
) external returns (uint256 xNFTId)

Migrates V2 vault token to V3 xNFT inventory staking position.

Last updated