RecoverFractionsSubSkeleton
Implementation of the RecoverFractions sub-skeleton facet 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 recover fractions (purchased from campaigns) on behalf of other eligible users whose accounts have been compromised or lost, and transfer them to designated new accounts.
IMPORTANT:
-
This implementation is intended only for Platforms that issue recoverable fungible or semi-fungible fractions (see
fractioninternal facets). -
Recoverable fractions do not require approval to be transferred by addresses (e.g., the Platform) with the recoverer role.
The process of recovering fractions is triggered when recoverFractions() is executed, following a sequential pipeline of
four phases:
-
State Check: The Platform interacts with its
RecoverFractionsStatesub-internal facet to verify that the current state of the targeted campaign allows the recovery process to occur. -
Subject Eligibility Check: The Platform interacts with its
LostAccountEligibilitysub-internal facet to verify the eligibility of the specified lost account address to recover its fractions (e.g., the lost account must have previously specified that such a process is permitted). -
Recoverer Eligibility Check: The Platform interacts with its
RecoverFractionsEligibilitysub-internal facet to verify the eligibility of the user (caller) attempting the recovery (e.g., only the creator of the campaign is allowed). -
Recovery Action: The Platform interacts with its
DoRecoverFractionssub-internal facet to transfer the specified amount of fractions from the lost account to the specified new account._
FractionsRecovered
Emitted at recoverFractions().
recoverFractions
Recovers the specified amount of fractions (purchased from the campaign identified by campaignId) from
lostAccount and transfers them to recoveryAccount.
_Both the caller (recoverer) and lostAccount must meet eligibility criteria (see recoverFractions & lostAccount
Eligibility sub-internal facets).
Emits a {FractionsRecovered} event._
Parameters
| Name | Type | Description |
|---|---|---|
| campaignId | uint256 | The unique identifier of the targeted campaign. |
| lostAccount | address | The account from which fractions will be recovered. |
| recoveryAccount | address | The account to which the fractions will be transferred. |
| id | uint256 | The ID of the fractions to be recovered (relevant only for semi-fungible fractions). |
| amountOfFractions | uint256 | The number of fractions to recover (if applicable). |

