Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 822 Bytes

00-constructor.md

File metadata and controls

46 lines (28 loc) · 822 Bytes

Constructor

1. Checkout the exercise

git checkout exercise-00

2. Exercise

Write your code inside contracts/MultiSigWallet.sol

Complete the constructor

constructor(address[] memory _owners, uint _numConfirmationsRequired) public {

}
  • Validate _owner is not empty

  • Validate _numConfirmationsRequired is greater than 0

  • Validate _numConfirmationsRequired is less than or equal to the number of _owners

  • Set the state variables owners from the input _owners.

    • Each owner should not be the zero address
    • Validate owners are unique using the isOwner mapping
  • Set the state variable numConfirmationsRequired from the input.

3. Test

Test your code

npm test

4. Solution

git checkout exercise-00-solution