MigratorZap
MigratorZap.sol
Migrates positions from NFTX V2 to V3.
Table of Contents
Constants
DEADLINE
A sufficiently large value used for Uniswap V2's deadline.
DUST_THRESHOLD
Threshold for what amount of V2 vTokens (left after redeeming) constitutes "dust." Used to determine whether to swap dust to WETH or not.
WETH
Address of WETH contract.
v2NFTXFactory
NFTX V2 vault factory address.
v2Inventory
NFTX V2 inventory staking address.
sushiRouter
Sushi router address.
positionManager
Address of NFTX V3's NonfungiblePositionManager contract.
v3NFTXFactory
Address of NFTXVaultFactoryUpgradeableV3 contract.
v3Inventory
Address of NFTXInventoryStakingV3Upgradeable contract.
Write Functions
sushiToNFTXAMM
Migrates Sushi vToken liquidity to NFTX v3 AMM.
sushiPair
address
SLP token address.
lpAmount
uint256
SLP amount.
vTokenV2
address
vToken amount.
idsToRedeem
uint256[]
NFT tokenIDs to redeem.
is1155
bool
Whether NFTs use ERC1155.
permitSig
bytes
Signed UniV2 Permit.
vaultIdV3
uint256
NFTX v3 vault ID.
tickLower
int24
Lower tick for v3 liquidity.
tickUpper
int24
Upper tick for v3 liquidity.
fee
uint24
Fee tier of V3 AMM pool to be used.
sqrtPriceX96
uint160
Starting price, if pool is not initialized.
amount0Min
uint256
Minimum token0 amount to succeed.
amount1Min
uint256
Minimum token1 amount to succeed.
deadline
uint256
Dealine for transaction to succeed. Unix timestamp, in seconds.
positionId
uint256
ID number of newly created position.
v2InventoryToXNFT
Migrates V2 inventory position to V3 xNFT inventory staking position.
vaultIdV2
uint256
V2 vault ID.
shares
uint256
V2 xToken shares.
idsToRedeem
uint256[]
NFT tokenIDs to redeem.
is1155
bool
Whether NFT collection uses ERC1155.
vaultIdV3
uint256
V3 vault ID.
minWethToReceive
uint256
Minimum WETH to be received.
xNFTId
uint256
ID of newly created xNFT.
v2VaultToXNFT
Migrates V2 vault token to V3 xNFT inventory staking position.
vaultIdV2
uint256
V2 vault ID.
vTokenV2
address
V2 vault address.
shares
uint256
The amount of v2 vToken shares to withdraw.
idsToRedeem
uint256[]
TokenIDs of NFTs to redeem.
is1155
bool
Whether the NFT collection uses ERC1155.
vaultIdV3
uint256
V3 vault ID.
minWethToReceive
uint256
Minimum required WETH to receive.
xNFTId
uint256
ID of newly created xNFT inventory position.
Last updated