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§

CurrencyPayment
Struct that defines how to express the payment in a particular currency currency is defined by the Currency enum, which can be expressed as:
GenesisConfig
Can be used to configure the genesis state of this pallet.
HrmpInitParams
Pallet
The Pallet struct, the main type that implements traits and standalone functions within the pallet.
RemoteTransactInfoWithMaxWeight
Stores the information to be able to issue a transact operation in another chain use an asset as fee payer.
TransactWeights
Struct tindicating information about transact weights It allows to specify:

Enums§

Call
Contains a variant per dispatchable extrinsic that this pallet has.
Currency
Enum defining the way to express a Currency.
Error
An error that can occur while executing the mapping pallet’s logic.
Event
The Event enum of this pallet
HrmpOperation
Enum defining the way to express a Currency.

Constants§

MAX_WEIGHT
The amount of ref_time and proof_size to use for fee calculation if we are dealing with an Unlimited variant inside ‘overall_weight’ field of ‘TransactWeights’ struct.

Traits§

Config
Configuration trait of this pallet.

Type Aliases§

DestinationAssetFeePerSecond
Stores the fee per second for an asset in its reserve chain. This allows us to convert from weight to fee
IndexToAccount
Since we are using pallet-utility for account derivation (through AsDerivative), we need to provide an index for the account derivation. This storage item stores the index assigned for a given local account. These indices are usable as derivative in the relay chain
ModuleDeprecated
Type alias to Pallet, to be used by construct_runtime.
RelayIndices
Stores the indices of relay chain pallets
TransactInfoWithWeightLimit
Stores the transact info of a Location. This defines how much extra weight we need to add when we want to transact in the destination chain and maximum amount of weight allowed by the destination chain