Requiring Valid Arguments
Explore how to enforce valid argument checks in Solidity smart contracts. This lesson guides you through implementing functions that verify input values, ensuring all split ratios are greater than zero and calculating their total for secure fund management.
We'll cover the following...
We'll cover the following...
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: