Module pallet

Source
Expand description

The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.

The main components of this pallet are:

  • Pallet, which implements all of the dispatchable extrinsics of the pallet, among other public functions.
    • The subset of the functions that are dispatchable can be identified either in the dispatchables module or in the Call enum.
  • storage_types, which contains the list of all types that are representing a storage item. Otherwise, all storage items are listed among Type Definitions.
  • Config, which contains the configuration trait of this pallet.
  • Event and Error, which are listed among the Enums.

Modules§

dispatchables
Auto-generated docs-only module listing all defined dispatchables for this pallet.
storage_types
Auto-generated docs-only module listing all (public and private) defined storage types for this pallet.

Structs§

FairElection
A FairElection represents an election model that preserves the structure and fairness of backing by retaining each supporter’s individual contribution weight.
FlatElection
A FlatElection represents an election model in which an author’s entire backing position is flattened into a single aggregated influence value.
GenesisConfig
Genesis configuration for the Authors pallet.
Pallet
Primary Marker type for the Authors pallet.

Enums§

Call
Contains a variant per dispatchable extrinsic that this pallet has.
Error
The Error enum of this pallet.
Event
The Event enum of this pallet
FreezeReason
Reasons for which an author’s assets may be temporarily frozen in the runtime.

Traits§

Config
Configuration trait of this pallet.

Type Aliases§

AuthorFunders
Stores the funder details for each (Author, Backer) pair.
AuthorPenalties
Stores pending penalties for authors by ([BlockNumberFor], Author) key.
AuthorRewards
Stores pending rewards for authors by ([BlockNumberFor], Author) key.
AuthorsDigest
Maps each AuthorDigest to its corresponding Author account.
AuthorsMap
Maps each Author account to its on-chain metadata (AuthorInfo).
Elected
Persistent record of elected authors per block, representing the outcome of each finalized election round.
ForceMaxElected
A strictness flag controlling how the system enforces the MaxElected limit.
IncreaseProbationBy
Number of blocks by which an author’s risk period is increased upon misbehavior.
MaxElected
The upper bound on the number of authors that can be elected in a single election round.
MaxExposure
Global Maximum exposure allowed globally per funding operation.
MinCollateral
Global Minimum collateral required for any author.
MinElected
The minimum required number of authors that must be elected for an election to be considered valid.
MinFund
Global Minimum funding required globally per funding operation.
ModuleDeprecated
Type alias to Pallet, to be used by construct_runtime.
PenaltiesBuffer
Buffer period in blocks before a penalty can be applied.
PenaltiesUntil
Tracks the latest block number until which author penalties are scheduled.
ProbationPeriod
Number of blocks representing the probation period for newly enrolled or demoted authors.
RecentElectedOn
Tracks the most recent block number in which an election was conducted and successfully stored in Elected.
ReduceProbationBy
Number of blocks by which an author’s risk period is reduced upon good behavior.
RewardsBuffer
Buffer period in blocks before a reward can be applied.
RewardsUntil
Tracks the latest block number until which author rewards are scheduled.