Staking Protocolinterfaces
IAmountsFacet
It defines the basic interface of CampaignAmounts Facets.
initAmountsFacet
Initialization function.
The structure and content of initAmountsData
are implementation specific.
Parameters
Name | Type | Description |
---|---|---|
initAmountsData | bytes | The ABI-encoded initialization data. |
setCampaignAmountsData
Setter function for configuring amount-based input packet constraints for the specified staking campaign.
Setter functions are executed during the creation process of campaigns.
The structure and content of campaignAmountsData
are implementation specific.
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted staking campaign. |
campaignAmountsData | bytes | The ABI-encoded amount-based configuration data. |
checkInputPackets
Checks whether the specified amount of packets can be allocated within a given campaign's position.
If nftId == 0
, the check is performed for a stake operation; otherwise, it is performed for a restake
operation.
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted staking campaign. |
nftId | uint256 | The unique identifier of the NFT associated with the position. |
amountOfPackets | uint256 | The number of input packets to check. |
checkUnstakePackets
Checks whether the specified amount of packets can be withdrawn from a given campaign's position.
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted staking campaign. |
nftId | uint256 | The unique identifier of the NFT associated with the position. |
amountOfPackets | uint256 | The number of input packets to check. |
isPartialUnstake | bool | A flag indicating whether the unstake is partial (true ) or full (false ). |