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

refactor(campaign)!: remove refundable parameter #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k-yang
Copy link
Contributor

@k-yang k-yang commented Dec 25, 2023

Highly opinionated change.

Campaigns have this refundable field which is only checked in the cancel function. In order to cancel a campaign, the admin has to first call the set_refundable function to toggle the field to true. Once the field is true, it can never be flipped back to false.

The value of set_refundable: false does not provide any additional security guarantees because the admin of the contract or owner of the campaign can always call the set_refundable function to toggle it to true. Once set to true, it can never be flipped back to false.

However, having to set the refundable field to true manually by executing a separate function call is annoying and a waste of gas/compute. It would be simpler to have campaigns that are always cancellable/refundable.

BREAKING CHANGE: Remove refundable parameter from campaigns.

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.

1 participant