Smart Contracts

Technical reference for NFTH smart contracts.

Contract Addresses

HyperEVM Mainnet (Chain ID: 999)

Coming soon

HyperEVM Testnet (Chain ID: 998)

ContractAddress
NFTXVaultFactoryUpgradeable0xF01e30BA10FfbaaEcD236D0498EED374fe40eff9
NFTXVaultUpgradeable (impl)0x7050F3210784cB6BEE58679a4AC53339CC64f068
NFTXSimpleFeeDistributor0x5f1309B5c6110a12df92FF47d6DcfaBa18ac4Dda

Deployed Vaults:

VaultAddressNFT Contract
Tiny Hyper Cats (vTHC)0xA064Ba9311b70B198aEa87B24628c922B15BB1310x92F39103437b994CA8D8fAB483F7743B9a2a57dE
Hypurr (vHYPURR)0xe4F4333e8A57A281895ec6757A7dD9465b20d6220x37BB9a02355a73D595eEea109acd74E5311628ad
Hypio (vHYPIO)0xD254a8BA961Aa54736E9C2602d8bD802a4D595c50xae8d5F3C4CFf1560666A1642804eefE812c703B8

RPC: https://rpc.hyperliquid-testnet.xyz/evm

Core Contracts

NFTXVaultFactoryUpgradeable

The factory contract that deploys and manages vaults.

Key Functions:

// Create a new vault
function createVault(
    string calldata name,
    string calldata symbol,
    address assetAddress,
    bool is1155,
    bool allowAllItems
) external returns (uint256 vaultId);

// Get all vaults for an NFT collection
function vaultsForAsset(address asset)
    external view returns (address[] memory);

// Get vault address by ID
function vault(uint256 vaultId)
    external view returns (address);

NFTXVaultUpgradeable

Individual vault contracts that hold NFTs and issue vTokens.

Key Functions:

// Deposit NFTs, receive vTokens
function mint(
    uint256[] calldata tokenIds,
    uint256[] calldata amounts
) external returns (uint256 vTokensMinted);

// Burn vTokens, receive random NFTs
function redeem(
    uint256 amount,
    uint256[] calldata specificIds
) external returns (uint256[] memory redeemedIds);

// Burn vTokens, receive specific NFTs (1% fee)
function redeemTo(
    uint256 amount,
    uint256[] calldata specificIds,
    address to
) external returns (uint256[] memory redeemedIds);

NFTXEligibilityManager

Manages eligibility modules that determine which NFTs can be deposited.

Eligibility Types:

  • NFTXListEligibility - Whitelist of specific token IDs
  • NFTXRangeEligibility - Range of token IDs (min to max)

Events

VaultCreated

event VaultCreated(
    uint256 indexed vaultId,
    address vaultAddress,
    address assetAddress,
    string name,
    string symbol
);

Minted

event Minted(
    uint256[] tokenIds,
    uint256[] amounts,
    address indexed to
);

Redeemed

event Redeemed(
    uint256[] tokenIds,
    uint256[] amounts,
    address indexed to
);

Security

Audits

The contracts are forked from NFTX V2, which has been audited. The NFTH modifications focus on:

  • Removing staking functionality
  • Removing AMM integration
  • Simplifying fee structure

Immutability

Once deployed, vault logic cannot be upgraded. This ensures:

  • Predictable behavior
  • No admin key risks
  • Trustless operation