Staking Protocolinterfaces

ITransferRewardFacet

It defines the basic interface of TransferReward facets.

initTransferRewardFacet

function initTransferRewardFacet(bytes transferRewardData) external

Initialization function.

The structure and content of transferRewardData are implementation specific.

Parameters

NameTypeDescription
transferRewardDatabytesThe ABI-encoded initialization data.

setCampaignTransferRewards

function setCampaignTransferRewards(uint256 campaignId, bytes campaignTransferRewardsData) external

Setter function for configuring the reward packet for the specified staking campaign.

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

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted staking campaign.
campaignTransferRewardsDatabytesThe ABI-encoded data containing the reward packet configuration.

transferReward

function transferReward(uint256 campaignId, address from, address to, uint256 amountOfPackets) external

Transfers the specified amount of a given campaign's reward packets from the from address to the to address.

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted staking campaign.
fromaddressThe address from which the assets encapsulated by the specified number of reward packets to be transferred.
toaddressThe address to receive the assets encapsulated by the specified number of reward packets.
amountOfPacketsuint256The number of reward packets to account for.

On this page