Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Communities] Initial implementation of the pallet #291

Merged
merged 12 commits into from
Dec 4, 2023

Conversation

pandres95
Copy link
Member

Closes #125. More granular issues/PRs to come in the following days.

@pandres95 pandres95 force-pushed the feature/pandres95-communities-pallet branch 2 times, most recently from cf966be to b5af173 Compare September 4, 2023 08:18
@pandres95 pandres95 added enhancement New feature or request hacktoberfest labels Oct 2, 2023
@pandres95 pandres95 self-assigned this Oct 2, 2023
@pandres95 pandres95 added hacktoberfest-accepted This PR participates on Hacktobefest and removed hacktoberfest labels Oct 19, 2023
@olanod olanod force-pushed the feature/pandres95-communities-pallet branch from d80a61c to debacd2 Compare October 30, 2023 10:42
pandres95 and others added 9 commits November 20, 2023 17:10
* change(runtime/kreivo): add pallet-communities as dep

* change(pallets/communities): set sp-runtime as dep to support StaticLookup

* feat(pallet/communities): checks for community state

* feat(pallets/communities): check for permissioned calls

* feat(pallets/communities): implement add_member

* change(pallets/communities): use try_mutate_exists on do_insert_member

* chore(community:tests): remove redundant submod

* feat(pallets/communities): implement remove_member

* change(pallets/communities): update documentation

* change(communities:Cargo): update package metadata

* fix(pallets/communities): apply clippy suggestions

* change(pallet/communities): update docs

* fix(communities:remove_member): make sure that origin is being checked on first

* chore(pallets/communities): explicit naming for functions that ensure origin
* change(runtime/kreivo): add pallet-communities as dep

* change(pallets/communities): set sp-runtime as dep to support StaticLookup

* feat(pallet/communities): checks for community state

* feat(pallets/communities): check for permissioned calls

* feat(pallets/communities): implement add_member

* change(pallets/communities): use try_mutate_exists on do_insert_member

* chore(community:tests): remove redundant submod

* feat(pallets/communities): implement remove_member

* change(pallets/communities): update documentation

* change(communities:Cargo): update package metadata

* fix(pallets/communities): apply clippy suggestions

* change(pallet/communities): update docs

* fix(communities:remove_member): make sure that origin is being checked on first

* chore(pallets/communities): explicit naming for functions that ensure origin
* chore(communities:tests): remove qualified references to sp_runtime::DispatchError

* refactor(communities:functions): simplify qualified references to types and traits

* feat(pallets/communities): implement assets_transfer

* feat(pallets/communities): implement balance_transfer

* chore(pallets/communities): update docs

* fix(communities:functions/tokens): apply fmt

* refactor(communities:functions/tokens): rename mod to treasury

* refactor(communities:functions): move do_create_community_account to treasury module

* chore(communities:functions/registration): rename as registry

* m:change(communities:registry): directly override value on do_set_metadata
* refactor(pallets/communities): resolve ambiguity between CommunityMetadata storage type and struct

* refactor(pallets/communities): split logical modules within pallet

* refactor(communities:pallet): use pallet::call(weight) option

* refactor(pallet/communities): remove excessive verbosity

* change(pallet/communities): update documentation regarding tokens

* refactor(pallets/communities): split types into multiple files
* feat(pallets/communities): define MemberRank trait, for MembershipPassport

* feat(pallets/communities): add structures and storage for handling governance

* feat(pallets/communities): add governance (polls/proposals) handling functions

* feat(pallets/communities): define open_proposal/execute_call

* change(pallets/communities): explictly state call origin when creating proposal

* fix(pallets/communities): lint

* change(communities:functions/origin): use CheckedConversion to replace as_origin!
@olanod olanod force-pushed the feature/pandres95-communities-pallet branch from 12f2f6b to 14ecf35 Compare November 21, 2023 16:29
pandres95 and others added 2 commits November 23, 2023 17:09
* feat(pallets/communities): define member_rank traits

* change(pallets/communities): split membership and member_rank
feat(communities:functions): implement do_promote and do_demote

* feat(pallet/communities): define/implement promote_member and demote_member

* Use specific Rank type instead of generic

---------

Co-authored-by: Daniel Olano <[email protected]>
@pandres95 pandres95 force-pushed the feature/pandres95-communities-pallet branch 2 times, most recently from 74f8b61 to ff53773 Compare November 24, 2023 16:38
@olanod olanod force-pushed the feature/pandres95-communities-pallet branch 2 times, most recently from 190f5db to 2131547 Compare December 4, 2023 23:45
Use dedicated origins for all extrinsics
Refactor and remove unused functionalities
@olanod olanod force-pushed the feature/pandres95-communities-pallet branch from 2131547 to db5da4a Compare December 4, 2023 23:51
@olanod olanod merged commit 33008d2 into master Dec 4, 2023
1 check failed
@olanod olanod deleted the feature/pandres95-communities-pallet branch December 4, 2023 23:51
@olanod
Copy link
Member

olanod commented Dec 4, 2023

The last edit includes reworking the pallet origin, require extrinsics to be called from a specific origin that checks for the existence and correct state of the community, delegating the logic of managing memberships to an external system of non-fungible memberships that can be transferred and finally removing unused functionalities and flattening the pallet directory structure to match the common Rust and Substrate practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest-accepted This PR participates on Hacktobefest
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

"Communities" pallet
3 participants