🔓FutureToken

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

address public 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.

bool public 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.
 */
function setAuthorizedMinterSingleUse(address authorizedMinter_) external {
    if (authorizedMinter != address(0)) revert Unauthorized();
    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.
 */
function safeMint(address to) external returns (uint256 tokenId) {
    if (msg.sender != authorizedMinter) revert Unauthorized();
    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.
 */
function getClaimInfo(
    uint256 tokenId
)
    external
    view
    override
    returns (uint256 deltaAmountClaimable, uint256 amountAlreadyClaimed)
{
    (
        uint256 deltaAmountClaimable_,
        uint256 updatedAmountClaimed_
    ) = ITokenTableUnlockerV2(authorizedMinter).calculateAmountClaimable(
            tokenId
        );
    deltaAmountClaimable = deltaAmountClaimable_;
    amountAlreadyClaimed = updatedAmountClaimed_ - deltaAmountClaimable_;
}

Errors

0x82b42900

error Unauthorized();

Last updated