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

Changed SplitPayment require to assert. #1188

Merged
merged 1 commit into from
Aug 12, 2018

Conversation

nventuro
Copy link
Contributor

@nventuro nventuro commented Aug 10, 2018

Now that we've come to a decision in #1120, we should move towards assert when the tested condition is not input validation but implementation correctness. In this case, if a payee is due a non-zero payment, the contract not having the required funds indicates a bug in the contract.

@nventuro nventuro added kind:improvement contracts Smart contract code. breaking change Changes that break backwards compatibility of the public API. labels Aug 10, 2018
@nventuro nventuro added this to the v2.0 milestone Aug 10, 2018
@nventuro nventuro requested a review from frangio August 10, 2018 16:39
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we should have asserts sprinkled around the library, but let's see how it progresses.

@nventuro nventuro merged commit 66c1968 into OpenZeppelin:master Aug 12, 2018
@nventuro nventuro deleted the split-payment-assert branch August 12, 2018 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Changes that break backwards compatibility of the public API. contracts Smart contract code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants