Smart Contracts Continued

Learn to write test scripts according to the terms defined in the contract.

Improve the test script

After writing a contract that takes two addresses, we would like our eventual contract to work with two or more addresses and an equivalent amount of split ratios. The script should have the following conditions:

  • The contract deploys without errors when provided with the required amount of addresses and split ratios.

  • The contract fails when the amount of addresses and split ratios differ.

  • The contract fails to deploy when it is called with less than two addresses.

Get hands-on with 1400+ tech skills courses.