Fraction ProtocolsubSkeletonFacetsnonFundedSubSkeletons

NonFundedSubSkeletonForTwoClick

Implementation of the NonFunded sub-skeleton facet for the TMI-Fraction Protocol.

_This facet serves as a sub-core component (sub-skeleton) of a TMI-Fraction Platform, enabling investors to claim and receive their principal from failed (non-funded) campaigns by redeeming NFT purchase receipts (see TwoClickPurchaseSkeleton).


IMPORTANT:

  • This implementation must always be used in conjunction with TwoClickPurchaseSkeleton.sol and its dependent internal facets.

The process of investors redeeming purchase receipt NFTs for their principal within non-funded campaigns is triggered when receiveFundsAfterNonFunded() is invoked, following a sequential pipeline of five phases:

  • State Check: The Platform interacts with its NonFundedState sub-internal facet to verify that the campaign is in the NON_FUNDED state.

  • Ownership Check: The Platform verifies that the caller is the owner of the specified NFT to be redeemed.

  • Eligibility Check: The Platform interacts with its ReceiveAfterNonFundedEligibility sub-internal facet to verify that the user (caller) meets the campaign's eligibility criteria to claim and receive their principal.

  • Redeem Action: The Platform burns the NFT from the user in exchange for the principal funds it represents.

  • Receive Action: The Platform interacts with its DoReceiveAfterNonFunded sub-internal facet and transfers the principal funds back to the user. The transferred funds are determined by the NFT’s recorded purchase price and associated principal amount._

InvalidNftOwnerOnNonFunded

error InvalidNftOwnerOnNonFunded(address account)

Thrown when receiveFundsAfterNonFunded() is invoked by a user not owning the specified NFT purchase receipt.

FundsReceivedAfterNonFunded

event FundsReceivedAfterNonFunded(uint256 campaignId, address receiver, uint256 amountOfFractions)

Emitted at receiveFundsAfterNonFunded().

receiveFundsAfterNonFunded

function receiveFundsAfterNonFunded(uint256 campaignId, uint256 nftId, uint256, bytes) external

Burns the caller’s purchase receipt NFT (nftId) and transfers the corresponding principal amount of the campaign’s underlying funding asset(s) to the caller.

_The caller must own the specified purchase receipt NFT and meet eligibility criteria (see nonFunded Eligibility sub-internal facets).

This action should only be allowed when the campaign's state is NON_FUNDED.

Emits a {FundsReceivedAfterNonFunded} event._

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted campaign.
nftIduint256The ID of the purchase receipt NFT obtained from TwoClickPurchaseSkeleton during purchase.
uint256
bytes

On this page