Skip to content

Commit 02a6c96

Browse files
committed
Add alliance pallet documentation
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
1 parent 8bbd90b commit 02a6c96

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed

frame/alliance/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Alliance Pallet
2+
3+
The Alliance Pallet provides a DAO to form an industry group that does two main things:
4+
5+
- provide a set of ethics against bad behaviors.
6+
- provide recognition and influence for those teams that contribute something back to the ecosystem.
7+
8+
## Overview
9+
10+
The Alliance first needs to initialize the Founders with sudo permissions.
11+
After that, anyone with an approved identity and website can apply to become a Candidate.
12+
Members will initiate a motion to determine whether a Candidate can join the Alliance or not.
13+
The motion requires the approval of over 2/3 majority.
14+
The Alliance can also maintain a blacklist list about accounts and websites.
15+
Members can also vote to update the alliance's rule and make announcements.
16+
17+
### Terminology
18+
19+
- Rule: The IPFS Hash of the Alliance Rule for the community to read
20+
and the alliance members to enforce for the management.
21+
22+
- Announcement: An IPFS hash of some content that the Alliance want to announce.
23+
24+
- Member: An account which is already in the group of the Alliance,
25+
including three types: Founder, Fellow, Ally.
26+
Member can also be kicked by super majority motion or retire by itself.
27+
28+
- Founder: An account who is initiated by sudo with normal voting rights for basic motions
29+
and special veto rights for rule change and ally elevation motions.
30+
31+
- Fellow: An account who is elevated from Ally by Founders and other Fellows from Ally.
32+
33+
- Ally: An account who is approved by Founders and Fellows from Candidate.
34+
An Ally doesn't have voting rights.
35+
36+
- Candidate: An account who is trying to become a member.
37+
The applicant should already have an approved identity with website.
38+
The application should be submitted by the account itself with some token as deposit,
39+
or be nominated by an existing Founder or Fellow for free.
40+
41+
- Blacklist: A list of bad websites and addresses, and can be added or removed items by Founders and Fellows.
42+
43+
## Interface
44+
45+
### Dispatchable Functions
46+
47+
#### For General Users
48+
- `submit_candidacy` - Submit the application to become a candidate with deposit.
49+
50+
#### For Members (All)
51+
- `retire` - Member retire to out of the Alliance and release its deposit.
52+
53+
#### For Members (Founders/Fellows)
54+
55+
- `propose` - Propose a motion.
56+
- `vote` - Vote on a motion.
57+
- `close` - Close a motion with enough votes or expired.
58+
- `set_rule` - Initialize or update the alliance's rule by IPFS hash.
59+
- `announce` - Make announcement by IPFS hash.
60+
- `nominate_candidacy` - Nominate a non-member to become a Candidate for free.
61+
- `approve_candidate` - Approve a candidate to become an Ally.
62+
- `reject_candidate` - Reject a candidate and slash its deposit.
63+
- `elevate_ally` - Approve an ally to become a Fellow.
64+
- `kick_member` - Kick a member and slash its deposit.
65+
- `add_blacklist` - Add some items of account and website in the blacklist.
66+
- `remove_blacklist` - Remove some items of account and website from the blacklist.
67+
68+
#### For Members (Only Founders)
69+
- `veto` - Veto on a motion about `set_rule` and `elevate_ally`.
70+
71+
#### For Super Users
72+
- `init_founders` - Initialize the founding members.
73+
74+
License: Apache-2.0

frame/alliance/src/lib.rs

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,80 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18+
//! # Alliance Pallet
19+
//!
20+
//! The Alliance Pallet provides a DAO to form an industry group that does two main things:
21+
//!
22+
//! - provide a set of ethics against bad behaviors.
23+
//! - provide recognition and influence for those teams that contribute something back to the ecosystem.
24+
//!
25+
//! ## Overview
26+
//!
27+
//! The Alliance first needs to initialize the Founders with sudo permissions.
28+
//! After that, anyone with an approved identity and website can apply to become a Candidate.
29+
//! Members will initiate a motion to determine whether a Candidate can join the Alliance or not.
30+
//! The motion requires the approval of over 2/3 majority.
31+
//! The Alliance can also maintain a blacklist list about accounts and websites.
32+
//! Members can also vote to update the alliance's rule and make announcements.
33+
//!
34+
//! ### Terminology
35+
//!
36+
//! - Rule: The IPFS Hash of the Alliance Rule for the community to read
37+
//! and the alliance members to enforce for the management.
38+
//!
39+
//! - Announcement: An IPFS hash of some content that the Alliance want to announce.
40+
//!
41+
//! - Member: An account which is already in the group of the Alliance,
42+
//! including three types: Founder, Fellow, Ally.
43+
//! Member can also be kicked by super majority motion or retire by itself.
44+
//!
45+
//! - Founder: An account who is initiated by sudo with normal voting rights for basic motions
46+
//! and special veto rights for rule change and ally elevation motions.
47+
//!
48+
//! - Fellow: An account who is elevated from Ally by Founders and other Fellows from Ally.
49+
//!
50+
//! - Ally: An account who is approved by Founders and Fellows from Candidate.
51+
//! An Ally doesn't have voting rights.
52+
//!
53+
//! - Candidate: An account who is trying to become a member.
54+
//! The applicant should already have an approved identity with website.
55+
//! The application should be submitted by the account itself with some token as deposit,
56+
//! or be nominated by an existing Founder or Fellow for free.
57+
//!
58+
//! - Blacklist: A list of bad websites and addresses, and can be added or removed items by Founders and Fellows.
59+
//!
60+
//! ## Interface
61+
//!
62+
//! ### Dispatchable Functions
63+
//!
64+
//! #### For General Users
65+
//! - `submit_candidacy` - Submit the application to become a candidate with deposit.
66+
//!
67+
//! #### For Members (All)
68+
//! - `retire` - Member retire to out of the Alliance and release its deposit.
69+
//!
70+
//! #### For Members (Founders/Fellows)
71+
//!
72+
//! - `propose` - Propose a motion.
73+
//! - `vote` - Vote on a motion.
74+
//! - `close` - Close a motion with enough votes or expired.
75+
//! - `set_rule` - Initialize or update the alliance's rule by IPFS hash.
76+
//! - `announce` - Make announcement by IPFS hash.
77+
//! - `nominate_candidacy` - Nominate a non-member to become a Candidate for free.
78+
//! - `approve_candidate` - Approve a candidate to become an Ally.
79+
//! - `reject_candidate` - Reject a candidate and slash its deposit.
80+
//! - `elevate_ally` - Approve an ally to become a Fellow.
81+
//! - `kick_member` - Kick a member and slash its deposit.
82+
//! - `add_blacklist` - Add some items of account and website in the blacklist.
83+
//! - `remove_blacklist` - Remove some items of account and website from the blacklist.
84+
//!
85+
//! #### For Members (Only Founders)
86+
//! - `veto` - Veto on a motion about `set_rule` and `elevate_ally`.
87+
//!
88+
//! #### For Super Users
89+
//! - `init_founders` - Initialize the founding members.
90+
//!
91+
1892
#![cfg_attr(not(feature = "std"), no_std)]
1993

2094
mod benchmarking;

0 commit comments

Comments
 (0)