Module pallet_transfer_allowlist::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 theCall
enum.
- The subset of the functions that are dispatchable can be identified either in the
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
andError
, which are listed among the Enums.
Re-exports§
pub use __tt_error_token_1 as tt_error_token;
pub use __tt_default_parts_7 as tt_default_parts;
pub use __tt_extra_parts_7 as tt_extra_parts;
Modules§
- Auto-generated docs-only module listing all defined dispatchables for this pallet.
- Auto-generated docs-only module listing all (public and private) defined storage types for this pallet.
Structs§
- Struct to define when a transfer should be allowed from the sender, receiver, and currency combination. Transfer allowed time set by range of block numbers Defaults to
allowed_at
starting at 0, andblocked_at
ending at MAX block value as perDefault
impl. Current block must be between allowed at and blocked at for transfer to be approved if allowance for sender/currency/receiver present. - Metadata values used to track and manage Allowances for a sending Account/Currency combination. contains the number of allowances/presence of existing allowances for said combination, as well as whether a delay is set for the allowance to take effect, and if–and then when–a delay is modifiable.
- The
Pallet
struct, the main type that implements traits and standalone functions within the pallet.
Enums§
- Contains a variant per dispatchable extrinsic that this pallet has.
- The
Error
enum of this pallet. - The
Event
enum of this pallet - A reason for this pallet placing a hold on funds.
Constants§
- The current storage version.
Traits§
- Configuration trait of this pallet.
Type Aliases§
- Storage item for allowances specified for a sending account, currency type and receiving location
- Storage item containing number of allowances set, delay for sending account/currency, and block number delay is modifiable at. Contains an instance of AllowanceMetadata with allowance count as
u64
, current_delay asOption<BlockNumberFor<T>>
, and modifiable_at asOption<BlockNumberFor<T>>
. If a delay is set, but no allowances have been created,allowance_count
will be set to0
. A double map is used here as we need to know whether there is a restriction set for the account and currency in the case where there is no allowance for destination location. Using an StorageNMap would not allow us to look up whether there was a restriction for the sending account and currency, given that: - AllowanceDetails where
BlockNumber
is of typeBlockNumberFor<T>
- Balance type for the reserve/deposit made when creating an Allowance
- ModuleDeprecatedType alias to
Pallet
, to be used byconstruct_runtime
. - Resons for holding as defined by the
fungible::hold::Inspect
trait