Skip to content

Commit

Permalink
add: separate treasury tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Mar 1, 2020
1 parent d6d62db commit e7eec5a
Show file tree
Hide file tree
Showing 3 changed files with 632 additions and 596 deletions.
40 changes: 40 additions & 0 deletions frame/treasury/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Treasury Module

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

- `treasury::Trait`
- `Call`
## Overview

The Treasury Module 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 iff
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 module.
## Interface

### Dispatchable Functions

- `propose_spend` - Make a spending proposal and stake the required deposit.
- `set_pot` - Set the spendable balance of funds.
- `configure` - Configure the module's proposal requirements.
- `reject_proposal` - Reject a proposal, slashing the deposit.
- `approve_proposal` - Accept the proposal, returning the deposit.
## GenesisConfig

The Treasury module depends on the `GenesisConfig`.
Loading

0 comments on commit e7eec5a

Please sign in to comment.