56 releases (36 major breaking)

new 38.0.0 Jan 13, 2025
37.0.0 Sep 26, 2024
36.0.1 Oct 9, 2024
36.0.0 Jul 18, 2024
2.0.0-alpha.5 Mar 24, 2020

#382 in Magic Beans

Download history 2524/week @ 2024-09-25 1849/week @ 2024-10-02 1818/week @ 2024-10-09 2118/week @ 2024-10-16 2327/week @ 2024-10-23 2194/week @ 2024-10-30 6951/week @ 2024-11-06 27142/week @ 2024-11-13 26465/week @ 2024-11-20 26333/week @ 2024-11-27 27828/week @ 2024-12-04 24734/week @ 2024-12-11 19551/week @ 2024-12-18 7187/week @ 2024-12-25 19298/week @ 2025-01-01 18050/week @ 2025-01-08

67,828 downloads per month
Used in 83 crates (14 directly)

Apache-2.0

3MB
52K SLoC

Treasury Pallet

The Treasury pallet provides a "pot" of funds that can be managed by stakeholders in the system and a structure for making spending proposals from this pot.

Overview

The Treasury Pallet itself provides the pot to store funds, and a means for stakeholders to propose, approve, and deny expenditures. The chain will need to provide a method (e.g.inflation, fees) for collecting funds.

By way of example, the Council could vote to fund the Treasury with a portion of the block reward and use the funds to pay developers.

Terminology

  • Proposal: A suggestion to allocate funds from the pot to a beneficiary.
  • Beneficiary: An account who will receive the funds from a proposal if the proposal is approved.
  • Deposit: Funds that a proposer must lock when making a proposal. The deposit will be returned or slashed if the proposal is approved or rejected respectively.
  • Pot: Unspent funds accumulated by the treasury pallet.

Interface

Dispatchable Functions

General spending/proposal protocol:

  • spend_local - Propose and approve a spend of treasury funds, enables the creation of spends using the native currency of the chain, utilizing the funds stored in the pot
  • spend - Propose and approve a spend of treasury funds, allows spending any asset kind managed by the treasury
  • remove_approval - Force a previously approved proposal to be removed from the approval queue
  • payout - Claim a spend
  • check_status - Check the status of the spend and remove it from the storage if processed
  • void_spend - Void previously approved spend

Release

Polkadot SDK Stable 2412

Dependencies

~19–33MB
~558K SLoC