Skip to content

NFTX-project/nftx-protocol-v2.1

Repository files navigation

NFTX Protocol v2

Contracts

Contract sepolia arbitrum mainnet goerli
MultiProxyController 0x4f566a711901168804A74F252680d85C9246188e 0x732E5F7FE7c40333DfeFF57755666F85d1e164c1 0x35fb4026dcF19f8cA37dcca4D2D68A549548750C 0x70B139bFA4C91d9A13F6D7c7B949a62A6Fbd7488
NFTXEligibilityManager 0xa1ad09f8Fd789E3A940Ba9Dc5aE4D17021eF290D N/A N/A 0x7f2d8f32dcab0a6f84a36E19AD9799f0B4F73Fe3
NFTXInventoryStaking 0x2724f135e00a1078BC003D093D94Cc3718F6F591 0x1A2C03ABD4Af7C87d8b4d5aD39b56fa98E8C4Cc6 0x3E135c3E981fAe3383A5aE0d323860a34CfAB893 0x6e91A3f27cE6753f47C66B76B03E6A7bFdDB605B
NFTXLPStaking 0xcA523fBAf06a157F3D96735b6fC0626323a65BAa 0x5326A720f76CFbDfE9e18fA618C3a3f7AbDF3934 0x688c3E4658B5367da06fd629E41879beaB538E37 0xAfC303423580239653aFB6fb06d37D666ea0f5cA
NFTXMarketplace0xZap N/A 0x3BD7512966CbC3406962f8877edbE80aea8A2904 0x941A6d105802CCCaa06DE58a13a6F49ebDCD481C 0x177246adb119ed83f982d1e3c4859f354578d5ef
NFTXSimpleFeeDistributor 0x68A7F493F6C40556931559afD22D7eD868d3f78E N/A N/A 0xEafB9D3cA7395Be8925A8c190e8361d1174D31D7
NFTXStakingZap 0x1678c88B66f989accBccF20E1EaF65e75AAf4434 N/A N/A 0x775e23b64610dA2806dc5ed3b0862955e122DDc6
NFTXUnstakingInventoryZap 0x10dDb79e6612694365cd3004777e7541040F6182 0xB25Ea886FcE4bfDC8750Cb2D4464FE3F7A67bc07 0x2374a32ab7b4f7BE058A69EA99cb214BFF4868d3 0x8B9D81fF1845375379865c0997bcFf538513Eae1
NFTXVaultCreationZap 0x66f26E38bD50FD52A50da8E87E435f04f98001B7 0x4164C90589E596239a31579417775C980f446103 0xA42ecABB4ADEd01600d6e84A3Ee7785e3A506D37 0x4Af99Db0DF1cb904933C6622C01b93496a567823
NFTXVaultFactoryUpgradeable 0xE77b89FEc41A7b7dC74eb33602e82F0672FbB33C 0xE77b89FEc41A7b7dC74eb33602e82F0672FbB33C 0xBE86f647b167567525cCAAfcd6f881F1Ee558216 0x1478bEB5D18B23d2bA90FcEe91d66460AC585e6b
StakingTokenProvider 0x5B3004375CD6770C466377acF4dD2382dB9fa41d N/A 0x5fAD0e4cc9925365b9B0bbEc9e0C3536c0B1a5C7 0x057862b3DB9fDe38d030479FEe43Deb38b04d211
sushiRouter 0xEa8D67a95E1172718CbD601F0742B2ba4E45bC7C 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506
swapTarget 0x000000000000000000000000000000000000dEaD 0xDef1C0ded9bec7F1a1670819833240f027b25EfF 0xDef1C0ded9bec7F1a1670819833240f027b25EfF 0xF91bB752490473B8342a3E964E855b9f9a2A668e
TimelockExcludeList 0x57c8Aa1b15229C677d309B52715F3d8442a59cD6 N/A N/A 0xeF74238DF347BC5FfCd4EaA263F50eA693369cB6
uniLikeExchange 0xbb4B7cf5a75cc2Ac66A03FAC97Af67E8c364B4Cd 0xc35DADB65012eC5796536bD9864eD8773aBc74C4 0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac 0xc35DADB65012eC5796536bD9864eD8773aBc74C4
WETH 0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6

Setup

pnpm i

Create .env file by referencing .env.sample.

Installing foundry:

  1. curl -L https://foundry.paradigm.xyz | bash
  2. foundryup

Scripts

  1. Compile contracts and create their Typescript bindings.

    pnpm compile

  2. Run tests

    pnpm test

  3. Deploy to local hardhat node

    pnpm deploy:default
    Note: If you want to force deploy again, add --reset flag

  4. Deploy to Goerli

    pnpm deploy:goerli

Notes:

i. To only run a single deploy file run: pnpm deploy:goerli --tags <tag>
Tags are defined in the deploy script at the end like: func.tags = ["<tag>"]

ii. By default deploy uses Legacy transactions which is not ideal. So specify the EIP-1559 gas params when calling like this:
pnpm deploy:mainnet --tags <tag> --maxfee <inWei> --priorityfee <inWei>

iii. If need to deploy new implementation for a proxy which doesn't exist in the deployments folder:

  • Create ContractName.json with address
  • Create ContractName_Proxy.json with address & transactionHash
  • Make sure MultiProxyController.json exists with abi and transactionHash
  • ContractName_Implementation.json would then get deployed via script, but it'll fail to upgrade the proxy as MultiProxyController is owned by multisig (so do that manually).
  1. Verify deployed contracts on Etherscan

    pnpm verify:goerli

Note: If getting "Invalid API Key" error for arbiscan, etc. Execute like this: source .env && pnpm verify:arbitrum --api-key $ARBISCAN_API_KEY

Info

Contracts should be deployed in the following order:

  1. MultiProxyController
  2. StakingTokenProvider
  3. NFTXLPStaking
  4. NFTXSimpleFeeDistributor
  5. NFTXVaultFactoryUpgradeable
  6. NFTXInventoryStaking
  7. NFTXEligibilityManager
  8. NFTXStakingZap, NFTXUnstakingInventoryZap, TimelockExcludeList, NFTXMarketplace0xZap, NFTXVaultCreationZap

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published