Vault
Last updated
Was this helpful?
Last updated
Was this helpful?
A time-locked vault to distribute tokens to owners of an or collection at expiry based on their percentage of ownership in the collection.
To begin we'll import the FrostySDK, chain configurations, and the Vault module.
Then we'll setup our signer (via wagmi/ethers) and create a new instance of the FrostySDK.
Deploy a minimal proxy clone of the Vault implementation contract.
Get an ethers contract instance of a previously deployed Vault contract.
Deploy a minimal proxy clone of the Vault implementation contract.
sdk (SDK) An instance of the FrostySDK, configured with a chain and signer.
vaultDistributionTokenAddress (string) The address of the ERC20 token that will be distributed by the vault.
nftVaultKeyAddress (string) The address of the ERC20 token that will be distributed by the vault.
nftTotalSupply (number) The total supply of the ERC721 collection that is wrapped by the vault.
unlockDate (number) The timestamp at which the vault will unlock and allow distributions.
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.
Get an ethers contract instance of a previously deployed Vault contract.
sdk (SDK) An instance of the FrostySDK, configured with a chain and signer.
address (string) The contract address of a previously deployed Rentable contract.
Returns the balance of the ERC20 token held by the vault.
Returns the total amount of the ERC20 which has been claimed and released.
Allows owners of the ERC721 collection to claim their share of the ERC20 funding the vault for multiple tokens.
to (address) The address of the owner in the ERC721 collection to which ERC20 tokens will be sent.
tokenIds (uint256[]) An array of tokens held by the owner against which to claim their share of the ERC20 tokens funded by the vault.
Allows owners of the ERC721 collection to claim their share of the ERC20 funding the vault for an individual token.
to (address) The address of the owner in the ERC721 collection to which ERC20 tokens will be sent.
tokenId (uint256) The id of the token against which to claim a share of the ERC20 tokens funded by the vault.
A failsafe allowing the vault owner to withdraw ERC20 tokens sent to the vault
token (IERC20) The address of the ERC20 token to withdraw from the vault.
A failsafe allowing the vault owner to withdraw ETH sent to the vault
Returns the balance of the ERC20 token held by the vault.
Returns the total amount of the ERC20 which has been claimed and released.
Allows owners of the ERC721 collection to claim their share of the ERC20 funding the vault for multiple tokens.
Allows owners of the ERC721 collection to claim their share of the ERC20 funding the vault for an individual token.
A failsafe allowing the vault owner to withdraw ERC20 tokens sent to the vault
A failsafe allowing the vault owner to withdraw ETH sent to the vault