ForceUnlockOnNonFundedSubSkeletonNID
Implementation of the ForceUnlockOnNonFunded sub-skeleton facet with Compilot gating for the TMI-Fraction Protocol.
_This facet serves as a sub-core component (sub-skeleton) of a TMI-Fraction Platform, enabling eligible users
(e.g., campaign issuers) to forcibly unlock and claim all wrapped assets from unsuccessful campaigns that have
settled into a NON_FUNDED
state.
IMPORTANT:
- This implementation is intended only for Platforms that issue campaigns capable of reaching a
NON_FUNDED
state. - The wrapped assets can be any type supported by the Protocol (i.e., fungible, semi-fungible, or non-fungible).
The process of forcibly unlocking all wrapped assets from an unsuccessful campaign (i.e., in the NON_FUNDED
state) is
signatured-based gated (see TxAuthDataVerifierFacet
) and is triggered when forceUnlockWrappedAssetsOnNonFunded()
is called,
following a sequential pipeline with three phases:
-
State Check: The Platform interacts with its
NonFundedState
sub-internal facet to verify that the current state of the targeted campaign allows the action. This is permissible only in theNON_FUNDED
state, indicating that the campaign ended unsuccessfully (e.g., failed to reach the softCap within its purchase period). -
Eligibility Check: The Platform interacts with its
ForceUnlockOnNonFundedEligibility
sub-internal facet to verify that the user (caller) meets the campaign's eligibility criteria (e.g., campaign creator only). -
Force Unlock Action: The Platform interacts with its
DoForceUnlockOnNonFunded
sub-internal facet to burn any remaining fractions of the campaign from the Platform (not owned by investors), forcibly unlock and unwrap all assets held in the campaign's Vault (i.e., the amount(s) wrapped at the campaign's creation), and transfer them to the eligible user._
UnauthorizedInitialization
Thrown when trying to initialize from non admin account.
ForceUnlockOnNonFundedHappened
Emitted at forceUnlockWrappedAssetsOnNonFunded()
.
initializeForceUnlockOnNonFundedSubSkeleton
Initializes the TxAuthDataVerifierFacetStorage
by registering the attestor address.
_This function can only be called by the Admin (see AccessControlFacet.sol
).
IMPORTANT:
- If the platform uses multiple NID skeletons or subskeletons, only one of them can be initialized._
Parameters
Name | Type | Description |
---|---|---|
signer_ | address | The address of the designated off-chain service that generates the required signatures. |
forceUnlockWrappedAssetsOnNonFunded
Forcibly unlocks and transfers all the wrapped assets of a failed campaign to the caller (user) while burning all unpurchased fractions (i.e., those not owned by the campaign's investors).
_Users must meet eligibility criteria (see forceUnlockOnNonFunded
Eligibility sub-internal facets).
This function can only be executed if the transaction calldata contains the required signature and expiration block
(see requireTxDataAuth
modifier).
This action is only permissible after the campaign's purchase period has ended unsuccessfully (i.e., when the
campaign is in the NON_FUNDED
state)._
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted campaign. |