Skip to content

Commit

Permalink
include ingnore treasury pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas committed Oct 22, 2024
1 parent 918689f commit 08a24df
Show file tree
Hide file tree
Showing 6 changed files with 3,407 additions and 0 deletions.
59 changes: 59 additions & 0 deletions vendor/treasury/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[package]
name = "pallet-treasury"
version = "36.0.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
homepage = "https://paritytech.github.io/polkadot-sdk/"
license = "GPL-3.0-only"
repository = "https://github.com/paritytech/polkadot-sdk.git"
description = "FRAME pallet to manage treasury (polkadot v1.15.0)"
readme = "README.md"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
docify = { workspace = true }
frame-benchmarking = { optional = true, workspace = true }
frame-support.workspace = true
frame-system.workspace = true
impl-trait-for-tuples = { workspace = true }
pallet-balances.workspace = true
parity-scale-codec = { features = ["derive", "max-encoded-len"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
serde = { features = ["derive"], optional = true, workspace = true, default-features = true }
sp-core = { optional = true, workspace = true }
sp-runtime.workspace = true

[dev-dependencies]
pallet-utility = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }

[features]
default = ["std"]
std = [
"parity-scale-codec/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"pallet-balances/std",
"scale-info/std",
"serde",
"sp-core?/std",
"sp-runtime/std",
]
runtime-benchmarks = [
"dep:sp-core",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"sp-runtime/try-runtime",
]
47 changes: 47 additions & 0 deletions vendor/treasury/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 v1.15.0
- `propose_spend` - Make a spending proposal and stake the required deposit.
- `reject_proposal` - Reject a proposal, slashing the deposit.
- `approve_proposal` - Accept the proposal, returning the deposit.
Loading

0 comments on commit 08a24df

Please sign in to comment.