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

Issue community tokens and mark one as sufficient #301

Conversation

pandres95
Copy link
Member

No description provided.

@pandres95 pandres95 force-pushed the 298-issue-community-tokens-and-mark-one-of-them-as-sufficient branch from 7e9fa54 to d7df042 Compare September 22, 2023 01:39
@pandres95 pandres95 deleted the branch feature/pandres95-communities-pallet September 28, 2023 18:33
@pandres95 pandres95 closed this Sep 28, 2023
@pandres95 pandres95 reopened this Sep 29, 2023
@pandres95 pandres95 force-pushed the 298-issue-community-tokens-and-mark-one-of-them-as-sufficient branch from d7df042 to 2560c03 Compare September 29, 2023 21:48
@pandres95 pandres95 changed the base branch from 295-handling-a-community-governed-treasury-account to feature/pandres95-communities-pallet September 29, 2023 21:49
@pandres95 pandres95 linked an issue Sep 29, 2023 that may be closed by this pull request
2 tasks
@pandres95 pandres95 self-assigned this Sep 29, 2023
Copy link
Member

@olanod olanod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took a while, I just couldn't convince myself that exposing methods to manage the assets through this pallet adds any major benefit to justify the extra code. Interacting directly with Assets pallet with the right origins should work for all our use-cases :)

If there's need to do transfers/holds/freezes of assets within this pallet we can still use the fungibles traits and derive the asset id from an established convention. e.g.

fn community_asset_id(id: &CommunityId, alt_asset: Option<AssetIndexOrNameOrSomeOtherIdentifier>) -> Option<AssetId> {
    let id = alt_asset
        .map(|alt| some_hashing((id, alt)))
        .unwrap_or_else(|| id.into());
    T::Assets::asset_exists(id).then_some(id)
}

@olanod
Copy link
Member

olanod commented Oct 3, 2023

I'm going to close for the mentioned reasons, if anything we reopen ;)

@olanod olanod closed this Oct 3, 2023
@pandres95 pandres95 deleted the 298-issue-community-tokens-and-mark-one-of-them-as-sufficient branch October 5, 2023 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Issue community tokens and mark one of them as sufficient.
2 participants