WIP: Add Scribble properties to the codebase #453
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey Everyone,
In this pull request, I've added several properties to the codebase.
This is still a work in progress; however, I've opened this pull request to discuss the properties as they are now.
In a follow up PR, I'll add a configuration for setting up a fuzzing campaign 👍 .
Testability
There are some parts of the codebase where the structure is not optimal for testing.
An example is the
_executeDonationSwaps
function in the RoundManager. This function implements both logic to loop over the swaps and to execute swaps. It is possible to consider extracting the logic for executing a single swap into a separate function, which would allow you to write properties & tests for this code in isolation.For example, take the following property, which ensures that you get the minimum amount out of the swap.