referrerpolicy=no-referrer-when-downgrade

Crate pallet_accumulate_and_forward

Crate pallet_accumulate_and_forward 

Source
Expand description

§Accumulate-and-Forward Pallet

Intercepts configurable token inflows (transaction fees, dust removal, coretime revenue) on system parachains and gathers them in a local accumulation account for periodic forwarding to a configurable destination.

§Usage

  • Fees: Use DealWithFeesSplit to split fees between accumulation and other handlers
  • Burns/Revenue: Use the pallet as OnUnbalanced<CreditOf> handler (e.g., dust removal, coretime revenue) Note: Direct calls to pallet_balances::Pallet::burn() extrinsic are not redirected to the accumulation account — they still reduce total issuance directly.

§Setup

The accumulation account must be pre-funded with at least the existential deposit. For new chains, include the account in the balances genesis config. For existing chains, fund it via a manual transfer.

If the accumulation account is not pre-funded, deposits below ED will be silently burned.

§Total Issuance

Accumulated funds are burnt upon forwarding (reducing total_issuance here) and the same funds are minted at the destination when the sent message is received.

Re-exports§

pub use weights::WeightInfo;
pub use pallet::*;

Modules§

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

Structs§

DealWithFeesSplit
A configurable fee handler that splits fees between the accumulation account and another destination.
LegacyAdapter
Adapter that redirects NegativeImbalance from the legacy Currency trait to the accumulation account.

Traits§

Forwarder
Trait for forwarding accumulated funds to a configured destination.

Type Aliases§

BalanceOf
Type alias for balance.
CreditOf
Type alias for credit (negative imbalance - funds that were removed). This is for the fungible::Balanced trait.