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
Contributor

@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
@shawntabrizi shawntabrizi added this to In progress in Runtime via automation Nov 7, 2021
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Nov 7, 2021
Runtime automation moved this from In progress to Needs Audit Nov 16, 2021
@gavofyork gavofyork merged commit c82f4a7 into master Dec 13, 2021
Runtime automation moved this from Needs Audit to Done Dec 13, 2021
@gavofyork gavofyork deleted the shawntabrizi-contribute-all branch December 13, 2021 10:18
@shawntabrizi shawntabrizi moved this from Done to Archive in Runtime Feb 3, 2022
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
Runtime
Archive
Development

Successfully merging this pull request may close these issues.

None yet

3 participants