Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Do not allow death on Crowdloan contribute + Introduce contribute_all #4233

Merged
merged 4 commits into from
Dec 13, 2021

Conversation

shawntabrizi
Copy link
Member

@shawntabrizi shawntabrizi commented Nov 7, 2021

Users have been complaining that the AllowDeath flag on crowdloan contributions is unexpected and has been eating dust out of accounts when users do not contribute the full amount into the crowdloan.

This PR changes the AllowDeath flag on contribute to KeepAlive, which forces the user to keep the existential deposit of funds in their account after the crowdloan contribution.

As an alternative option, users can now also call contribute_all, which automatically calculates the full balance available to transfer from the user, and contributes that to the crowdloan while allowing death of the account.

Ideally, before this PR goes in, or instead of accepting this PR, UIs which handle crowdloan contributions would do the same logic.

@shawntabrizi shawntabrizi added B7-runtimenoteworthy C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels Nov 7, 2021
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants