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.soland 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
NonFundedStatesub-internal facet to verify that the campaign is in theNON_FUNDEDstate. -
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
ReceiveAfterNonFundedEligibilitysub-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
DoReceiveAfterNonFundedsub-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
Thrown when receiveFundsAfterNonFunded() is invoked by a user not owning the specified NFT purchase receipt.
FundsReceivedAfterNonFunded
Emitted at receiveFundsAfterNonFunded().
receiveFundsAfterNonFunded
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
| Name | Type | Description |
|---|---|---|
| campaignId | uint256 | The unique identifier of the targeted campaign. |
| nftId | uint256 | The ID of the purchase receipt NFT obtained from TwoClickPurchaseSkeleton during purchase. |
| uint256 | ||
| bytes |

