-
Couldn't load subscription status.
- Fork 713
Proptests for Clarity 4 functions #6606
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
base: develop
Are you sure you want to change the base?
Proptests for Clarity 4 functions #6606
Conversation
If the body hits a runtime error, that should be passed up before bothering to check the allowances (and the changes should be rolled back).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a great start for property testing restrict-asssets.
I think there's kind of two (possibly three?) things missing though.
First, I think you'll want a way to generate "allowable" snippets. As in, generate a stx-transfer and the necessary allowance to add to the snippet. Then, you could proptest that the execution is "okay" in those cases.
Second, I think we also want to be able to mix in multiple asset snippets. Basically, we'd want to test something like the property "execution is identical with and without restrict-assets when all asset snippets have assets included in restrict assets", but also "execution is disallowed when any asset snippet is included without a matching asset allowance"
Finally, I think we want to test with a different tx-sender than just the transient one as well.
|
@aaronb-stacks I've addressed those points and added some other tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
@aaronb-stacks I reverted that "optimization" related to our discussion about handling short returns. |
Add some framework for property testing the new functions.