Skip to content
Unverified Commit ad0de749 authored by Muharem Ismailov's avatar Muharem Ismailov Committed by GitHub
Browse files

`MaybeConsideration` extension trait for `Consideration` (#5384)

Introduce `MaybeConsideration` extension trait for `Consideration`.

The trait allows for the management of tickets that may represent no
cost. While the `MaybeConsideration` still requires proper handling, it
introduces the ability to determine if a ticket represents no cost and
can be safely forgotten without any side effects.

The new trait is particularly useful when a consumer expects the cost to
be zero under certain conditions (e.g., when the proposal count is below
a threshold N) and does not want to store such consideration tickets in
storage. The extension approach allows us to avoid breaking changes to
the existing trait and to continue using it as a non-optional version
for migrating pallets that utilize the `Currency` and `fungible` traits
for `holds` and `freezes`, without requiring any storage migration.
parent 178e699c
Pipeline #492861 waiting for manual action with stages
in 1 hour, 20 minutes, and 17 seconds