Skip to content

Conversation

brice-stacks
Copy link

Add some framework for property testing the new functions.

@obycode obycode requested a review from kantai October 20, 2025 14:19
Copy link

@aaronb-stacks aaronb-stacks left a 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.

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.

3 participants