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

Categorize communities #385

Open
olanod opened this issue May 2, 2024 · 1 comment
Open

Categorize communities #385

olanod opened this issue May 2, 2024 · 1 comment

Comments

@olanod
Copy link
Member

olanod commented May 2, 2024

Let's explore the possibility of encoding data in the community ID to identify and categorize them better. Later we can also use this information to enable/restrict parts of the system, e.g. some types of communities can be created permissionlessly paying different prices while others only by root.

type Region = u16;
type Index = u16;
type Moniker = [u8; 4];

// a granular type that can also be represented as a number(e.g. u64) when needed
enum CommunityId {
    GeneralCollective(Moniker),
    Local(Region, Option<Index>),
    Commercial(Industry, Index),
    Union(Index),
    Administrative(Index),
    OssProject(Index),
}

enum Industry { ... }
@olanod olanod added this to Kreivo Q3 Jun 11, 2024
@olanod olanod changed the title Composite community ID to categorize communities Categorize communities Jun 11, 2024
@olanod
Copy link
Member Author

olanod commented Jun 11, 2024

An alternative to introducing categories as part of the CommunityId is to add the category as a field in the info of the community, this might create less issues to migrate and integrate with other pallets in the runtime.

@olanod olanod moved this to Backlog in Kreivo Q3 Jun 11, 2024
@pandres95 pandres95 removed the status in Kreivo Q3 Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant