FutureTokens are redemption NFTs minted to stakeholders to represent token ownership.
A FutureToken is minted whenever an actual unlocking schedule is created by a founder for a stakeholder. The holder of a FutureToken can use it to claim unlocked tokens. A single instance of FutureToken corresponds to a single instance of Unlocker. The ID of this NFT is the ID of the actual unlocking schedule.
A founder can configure if FutureToken is transferable.
Note: FutureToken is based on ERC721AQueryable. This page only covers what we have built on top of the existing implementation.
Functions
authorizedMinter
addresspublic authorizedMinter;
allowTransfer
This is set during initialization by the deployer. Disables transferFrom() and safeTransferFrom() if set to false.
Currently there is no way to change this variable after initialization.
boolpublic allowTransfer;
setAuthorizedMinterSingleUse
/** * @notice Sets who is authorized to mint future tokens. * @dev This function can only be called once. It is called automatically * when deployed using TTUDeployer. The authorized minter is usually the * unlocker contract. */functionsetAuthorizedMinterSingleUse(address authorizedMinter_) external {if (authorizedMinter !=address(0)) revertUnauthorized(); authorizedMinter = authorizedMinter_;}
safeMint
/** * @notice Mints a FutureToken to an address. * @dev This function can only be called by the authorized minter. A future * token with tokenId == actualId is minted. */functionsafeMint(address to) externalreturns (uint256 tokenId) {if (msg.sender != authorizedMinter) revertUnauthorized(); tokenId =_nextTokenId();_safeMint(to,1);}
getClaimInfo
/** * @notice Returns claim info for a given tokenId/actualId * @dev We assume the authorized minter is an instance of TTUV2. * @param tokenId The actual ID created in TTUV2. * @return deltaAmountClaimable The amount of tokens claimable as of now. * @return amountAlreadyClaimed The amount of tokens claimed as of now. */functiongetClaimInfo(uint256 tokenId)externalviewoverridereturns (uint256 deltaAmountClaimable,uint256 amountAlreadyClaimed){ (uint256 deltaAmountClaimable_,uint256 updatedAmountClaimed_ ) =ITokenTableUnlockerV2(authorizedMinter).calculateAmountClaimable( tokenId ); deltaAmountClaimable = deltaAmountClaimable_; amountAlreadyClaimed = updatedAmountClaimed_ - deltaAmountClaimable_;}