Function pallet_treasury::pallet::dispatchables::spend
source · pub fn spend<T: Config<I>, I: 'static>(
asset_kind: Box<T::AssetKind>,
amount: AssetBalanceOf<T, I>,
beneficiary: Box<<<T as Config<I>>::BeneficiaryLookup as StaticLookup>::Source>,
valid_from: Option<BlockNumberFor<T>>
)
Expand description
Propose and approve a spend of treasury funds.
§Dispatch Origin
Must be Config::SpendOrigin
with the Success
value being at least
amount
of asset_kind
in the native asset. The amount of asset_kind
is converted
for assertion using the Config::BalanceConverter
.
§Details
Create an approved spend for transferring a specific amount
of asset_kind
to a
designated beneficiary. The spend must be claimed using the payout
dispatchable within
the Config::PayoutPeriod
.
§Parameters
asset_kind
: An indicator of the specific asset class to be spent.amount
: The amount to be transferred from the treasury to thebeneficiary
.beneficiary
: The beneficiary of the spend.valid_from
: The block number from which the spend can be claimed. It can refer to the past if the resulting spend has not yet expired according to theConfig::PayoutPeriod
. IfNone
, the spend can be claimed immediately after approval.
§Events
Emits Event::AssetSpendApproved
if successful.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::spend
.