Staking ProtocolglobalStoragegeneral

GeneralStakingStorage

This library manages the storage of global information related to staking campaigns and staking positions within a staking platform (i.e., Staking Diamond).

Each staking position is uniquely tied to a specific staking campaign.

STORAGE_SLOT

bytes32 STORAGE_SLOT

Unique identifier for the storage slot where the Layout struct is stored.

Layout

Struct for managing global information related to staking campaigns and positions.

struct Layout {
  uint256 totalCampaigns;
  uint256 totalNfts;
  mapping(uint256 => struct GeneralStakingStorage.Campaign) campaignsInfo;
  mapping(uint256 => struct GeneralStakingStorage.NftInfo) nftInfo;
}

Campaign

Struct containing global information for a staking campaign.

struct Campaign {
  uint256 state;
  address creator;
  address inputAssetKeeper;
  address rewardAssetHandler;
  uint256 startingTimestamp;
  uint256 endingTimestamp;
  uint256 totalPacketsStaked;
  uint256 virtualTotalPacketsStaked;
  uint256 rewardsEndingTimestamp;
}

NftInfo

Struct containing global information for an NFT token associated with a staking position.

struct NftInfo {
  uint256 campaignId;
  uint256 packetsStaked;
  uint256 virtualPacketsStaked;
  uint256 startingTimestamp;
  uint256 unlockTimestamp;
  uint256 rewardPacketsToBePaid;
  uint256 rewardPacketsPaid;
}

layout

function layout() internal pure returns (struct GeneralStakingStorage.Layout l)

Retrieves a reference to the Layout struct stored at the slot specified by STORAGE_SLOT unique identifier.

On this page