open-bounty/contracts/MultiSigStub.sol

120 lines
3.1 KiB
Solidity
Raw Normal View History

2017-11-09 16:33:01 +00:00
pragma solidity ^0.4.18;
2017-11-09 08:21:31 +00:00
import "./DelegatedCall.sol";
/**
* @title MultiSigStub
2017-11-09 16:33:01 +00:00
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
* Contract that delegates calls to a library to build a full MultiSigWallet that is cheap to create.
*/
2017-11-09 08:21:31 +00:00
contract MultiSigStub is DelegatedCall {
2017-08-16 09:00:24 +00:00
function MultiSigStub(address[] _owners, uint256 _required) {
2017-08-20 18:29:37 +00:00
//bytes4 sig = bytes4(sha3("constructor(address[],uint256)"));
bytes4 sig = 0x36756a23;
uint argarraysize = (2 + _owners.length);
uint argsize = (1 + argarraysize) * 32;
uint size = 4 + argsize;
2017-08-20 18:29:37 +00:00
bytes32 mData = _malloc(size);
assembly {
2017-08-20 18:29:37 +00:00
mstore(mData, sig)
codecopy(add(mData, 0x4), sub(codesize, argsize), argsize)
}
2017-08-20 18:29:37 +00:00
_delegatecall(mData, size);
}
2017-08-16 09:00:24 +00:00
2017-08-20 01:05:58 +00:00
function()
payable
delegated
{
}
/// @dev Returns the confirmation status of a transaction.
/// @param transactionId Transaction ID.
/// @return Confirmation status.
function isConfirmed(uint transactionId)
public
constant
delegated
returns (bool)
{
}
/*
* Web3 call functions
*/
/// @dev Returns number of confirmations of a transaction.
/// @param transactionId Transaction ID.
/// @return Number of confirmations.
function getConfirmationCount(uint transactionId)
public
constant
delegated
returns (uint)
{
}
/// @dev Returns total number of transactions after filters are applied.
/// @param pending Include pending transactions.
/// @param executed Include executed transactions.
/// @return Total number of transactions after filters are applied.
function getTransactionCount(bool pending, bool executed)
public
constant
delegated
returns (uint)
{
}
/// @dev Returns list of owners.
/// @return List of owner addresses.
function getOwners()
public
constant
2017-11-09 15:07:07 +00:00
delegated
2017-08-20 01:05:58 +00:00
returns (address[])
{
2017-11-09 15:07:07 +00:00
2017-08-20 01:05:58 +00:00
}
/// @dev Returns array with owner addresses, which confirmed transaction.
/// @param transactionId Transaction ID.
/// @return Returns array of owner addresses.
function getConfirmations(uint transactionId)
public
constant
2017-11-09 15:07:07 +00:00
delegated
2017-08-20 01:05:58 +00:00
returns (address[] _confirmations)
{
2017-11-09 15:07:07 +00:00
2017-08-20 01:05:58 +00:00
}
/// @dev Returns list of transaction IDs in defined range.
/// @param from Index start position of transaction array.
/// @param to Index end position of transaction array.
/// @param pending Include pending transactions.
/// @param executed Include executed transactions.
/// @return Returns array of transaction IDs.
2017-11-09 15:07:07 +00:00
function getTransactionIds(uint from, uint to, bool pending, bool executed)
2017-08-20 01:05:58 +00:00
public
constant
2017-11-09 15:07:07 +00:00
delegated
2017-08-20 01:05:58 +00:00
returns (uint[] _transactionIds)
{
2017-11-09 15:07:07 +00:00
2017-08-20 01:05:58 +00:00
}
2017-11-09 08:43:00 +00:00
function _getDelegatedContract()
internal
returns(address)
{
2017-11-09 15:12:13 +00:00
return 0xCaFFE810d0dF52E27DC580AD4a3C6283B0094291; //hardcoded multinetwork address
}
2017-08-20 01:05:58 +00:00
}