Contract Overview
Balance: 21,704.325572809991471999 Ether
Ether Value: $2,611,898.54 (@ $120.34/ETH)
Transactions: 103 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x0019787619c512950e186025c932613872613b04at txn 0x6c7f8d9188fb871c4f921613bea342bbe5870a8880ae4242c8f330e84a9ec1c7
Token Balance:
 Latest 25 transactions from a total of 103 transactions

TxHash Age From To Value [TxFee]
0xfdf4e20dd29adb31ffe086e46056aba6e6048d366a2812b3d35eb6fa5963b91a265 days 23 hrs ago0x70341461e043f4bf14c70018ff25efb0a7dfeb64  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000049618
0xe21b167708bdc0c368b690f4ea05584825dfca881d22b922904269db6402cff7265 days 23 hrs ago0x70341461e043f4bf14c70018ff25efb0a7dfeb64  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000045096
0xcde03601216035a6d9c0930e33f02ec752765ecb83f21a5e230acda36955e8b7401 days 1 hr ago0x790a38b110b3c9b80f78c9420401903a0de21e7e  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000250173
0xd21855f720e795565da98e2b1595be83b9330309776e921865b6f848a4fe46c2436 days 6 hrs ago0x0d7f11536f61ff477bcb4f440d677296de60e7d3  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000359385
0xb62716faba0bc9ea910f8c2bd67e13f70d2511414953087e47880ee3f432ccc9436 days 7 hrs ago0x0d7f11536f61ff477bcb4f440d677296de60e7d3  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00030117
0xde02de482e690fef58d304cbcccb6ba3c8b2e00a65730c54795a04adf7908bec436 days 7 hrs ago0x0d7f11536f61ff477bcb4f440d677296de60e7d3  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000203777
0x8e792dc6bff03d984b3ae4b5219304335945eed2e6e2ca9f6ebb149bbbacbe9f436 days 7 hrs ago0x0d7f11536f61ff477bcb4f440d677296de60e7d3  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00039774
0x22c280ca790ba79c1a11983f4d96138336abf91d8bf496ec4c4314aba4ab8024436 days 23 hrs ago0xf86cba6a1cc557c3785c0e5033eca8202dd4f99f  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000572079
0x81d539411dc6cb2187b218de38ebc4a96f0bd5c2be60ac6c005cfd1f2f440aa5437 days 8 hrs ago0xf86cba6a1cc557c3785c0e5033eca8202dd4f99f  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.0005712536
0x0243d147bac9b9c1b898823faed1822149e3069e0181d3ccbf7fe71734ce8be5437 days 18 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00009898
0x1905d88ac5adaa9ff5618251d115b1cd06d95627864d76ae9f8f755f13e26602437 days 18 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000099236
0x01b30b90dab93602f4d224fe817b2a090589d9afda3888f3b6a795ff13e68a9e437 days 18 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000124045
0x03ea5cf96b21005432dd6f56f9d5f9b6a64cae600663872c8d8c791929600b93438 days 6 hrs ago0xae7168deb525862f4fee37d987a971b385b96952  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00025007
0xc23ca7159d0e247ea22cd01c6779193a88825e34060c9cca33623ce10a654ba9438 days 17 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000057789
0x30d08a936ea4d043215a0d660eeef741d010ba09fb33096e0327cd309d4cd944438 days 17 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000687016
0x1f442e56a83b339ce8a5b254f2b96e464f692f3549b4e8c871a5935c0bcf97e1441 days 15 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00141499902
0xe24053cf5d908aebd43ba76c699f525c4840dcfa4ac3ae65ae370b43251fe2be441 days 16 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.003928957891
0xf8c905ed005a0b9e72d6a95133394da27d991ff62f5364d2c54b0fc2f2fe926e441 days 16 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.006996948436
0x489f016b8c8708208b0b09577335b23f0a5fa1faef5e3867564e4955da7d1f90441 days 16 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00628183101
0xb315a19d25e26f5c66be3be6a7a222bc4cd2b2b1797f5c6e4f587f9400d8dcf4441 days 16 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.004998107813
0x201f641c94b97f3997217797afaee1cd3ca304a4a6932e4c2f22bd61a6628345441 days 16 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00150319
0x553dc6fc6a1dfcb10f5052c6d8050461b191b444836d1d38f7d3d86bbf2ef269441 days 16 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00150319
0x3426918c8a4b22cadbc581d7262701059890c9c495c5a85601a55c2541d8f388441 days 17 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.00123718
0x47a18c998e578821ee41b2afefb5ad6b09899e9f65ca154dc92929b05ceba47c444 days 21 hrs ago0x0019787619c512950e186025c932613872613b04  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000312908
0x0487c776687f33c4b3c0175a0fbc1eb15ce5852f5ce9371f3fb51148849b9f86446 days 17 hrs ago0x002084241ae8a63b7caa07ef1b9a17d5913484ec  IN   0x43ab622752d766d694c005acfb78b1fc60f35b690 Ether0.000154104
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0xc23ca7159d0e247ea22cd01c6779193a88825e34060c9cca33623ce10a654ba94499462438 days 17 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x15b3f20ce6a69774c528c129a2ee24c398b9d36f1,704 Ether
0x47a18c998e578821ee41b2afefb5ad6b09899e9f65ca154dc92929b05ceba47c4461083444 days 21 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x15b3f20ce6a69774c528c129a2ee24c398b9d36f0.44 Ether
0x0487c776687f33c4b3c0175a0fbc1eb15ce5852f5ce9371f3fb51148849b9f864449887446 days 17 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690xb96fbc8c9a25a62718a16f1cd323ab20c502fde48,680 Ether
0x38b07f3604f871427b12ec221a8fc56de5d2f6b312d800279d17fbd0033627374441152448 days 2 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690xb96fbc8c9a25a62718a16f1cd323ab20c502fde40.55555556 Ether
0x9132d2988be44b5aa954f0b2f0734fd31652d83bfc93170d19b56fe7e296f55a4379545458 days 17 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690xec88cdec26460745671ecbc362298b9e643ef3dc16.82 Ether
0x05cfc10167a282469ad2708ca0ea6405d80806fc808d836a4cc800fb733858724374114458 days 21 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x7277c239e5299b5523a51c6ea5f529b6fc5ffa1a2,958.57988166 Ether
0x98d24035f270cce6e2242f8c8f04421ca8e9720a74357076dbc040c2549c109d4361143462 days 18 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x6c527f0b6a6417b8d76872caa58bdecbea591e9f10 Ether
0x0fba5db4fa91727c9fb31728f6a2a1d3fcf1f1a31b8c83868c8ca4661ed6c5864344528468 days 12 hrs ago0x4d55f76ce2dbbae7b48661bef9bd144ce0c9091b0x43ab622752d766d694c005acfb78b1fc60f35b695,397.999999870888722939 Ether
0xd97964002dc7875b8dfae26575dff5b65d1364dd24c2bec911f4944ab5c6e2214337299471 days 27 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690x00290347b0ba1a03919074b5e7d932ab27b6d2511 Ether
0x640c40d9a639c3052ec85b397efebed8e14b80ccfc805939547d2255ba6dc2d74337297471 days 28 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690xd0e2cdef8398457c55c3953e781f0a963e18cf671 Ether
0x0cb62e0e08bb1db10aed8bad0ddfba502670be7f1c8d7e185770482f688706d34337293471 days 29 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690xf08e08dd28ae35aa71ac0570f9362b7bb3b7560a1 Ether
0x60b891c7e6d70a943736ebb0998d089757ee59a1cac0fafe9bd36b770b777ce94337290471 days 31 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690x462682549f18a8e54e63af5d8181e401ef31aff91 Ether
0xad6a72ac9941206ff4dead7072fccff386501f0355799b34c06bca83366feaf84337287471 days 32 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690xf418e477948300a905dee9b056dfc42cba30e8121 Ether
0x1c1abcaa85c962c4d0e6e2e1e77a2804b3894d00a5da4df5bd3445eaa58b03d74337282471 days 33 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690xa1437f0f5d57d83d560f817039a0c591c23c347b1 Ether
0x79b2441d217d497bb162817a19dec808081b011a9916284d2a71046924e792c14337273471 days 38 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690x375d7f1e61eb292797fda6ca6ea376f0275a595310 Ether
0x6969184df4664e6c886520b941af2c1f7baeeb802e10a02a80bf46833f5fcc634337265471 days 42 mins ago0x43ab622752d766d694c005acfb78b1fc60f35b690xc1176b4505edd203118d23da9b6a4227408b471910 Ether
0xac3be2b76ad98ee16e9a428fe9f010ae11b150908739830509c47c5f2441f98a4332209472 days 18 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x3cb761f28dd0791c91a30e81fe0279a8eb5ebc7910 Ether
0xa473bc1452f2c2e71a4a1396e275a1a72f19afca5267e2c94e0bc83fafbcd2504332206472 days 18 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690xd239898233f2a702efa7bb29cecce3327d9a9a4010 Ether
0x92de94466f6110ed25f27e9f5054b1590054d432449253074a86b437fd837ea34332206472 days 18 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x0c0400aa6eed237dd37c80d733a5ee00df93f59d5 Ether
0x9221da22d0d8a5805f2044a0649f7136631560c08eb1cca645bed87d773720804332192472 days 19 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x9c6d96fd1145d2574ab7186772c8edd2f60c41d15 Ether
0xf76da395384c9712ff80b6004afa6b31e6862a55b539434bfe1a709f3e8638404332189472 days 19 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x96b19acc673986c7df977fcfabd3a33b28c2a2f35 Ether
0x83132376b6f908b2a0f5d67fb8eb74db9e920bf3b26f9e476486e050af0efaf34332177472 days 19 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x10fc87c281f704f0b3d589ecb8acfd125636d83d7 Ether
0xa7925f309c0d46c693f899ca917b3b995e6d4da2c3dee09130c50015e0c1b4324332147472 days 19 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x39d97e49b30915f7f0c38ff6c0494898ed60d2a310 Ether
0xd74506f1b08ee68c302879a09669cd71d208f004087926c003dbe378bd544be44332144472 days 19 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x8a09ac6c94ef8f109602a83cb9ec48208b60158b7 Ether
0x53d7855186d84e4462be0f1510dbf1f275cd85ea68313d980767ceeb3ed428224332127472 days 19 hrs ago0x43ab622752d766d694c005acfb78b1fc60f35b690x0dfd608483b94fccb0a84e827ef8e130ad4bf58e10 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity), ConstantOptimizerSubtraction (low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0xC16ba0Bf101682e0E7fcBD0B7BC160A8E2E59471(Excluding Constructor Arguments if any)
Contract Name: Wallet
Compiler Text: v0.4.10+commit.f0d539ae
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

//sol Wallet
// Multi-sig, daily-limited account proxy/wallet.
// @authors:
// Gav Wood <[email protected]>
// inheritable "property" contract that enables methods to be protected by requiring the acquiescence of either a
// single, or, crucially, each of a number of, designated owners.
// usage:
// use modifiers onlyowner (just own owned) or onlymanyowners(hash), whereby the same hash must be provided by
// some number (specified in constructor) of the set of owners (specified in the constructor, modifiable) before the
// interior is executed.

pragma solidity ^0.4.9;

contract WalletEvents {
  // EVENTS

  // this contract only has six types of events: it can accept a confirmation, in which case
  // we record owner and operation (hash) alongside it.
  event Confirmation(address owner, bytes32 operation);
  event Revoke(address owner, bytes32 operation);

  // some others are in the case of an owner changing.
  event OwnerChanged(address oldOwner, address newOwner);
  event OwnerAdded(address newOwner);
  event OwnerRemoved(address oldOwner);

  // the last one is emitted if the required signatures change
  event RequirementChanged(uint newRequirement);

  // Funds has arrived into the wallet (record how much).
  event Deposit(address _from, uint value);
  // Single transaction going out of the wallet (record who signed for it, how much, and to whom it's going).
  event SingleTransact(address owner, uint value, address to, bytes data, address created);
  // Multi-sig transaction going out of the wallet (record who signed for it last, the operation hash, how much, and to whom it's going).
  event MultiTransact(address owner, bytes32 operation, uint value, address to, bytes data, address created);
  // Confirmation still needed for a transaction.
  event ConfirmationNeeded(bytes32 operation, address initiator, uint value, address to, bytes data);
}

contract WalletAbi {
  // Revokes a prior confirmation of the given operation
  function revoke(bytes32 _operation) external;

  // Replaces an owner `_from` with another `_to`.
  function changeOwner(address _from, address _to) external;

  function addOwner(address _owner) external;

  function removeOwner(address _owner) external;

  function changeRequirement(uint _newRequired) external;

  function isOwner(address _addr) constant returns (bool);

  function hasConfirmed(bytes32 _operation, address _owner) external constant returns (bool);

  // (re)sets the daily limit. needs many of the owners to confirm. doesn't alter the amount already spent today.
  function setDailyLimit(uint _newLimit) external;

  function execute(address _to, uint _value, bytes _data) external returns (bytes32 o_hash);
  function confirm(bytes32 _h) returns (bool o_success);
}

contract WalletLibrary is WalletEvents {
  // TYPES

  // struct for the status of a pending operation.
  struct PendingState {
    uint yetNeeded;
    uint ownersDone;
    uint index;
  }

  // Transaction structure to remember details of transaction lest it need be saved for a later call.
  struct Transaction {
    address to;
    uint value;
    bytes data;
  }

  // MODIFIERS

  // simple single-sig function modifier.
  modifier onlyowner {
    if (isOwner(msg.sender))
      _;
  }
  // multi-sig function modifier: the operation must have an intrinsic hash in order
  // that later attempts can be realised as the same underlying operation and
  // thus count as confirmations.
  modifier onlymanyowners(bytes32 _operation) {
    if (confirmAndCheck(_operation))
      _;
  }

  // METHODS

  // gets called when no other function matches
  function() payable {
    // just being sent some cash?
    if (msg.value > 0)
      Deposit(msg.sender, msg.value);
  }

  // constructor is given number of sigs required to do protected "onlymanyowners" transactions
  // as well as the selection of addresses capable of confirming them.
  function initMultiowned(address[] _owners, uint _required) only_uninitialized {
    m_numOwners = _owners.length + 1;
    m_owners[1] = uint(msg.sender);
    m_ownerIndex[uint(msg.sender)] = 1;
    for (uint i = 0; i < _owners.length; ++i)
    {
      m_owners[2 + i] = uint(_owners[i]);
      m_ownerIndex[uint(_owners[i])] = 2 + i;
    }
    m_required = _required;
  }

  // Revokes a prior confirmation of the given operation
  function revoke(bytes32 _operation) external {
    uint ownerIndex = m_ownerIndex[uint(msg.sender)];
    // make sure they're an owner
    if (ownerIndex == 0) return;
    uint ownerIndexBit = 2**ownerIndex;
    var pending = m_pending[_operation];
    if (pending.ownersDone & ownerIndexBit > 0) {
      pending.yetNeeded++;
      pending.ownersDone -= ownerIndexBit;
      Revoke(msg.sender, _operation);
    }
  }

  // Replaces an owner `_from` with another `_to`.
  function changeOwner(address _from, address _to) onlymanyowners(sha3(msg.data)) external {
    if (isOwner(_to)) return;
    uint ownerIndex = m_ownerIndex[uint(_from)];
    if (ownerIndex == 0) return;

    clearPending();
    m_owners[ownerIndex] = uint(_to);
    m_ownerIndex[uint(_from)] = 0;
    m_ownerIndex[uint(_to)] = ownerIndex;
    OwnerChanged(_from, _to);
  }

  function addOwner(address _owner) onlymanyowners(sha3(msg.data)) external {
    if (isOwner(_owner)) return;

    clearPending();
    if (m_numOwners >= c_maxOwners)
      reorganizeOwners();
    if (m_numOwners >= c_maxOwners)
      return;
    m_numOwners++;
    m_owners[m_numOwners] = uint(_owner);
    m_ownerIndex[uint(_owner)] = m_numOwners;
    OwnerAdded(_owner);
  }

  function removeOwner(address _owner) onlymanyowners(sha3(msg.data)) external {
    uint ownerIndex = m_ownerIndex[uint(_owner)];
    if (ownerIndex == 0) return;
    if (m_required > m_numOwners - 1) return;

    m_owners[ownerIndex] = 0;
    m_ownerIndex[uint(_owner)] = 0;
    clearPending();
    reorganizeOwners(); //make sure m_numOwner is equal to the number of owners and always points to the optimal free slot
    OwnerRemoved(_owner);
  }

  function changeRequirement(uint _newRequired) onlymanyowners(sha3(msg.data)) external {
    if (_newRequired > m_numOwners) return;
    m_required = _newRequired;
    clearPending();
    RequirementChanged(_newRequired);
  }

  // Gets an owner by 0-indexed position (using numOwners as the count)
  function getOwner(uint ownerIndex) external constant returns (address) {
    return address(m_owners[ownerIndex + 1]);
  }

  function isOwner(address _addr) constant returns (bool) {
    return m_ownerIndex[uint(_addr)] > 0;
  }

  function hasConfirmed(bytes32 _operation, address _owner) external constant returns (bool) {
    var pending = m_pending[_operation];
    uint ownerIndex = m_ownerIndex[uint(_owner)];

    // make sure they're an owner
    if (ownerIndex == 0) return false;

    // determine the bit to set for this owner.
    uint ownerIndexBit = 2**ownerIndex;
    return !(pending.ownersDone & ownerIndexBit == 0);
  }

  // constructor - stores initial daily limit and records the present day's index.
  function initDaylimit(uint _limit) only_uninitialized {
    m_dailyLimit = _limit;
    m_lastDay = today();
  }
  // (re)sets the daily limit. needs many of the owners to confirm. doesn't alter the amount already spent today.
  function setDailyLimit(uint _newLimit) onlymanyowners(sha3(msg.data)) external {
    m_dailyLimit = _newLimit;
  }
  // resets the amount already spent today. needs many of the owners to confirm.
  function resetSpentToday() onlymanyowners(sha3(msg.data)) external {
    m_spentToday = 0;
  }

  // throw unless the contract is not yet initialized.
  modifier only_uninitialized { if (m_numOwners > 0) throw; _; }

  // constructor - just pass on the owner array to the multiowned and
  // the limit to daylimit
  function initWallet(address[] _owners, uint _required, uint _daylimit) only_uninitialized {
    initDaylimit(_daylimit);
    initMultiowned(_owners, _required);
  }

  // kills the contract sending everything to `_to`.
  function kill(address _to) onlymanyowners(sha3(msg.data)) external {
    suicide(_to);
  }

  // Outside-visible transact entry point. Executes transaction immediately if below daily spend limit.
  // If not, goes into multisig process. We provide a hash on return to allow the sender to provide
  // shortcuts for the other confirmations (allowing them to avoid replicating the _to, _value
  // and _data arguments). They still get the option of using them if they want, anyways.
  function execute(address _to, uint _value, bytes _data) external onlyowner returns (bytes32 o_hash) {
    // first, take the opportunity to check that we're under the daily limit.
    if ((_data.length == 0 && underLimit(_value)) || m_required == 1) {
      // yes - just execute the call.
      address created;
      if (_to == 0) {
        created = create(_value, _data);
      } else {
        if (!_to.call.value(_value)(_data))
          throw;
      }
      SingleTransact(msg.sender, _value, _to, _data, created);
    } else {
      // determine our operation hash.
      o_hash = sha3(msg.data, block.number);
      // store if it's new
      if (m_txs[o_hash].to == 0 && m_txs[o_hash].value == 0 && m_txs[o_hash].data.length == 0) {
        m_txs[o_hash].to = _to;
        m_txs[o_hash].value = _value;
        m_txs[o_hash].data = _data;
      }
      if (!confirm(o_hash)) {
        ConfirmationNeeded(o_hash, msg.sender, _value, _to, _data);
      }
    }
  }

  function create(uint _value, bytes _code) internal returns (address o_addr) {
    assembly {
      o_addr := create(_value, add(_code, 0x20), mload(_code))
      jumpi(invalidJumpLabel, iszero(extcodesize(o_addr)))
    }
  }

  // confirm a transaction through just the hash. we use the previous transactions map, m_txs, in order
  // to determine the body of the transaction from the hash provided.
  function confirm(bytes32 _h) onlymanyowners(_h) returns (bool o_success) {
    if (m_txs[_h].to != 0 || m_txs[_h].value != 0 || m_txs[_h].data.length != 0) {
      address created;
      if (m_txs[_h].to == 0) {
        created = create(m_txs[_h].value, m_txs[_h].data);
      } else {
        if (!m_txs[_h].to.call.value(m_txs[_h].value)(m_txs[_h].data))
          throw;
      }

      MultiTransact(msg.sender, _h, m_txs[_h].value, m_txs[_h].to, m_txs[_h].data, created);
      delete m_txs[_h];
      return true;
    }
  }

  // INTERNAL METHODS

  function confirmAndCheck(bytes32 _operation) internal returns (bool) {
    // determine what index the present sender is:
    uint ownerIndex = m_ownerIndex[uint(msg.sender)];
    // make sure they're an owner
    if (ownerIndex == 0) return;

    var pending = m_pending[_operation];
    // if we're not yet working on this operation, switch over and reset the confirmation status.
    if (pending.yetNeeded == 0) {
      // reset count of confirmations needed.
      pending.yetNeeded = m_required;
      // reset which owners have confirmed (none) - set our bitmap to 0.
      pending.ownersDone = 0;
      pending.index = m_pendingIndex.length++;
      m_pendingIndex[pending.index] = _operation;
    }
    // determine the bit to set for this owner.
    uint ownerIndexBit = 2**ownerIndex;
    // make sure we (the message sender) haven't confirmed this operation previously.
    if (pending.ownersDone & ownerIndexBit == 0) {
      Confirmation(msg.sender, _operation);
      // ok - check if count is enough to go ahead.
      if (pending.yetNeeded <= 1) {
        // enough confirmations: reset and run interior.
        delete m_pendingIndex[m_pending[_operation].index];
        delete m_pending[_operation];
        return true;
      }
      else
      {
        // not enough: record that this owner in particular confirmed.
        pending.yetNeeded--;
        pending.ownersDone |= ownerIndexBit;
      }
    }
  }

  function reorganizeOwners() private {
    uint free = 1;
    while (free < m_numOwners)
    {
      while (free < m_numOwners && m_owners[free] != 0) free++;
      while (m_numOwners > 1 && m_owners[m_numOwners] == 0) m_numOwners--;
      if (free < m_numOwners && m_owners[m_numOwners] != 0 && m_owners[free] == 0)
      {
        m_owners[free] = m_owners[m_numOwners];
        m_ownerIndex[m_owners[free]] = free;
        m_owners[m_numOwners] = 0;
      }
    }
  }

  // checks to see if there is at least `_value` left from the daily limit today. if there is, subtracts it and
  // returns true. otherwise just returns false.
  function underLimit(uint _value) internal onlyowner returns (bool) {
    // reset the spend limit if we're on a different day to last time.
    if (today() > m_lastDay) {
      m_spentToday = 0;
      m_lastDay = today();
    }
    // check to see if there's enough left - if so, subtract and return true.
    // overflow protection                    // dailyLimit check
    if (m_spentToday + _value >= m_spentToday && m_spentToday + _value <= m_dailyLimit) {
      m_spentToday += _value;
      return true;
    }
    return false;
  }

  // determines today's index.
  function today() private constant returns (uint) { return now / 1 days; }

  function clearPending() internal {
    uint length = m_pendingIndex.length;

    for (uint i = 0; i < length; ++i) {
      delete m_txs[m_pendingIndex[i]];

      if (m_pendingIndex[i] != 0)
        delete m_pending[m_pendingIndex[i]];
    }

    delete m_pendingIndex;
  }

  // FIELDS
  address constant _walletLibrary = 0xcafecafecafecafecafecafecafecafecafecafe;

  // the number of owners that must confirm the same operation before it is run.
  uint public m_required;
  // pointer used to find a free slot in m_owners
  uint public m_numOwners;

  uint public m_dailyLimit;
  uint public m_spentToday;
  uint public m_lastDay;

  // list of owners
  uint[256] m_owners;

  uint constant c_maxOwners = 250;
  // index on the list of owners to allow reverse lookup
  mapping(uint => uint) m_ownerIndex;
  // the ongoing operations.
  mapping(bytes32 => PendingState) m_pending;
  bytes32[] m_pendingIndex;

  // pending transactions we have at present.
  mapping (bytes32 => Transaction) m_txs;
}

contract Wallet is WalletEvents {

  // WALLET CONSTRUCTOR
  //   calls the `initWallet` method of the Library in this context
  function Wallet(address[] _owners, uint _required, uint _daylimit) {
    // Signature of the Wallet Library's init function
    bytes4 sig = bytes4(sha3("initWallet(address[],uint256,uint256)"));
    address target = _walletLibrary;

    // Compute the size of the call data : arrays has 2
    // 32bytes for offset and length, plus 32bytes per element ;
    // plus 2 32bytes for each uint
    uint argarraysize = (2 + _owners.length);
    uint argsize = (2 + argarraysize) * 32;

    assembly {
      // Add the signature first to memory
      mstore(0x0, sig)
      // Add the call data, which is at the end of the
      // code
      codecopy(0x4,  sub(codesize, argsize), argsize)
      // Delegate call to the library
      delegatecall(sub(gas, 10000), target, 0x0, add(argsize, 0x4), 0x0, 0x0)
    }
  }

  // METHODS

  // gets called when no other function matches
  function() payable {
    // just being sent some cash?
    if (msg.value > 0)
      Deposit(msg.sender, msg.value);
    else if (msg.data.length > 0)
      _walletLibrary.delegatecall(msg.data);
  }

  // Gets an owner by 0-indexed position (using numOwners as the count)
  function getOwner(uint ownerIndex) constant returns (address) {
    return address(m_owners[ownerIndex + 1]);
  }

  // As return statement unavailable in fallback, explicit the method here

  function hasConfirmed(bytes32 _operation, address _owner) external constant returns (bool) {
    return _walletLibrary.delegatecall(msg.data);
  }

  function isOwner(address _addr) constant returns (bool) {
    return _walletLibrary.delegatecall(msg.data);
  }

  // FIELDS
  address constant _walletLibrary = 0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4;

  // the number of owners that must confirm the same operation before it is run.
  uint public m_required;
  // pointer used to find a free slot in m_owners
  uint public m_numOwners;

  uint public m_dailyLimit;
  uint public m_spentToday;
  uint public m_lastDay;

  // list of owners
  uint[256] m_owners;
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_numOwners","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_lastDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_spentToday","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_required","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_operation","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"hasConfirmed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"ownerIndex","type":"uint256"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"m_dailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_owners","type":"address[]"},{"name":"_required","type":"uint256"},{"name":"_daylimit","type":"uint256"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Confirmation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Revoke","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"}],"name":"OwnerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newRequirement","type":"uint256"}],"name":"RequirementChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"created","type":"address"}],"name":"SingleTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"created","type":"address"}],"name":"MultiTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"initiator","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"ConfirmationNeeded","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b60405161048538038061048583398101604090815281516020830151918301519201915b604080517f696e697457616c6c657428616464726573735b5d2c75696e743235362c75696e81527f7432353629000000000000000000000000000000000000000000000000000000602080830191909152915190819003602501902084516000829052909173863df6bfa4469f3ead0be8f9f2aae51c91a907b491600281019160049182010290819038829003903960006000600483016000866127105a03f45b505050505050505b61039d806100e86000396000f300606060405236156100725763ffffffff60e060020a6000350416632f54bf6e811461012d5780634123cb6b1461015d578063523750931461017f578063659010e7146101a1578063746c9171146101c3578063c2cf7326146101e5578063c41a360a14610218578063f1736d8614610247575b61012b5b60003411156100c75760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a1610127565b60003611156101275773863df6bfa4469f3ead0be8f9f2aae51c91a907b4600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4151561012457fe5b50505b5b5b565b005b341561013557fe5b610149600160a060020a0360043516610269565b604080519115158252519081900360200190f35b341561016557fe5b61016d6102cd565b60408051918252519081900360200190f35b341561018757fe5b61016d6102d3565b60408051918252519081900360200190f35b34156101a957fe5b61016d6102d9565b60408051918252519081900360200190f35b34156101cb57fe5b61016d6102df565b60408051918252519081900360200190f35b34156101ed57fe5b610149600435600160a060020a03602435166102e5565b604080519115158252519081900360200190f35b341561022057fe5b61022b60043561034a565b60408051600160a060020a039092168252519081900360200190f35b341561024f57fe5b61016d61036b565b60408051918252519081900360200190f35b600073863df6bfa4469f3ead0be8f9f2aae51c91a907b4600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f415156102bf57fe5b50506040515190505b919050565b60015481565b60045481565b60035481565b60005481565b600073863df6bfa4469f3ead0be8f9f2aae51c91a907b4600160a060020a0316600036600060405160200152604051808383808284378201915050925050506020604051808303818560325a03f4151561033b57fe5b50506040515190505b92915050565b6000600560018301610100811061035d57fe5b0160005b505490505b919050565b600254815600a165627a7a72305820c20a8475c42598c198f6629bada37e1b234da85ac2c0cbac3d96089030b180400029000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000000000000000000

   Swarm Source:
bzzr://c20a8475c42598c198f6629bada37e1b234da85ac2c0cbac3d96089030b18040

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.