Expand description

§dApp Staking v3 Pallet

For detailed high level documentation, please refer to the attached README.md file. The crate level docs will cover overall pallet structure & implementation details.

§Overview

Pallet that implements the dApp staking v3 protocol. It covers everything from locking, staking, tier configuration & assignment, reward calculation & payout.

The types module contains all of the types used to implement the pallet. All of these types are extensively tested in their dedicated test_types module.

Rest of the pallet logic is concentrated in the lib.rs file. This logic is tested in the tests module, with the help of extensive testing_utils.

Re-exports§

Modules§

  • The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
  • Autogenerated weights for pallet_dapp_staking

Structs§

  • General info about an account’s lock & stakes.
  • An ordered map based on a B-Tree.
  • Describes which entries are next in line for cleanup.
  • Composite type that holds information about how much was staked on a contract in up to two distinct eras.
  • General information about a dApp.
  • Information about all of the dApps that got into tiers, and tier rewards
  • Info about an era, including the rewards, how much is locked, unlocking, etc.
  • Information required for staker reward payout for a particular era.
  • Used to efficiently store era span information.
  • Helper internal struct for iterating over (era, stake amount) pairs.
  • Struct with relevant information for a finished period.
  • Info about the ongoing period.
  • General information & state of the dApp staking protocol.
  • Information about how much a particular staker staked on a particular smart contract.
  • Describes stake amount in an particular era/period.
  • Top level description of tier slot parameters used to calculate tier configuration.
  • Configuration of dApp tiers.
  • How much was unlocked in some block.
  • A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Enums§

Traits§

Type Aliases§

Derive Macros§

  • Derive macro generating an impl of the trait Debug.