Requiring Valid Arguments

Learn how to incorporate test cases required for a valid contract.

Update the test case

We’ve incorporated the split ratios into the contract. Now, we also need to ensure that there are no split ratios that are less than or equal to zero. We should iterate through every split ratio to see if they’re all greater than one. The test for this functionality looks like this:

Get hands-on with 1400+ tech skills courses.