these are the parameters, included in function sendMultiSig() from contract multiSigWallet{}.
how can I input expireTime and signature? and who will be the toAddress? A msg.sender? a signer? or a non signer?
function sendMultiSig(
address toAddress,
uint value,
uint expireTime,
uint sequenceId,
bytes signature
)
onlysigner
payable
{
// Verify the other signer
var operationHash = sha3("ETHER", toAddress, value, expireTime, sequenceId);
var otherSigner = verifyMultiSig(toAddress, operationHash, signature, expireTime, sequenceId);
}
function verifyMultiSig(
address toAddress,
bytes32 operationHash,
bytes signature,
uint expireTime,
uint sequenceId
)
private
returns (address)
{
var otherSigner = recoverAddressFromSignature(operationHash, signature);
// Verify if we are in safe mode. In safe mode, the wallet can only send to signers
if (safeMode && !isSigner(toAddress)) {
// We are in safe mode and the toAddress is not a signer. Disallow!
revert();
}
// Verify that the transaction has not expired
if (expireTime < block.timestamp) {
// Transaction expired
revert();
}
// Try to insert the sequence ID. Will throw if the sequence id was invalid
tryInsertSequenceId(sequenceId);
if (!isSigner(otherSigner)) {
// Other signer not on this wallet or operation does not match arguments
revert();
}
if (otherSigner == msg.sender) {
// Cannot approve own transaction
revert();
}
return otherSigner;
}
function recoverAddressFromSignature(
bytes32 operationHash,
bytes signature
)
private
returns (address)
{
if (signature.length != 65) {
revert();
}
// We need to unpack the signature, which is given as an array of 65 bytes (from eth.sign)
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(signature, 32))
s := mload(add(signature, 64))
v := and(mload(add(signature, 65)), 255)
}
if (v < 27) {
v += 27; // Ethereum versions are 27 or 28 as opposed to 0 or 1 which is submitted by some signing libs
}
return ecrecover(operationHash, v, r, s);
}


expireTimeshall be the unix time stamp (see: https://www.unixtimestamp.com/) – QYuQianchen Jan 25 '19 at 11:55