git checkout exercise-02
Write your code inside contracts/MultiSigWallet.sol
Complete the submitTransaction
function
function submitTransaction(address _to, uint _value, bytes memory _data)
public
onlyOwner
{
}
onlyOwner
modifier defined above.msg.sender
is an ownersubmitTransaction
, create a new Transaction
struct from the inputs and append it to the transactions
arrayexecuted
should be initialized to false
numConfirmations
should be initialized to 0SubmitTransaction
event (see below)txIndex
should be the index of the newly created transactionevent SubmitTransaction(
address indexed owner,
uint indexed txIndex,
address indexed to,
uint value,
bytes data
);
Test your code
npm test