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

randomize number of investments. #27

Open
3 of 5 tasks
Tracked by #20
a-t-0 opened this issue Jun 26, 2024 · 0 comments
Open
3 of 5 tasks
Tracked by #20

randomize number of investments. #27

a-t-0 opened this issue Jun 26, 2024 · 0 comments

Comments

@a-t-0
Copy link
Member

a-t-0 commented Jun 26, 2024

  • Add a random array of uint256 values as argument
  • Do not sort it, add another random number as argument for the random number of investments.
  • Limit the number of investments to the random number of investments.
  • Call the safelyInvest function for the number of investments. Do this by creating a helper function that calls that function for the number of random investments. Returns true/false based on whether all were valid, or a single investment failed. Optionally return the number of valid investments and the number of invalid investments. (Break of the loop early if a single investment fails). Determine exactly what to log.
  • Create two test versions, one with the investments all completed before the test, and another with (a random number) of investments being done, followed by the test, followed by a random nr of investments, followed by the test etc.
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

No branches or pull requests

1 participant