substrate
substrate copied to clipboard
Pallets: Treasury spends various asset kinds
Treasury Pallet can accept proposals for spends of various asset kinds and pay them out through the implementation of the Pay trait.
New Dispatchables:
- spend(Config::AssetKind, AssetBalance, Config::Beneficiary, Option<ValidFrom>) - propose and approve a spend;
- payout(SpendIndex) - payout an approved spend or retry a failed payout;
- check_payment(SpendIndex) - check the status of a payout;
- void_spend(SpendIndex) - void previously approved spend;
existing
spenddispatchable renamed tospend_local
The parameters' types of the spend dispatchable exposed via the pallet's Config and allows to propose and accept a spend of a certain amount.
An approved spend can be claimed via the payout within the Config::SpendPeriod. Clients provide an implementation of the Pay trait which can pay an asset of the AssetKind to the Beneficiary.
The implementation of the Pay trait might not have an immediate final payment status, for example if implemented over XCM and the actual transfer happens on a remote chain.
The check_status dispatchable can be executed to update the spend's payment state and retry the payout if the payment has failed.
polkadot companion: https://github.com/paritytech/polkadot/pull/7427
Closes https://github.com/paritytech/polkadot-sdk/issues/92
The CI pipeline was cancelled due to failure one of the required jobs. Job name: cargo-check-benches Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3276578
bot rebase
Rebased
bot rebase
Rebased