git checkout exercise-03
Write your code inside contracts/MultiSigWallet.sol
Complete the confirmTransaction
function
function confirmTransaction(uint _txIndex)
public
onlyOwner
txExists(_txIndex)
notExecuted(_txIndex)
notConfirmed(_txIndex)
{
}
- Complete the modifier
txExists
- it should require that the transaction at
txIndex
exists
- it should require that the transaction at
- Complete the modifier
notExecuted
- it should require that the transaction at
txIndex
is not yet executed
- it should require that the transaction at
- Complete the modifier
notConfirmed
- it should require that the transaction at
txIndex
is not yet confirmed bymsg.sender
- it should require that the transaction at
- Confirm the transaction
- update the
isConfirmed
totrue
formsg.sender
- increment
numConfirmation
by 1 - emit
ConfirmTransaction
event for the transaction being confirmed
- update the
event ConfirmTransaction(address indexed owner, uint indexed txIndex);
Test your code
npm test
git checkout exercise-03-solution