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

Support pallet-assets sufficients as account providers #5292

Conversation

acatangiu
Copy link
Contributor

Example scenario: on AssetHub we should be able to allow accounts to be created and to hold non-sufficient assets even without holding DOT ED, as long as they hold other sufficient assets (e.g. USDT or USDC).

This is not possible now though because pallet-assets "sufficient" assets do not act as account providers..

This PR is meant to explore options to make that possible.

The first commit showcases a very simple UT failing because of above.
The second commit comments on the relevant functions that currently allow an account to exist with only e.g. USDT, but do not allow same account to hold any other non-sufficient asset.

@acatangiu acatangiu requested a review from a team August 8, 2024 16:57
@acatangiu
Copy link
Contributor Author

acatangiu commented Aug 8, 2024

I looked into changing pallet-assets to add inc_providers() alongside inc_sufficients(), but then the current logic for killing accounts (defined as (asset, account) pair) doesn't really support failing to kill sufficient when consumers > 0 (aka not allow USDT withdraw if it is sole account "provider" for other existing (asset, account) pairs).

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 3/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6945441

@acatangiu
Copy link
Contributor Author

moving this to #5298

@acatangiu acatangiu closed this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants