Vault-Backed

Release NFTs with a vault that enables collectors to pool & share rewards

This module simplifies the process of launching a Vault-Backed NFT into a single transaction, allowing you to deploy either an Edition or Rentable which will be automatically backed by a shared Vault.

Getting Started
Module Methods

Getting Started

To begin we'll import the FrostySDK, chain configurations, and VaultBackedNFT module.

Then we'll setup our signer (via wagmi/ethers) and create a new instance of the FrostySDK.

// Import SDK, chain configurations, and the VaultBackedNFT module
import { FrostySDK, chain, vaultBackedNFT } from "frosty-sdk";

// Get the signer via wagmi or configure using ethers
// Setup the SDK with the desired chain and signer
const sdk = new FrostySDK(chain.goerli, signer);

Module Methods

create
Creates deployments of minimal proxy clones of the Vault as well as Edition or Rentable implementation contracts.

create

Creates deployments of minimal proxy clones of the Vault as well as Edition or Rentable implementation contracts.

const [myNFT, myVault] = await edition.deploy(
  sdk,
  name,
  symbol,
  maxTokens,
  tokenPrice,
  maxTokenPurchase,
  royaltyBPS,
  metadataURI,
  metadataRendererInit,
  vaultDistributionTokenAddress,
  unlockDate,
  supports4907,
  onTxPending,
  onTxReceipt
);

console.log("NFT deployed to: ", myNFT.address);
console.log("Vault deployed to: ", myVault.address);

sdk (SDK)
An instance of the FrostySDK, configured with a chain and signer.

name (string)
The name of the NFT collection.

symbol (string)
The symbol of the NFT collection.

maxTokens (number)
The total number of tokens allowed to be minted from the collection.

tokenPrice (BigNumber)
The price (in Wei) to mint a token from the collection.

maxTokenPurchase (number)
The maximum number of tokens allowed per mint.

royaltyBPS (number)
The maximum number of tokens allowed per mint.

metadataURI (string)
The base URI for the collection metadata.

metadataRendererInit (MetadataRendererInit)
An object containing metadata to initialize with the on-chain metadata renderer.

vaultDistributionTokenAddress (string)
The address of the ERC20 token that will be distributed by the vault.

unlockDate (number)
The timestamp at which the vault will unlock and allow distributions.

supports4907 (boolean)
A flag indicating whether to deploy a Rentable (true) or Edition (false) as the underlying NFT.

onTxPending (Function) - optional
A callback function executed upon submission of the deploy transaction.

onTxReceipt (Function) - optional
A callback function executed upon receipt of the deploy transaction.