-
Notifications
You must be signed in to change notification settings - Fork 740
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
[Assets] Implement fungibles::freeze::Mutate
#3342
Comments
MutateFreeze
fungibles::freeze::Mutate
According to @gavofyork's response on OpenDev Call, the best course of action is not to implement In consequence, it's best proceeding with the first option:
Since there's a potential for a pallet extension, are there any public calls that might work on it? |
Thank you for raising this - I suspect it's something I would want to use. Sadly, I suspect my other issue with assets needs a separate solution. #3451 Edit to clarify - I think I need to be able to lock part for an asset balance as well as freezing all of an asset on an account (locked or otherwise). |
Is what you're proposing more akin to locking (part of a balance) rather than freezing (all of an asset)? In which case, should it be called Or I might be misinterpreting the intent of your issue. My use case would probably require multiple (overlapping and/or mutually exclusive) lock categories - like we have now for balances. Perhaps that's not what you're aiming to address? |
It is, makes sense to call it an |
Thanks Pablo I suspect I'll end up with an extension pallet to do the Multi-asset Locking, which will interact with yours - but yours is probably more likely to be widely used so the interfacing and testing / maintaining should probably by my pallet's responsibility. I suspect Parity isn't going to jump at taking on maintaining it for me. There might be too much cross-interaction for my pallet to be just an extension anyway, so I might end up having to fork For example, I need account-frozen assets which are frozen by my multi-asset freezer not to be able to call the unlock function on those assets. (That possibly applies to assets frozen from the regular pallet_assets too, so you might need to handle that bit, at least). Hopefully that makes sense... |
Any update on this @pandres95? It's needed for #3149, happy to provide any help you may need getting it moving. |
Also want to mention this PR paritytech/substrate#8476 here. The solution for this issue should probably follow it closely. |
Closes #3342 cc/ @liamaharon TODO: - [x] Improve docs. - [x] Define public interface (See #3342). In case we define public calls to the pallet implementation: - Implement public calls. - Benchmarks. polkadot address: 12gMhxHw8QjEwLQvnqsmMVY1z5gFa54vND74aMUbhhwN6mJR --------- Co-authored-by: command-bot <> Co-authored-by: Liam Aharon <[email protected]>
Closes paritytech#3342 cc/ @liamaharon TODO: - [x] Improve docs. - [x] Define public interface (See paritytech#3342). In case we define public calls to the pallet implementation: - Implement public calls. - Benchmarks. polkadot address: 12gMhxHw8QjEwLQvnqsmMVY1z5gFa54vND74aMUbhhwN6mJR --------- Co-authored-by: command-bot <> Co-authored-by: Liam Aharon <[email protected]>
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
Locks are currently implemented on
Balances
due to the needs for existing use cases (e.g.pallet-staking
,pallet-conviction-voting
, etc.).However, over time, similar or novel use cases have been arising where locks are needed to be implemented on
Assets
One example of that is Multi-governance on
pallet-communities
, where communities have an OpenGov-like system enabled, for whichAssetBalance
is a voting option. In this case, the balance of the asset used to vote from a user needs to be locked to prevent an account from voting using such balance, and then sending it over to another member, thus altering the poll results.Request
Implement
fungibles::MutateFreeze
forpallet-assets
.Solution
Due to the current design of
pallet-assets
, there are two options (so, I open this issue to discuss the best course of action):pallet-assets-freezer
) that implements bothFrozenBalance
(the trait described inT::Freezer
withinpallet-assets
) andfungibles::freeze::Mutate
.T::Freezer
with a proper implementation offungibles::freeze::Mutate
withinpallet-assets
.Are you willing to help with this request?
Yes! (Of, course, assign it to me).
Tasks
The text was updated successfully, but these errors were encountered: