Methods

Deposit Position

function depositPosition(uint256 _nftId, address _fcTokensTo) public returns(address, uint256);

This function lets any holder of a FlashNFT to deposit that FlashNFT into this contract and then mint fc-Tokens. The depositor can specify which address to send the fc-Tokens to.

Withdraw Position Owner

function withdrawPositionOwner(uint256 _nftId, address _nftTo) external;

This function will withdraw the FlashNFT from this contract by burning the borrowed fc-Tokens. Only the original depositor can withdraw the FlashNFT. The caller can specify which address to send the FlashNFT to.

Partial Withdraw Owner

function partialWithdrawOwner(uint256 _nftId, uint256 _fTokensToBurn, address _withdrawTo) external;

This function allows principal to be removed from the deposited FlashNFT by paying back both fTokens and fc-Tokens, as though it was both a partial unstake early and a partial collateral payback.

Initialise Strategy

function initialiseStrategy(address _fsAddress) external;

This deploys a new fc-Token for any given strategy address. This only needs to be called once per strategy, and anyone can call this.

Get Current Auction Cost

function getCurrentAuctionCost(uint256 _nftId, uint256 _flashtronautNftId)

This provides the current $FLASH tokens cost for any current auction, by providing the originally deposited FlashNFT id and optionally a Flashtronaut NFT id to receive a discounted FLASH cost.

  • Note: The caller must be holding the Flashtronaut in their wallet and calls to this function must be made from the caller otherwise the function will revert with an error.

Auction Purchase

function auctionPurchase(uint256 _nftId, uint256 _flashtronautNftId);

This function will purchase a FlashNFT at auction. The total fc-Tokens and FLASH tokens required to pay for and win the auction will be automatically calculated and removed from the users wallet who calls this function.

  • Note: fc-Tokens and Flash must be approved for spending against the Liquid Stake contracts for this function to execute successfully.

Owner Methods

Set Auction Tokens Destination

function setAuctionTokensDestination(address _newAuctionTokensDestination) external;

This function will change which address the FLASH tokens are sent to when a user spends FLASH tokens to win an auction.

This function can only be called by the Owner.

Set Flashtronaut NFT Address

 function setFlashtronautNFTAddress(address _newFlashtronautNFTAddress) external;

This function will change which contract address is the only one recognized as the official Flashtronaut NFT address, that any NFT holder of that contract will receive the 10% discount on the FLASH token cost at auctions.

  • Note: Networks which do not have Flashtronauts are configured to use a dummy NFT contract address where there are no items in the collection. This effectively means there is no discount on these networks.

This function can only be called by the Owner.

Helper Methods

Quote fcTokens

function quoteFCTokens(uint256 _nftId) external;

This function provides a calculation of total fc-Tokens minted for the given FlashNFT

Get Auction Start Details

function getAuctionStartDetails(uint256 _nftId) external;

This function provides a calculation of the exact start time of an auction, and if it has already started yet, for any given FlashNFT

Last updated