Skeleton Facets
Skeletons represent mandatory facets that must be added to the diamond proxy when deploying a platform.
Note
Only the Skeleton facets relevant to the platform’s targeted functionality need to be included.
There are two sets of skeleton facets that enable the Campaign and the Campaign with buyback core functionalities, respectively:
Campaign requires 3 skeleton facets:
Skeleton | Description |
---|---|
CreateFractionsSkeleton | Provides functionality to create fractions. |
PurchaseSkeleton | Exposes functions that allow users to purchase fractions. There are four PurchaseSkeletons available that provide different functionality depending on the use case: TwoClickPurchaseSkeleton, PurchaseSkeletonDiscount, PurchaseSkeletonNoDiscount, PurchaseSkeletonGenesisIds. |
ReceiveSkeleton | Provides functionality to receive funds collected from a campaign. |
Campaign with buyback requires 5 skeleton facets:
Skeleton | Description |
---|---|
CreateFractionsSkeleton | Provides functionality to create fractions. |
PurchaseSkeleton | Exposes functions that allow users to purchase fractions. There are four PurchaseSkeletons available that provide different functionality depending on the use case: TwoClickPurchaseSkeleton, PurchaseSkeletonDiscount, PurchaseSkeletonNoDiscount, PurchaseSkeletonGenesisIds. |
ReceiveSkeleton | Provides functionality to receive funds collected from a campaign. |
BuybackSkeleton | Enables the buyback functionality for users. |
ReceiveAfterBuybackSkeleton | Allows users to retrieve principal and interest after the buyback. |
Eligibility Verification
Each Skeleton facet consumes the associated eligibility interface by calling it through the diamond proxy. It does not implement the interface itself but instead delegates eligibility checks to the corresponding internal eligibility facet.
For instance, the PurchaseSkeletonGenesisIds
interacts with the
IPurchaseEligibilityFacet interface, which allows checking whether a user can execute the purchase()
function.
Below is an example of the function call to check the account eligibility:
The implementation of eligibility checks enables a robust mechanism where only accounts (users) matching specific criteria can participate in a campaign.
Developers are free to customize the eligibility verification mechanism by selecting the desired implementations and configuring them appropriately.
Note
Each skeleton facet delegates eligibility checks to its corresponding internal eligibility facet. This ensures that all user-facing transactional functions exposed by the skeleton are protected by access control logic. As a result, whenever users interact with platform functionality through a skeleton, their eligibility is automatically verified.
The next topic provides information on the subskeletons that provide additional functionality to the platform.