Staking Protocolinterfaces

ILockVariationsFacet

It defines the basic interface of LockVariation facets.

initLockVariationsFacet

function initLockVariationsFacet(bytes initLockVariationsData) external

Initialization function.

The structure and content of initLockVariationsData are implementation specific.

Parameters

NameTypeDescription
initLockVariationsDatabytesThe ABI-encoded initialization data.

setCampaignLockVariations

function setCampaignLockVariations(uint256 campaignId, bytes campaignLockVariationsData) external

Setter function for configuring time-based lock constraints for the specified staking campaign.

Setter functions are executed during the creation process of campaigns. The structure and content of campaignLockVariationsData are implementation specific.

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted staking campaign.
campaignLockVariationsDatabytesThe ABI-encoded time-based lock configuration data.

checkTimeLock

function checkTimeLock(uint256 campaignId, uint256 timeLockPeriod) external view

Checks whether the specified lock period complies with the configured time-based lock constraints of the given campaign.

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted staking campaign.
timeLockPerioduint256The lock period to check, in seconds (unix period format).

On this page