Sponsored Link:   Revain - How to find moon tokens to invest? See what crypto experts are saying. Read reviews!
 Latest 25 txns from a total Of 211 transactions
View All

TxHash Age From To Value [TxFee]
0xfdd0f72d50e908d6dc49a70d188fe1c4031a86f4dba97a52f8548a3138e71e3b26 days 23 hrs ago0x70341461e043f4bf14c70018ff25efb0a7dfeb64  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000104640949
0xbd3a1a63275e84bb7dac41fab8924d1114e74c3e4a3a7366cd038ce16031b88f27 days 10 mins ago0x70341461e043f4bf14c70018ff25efb0a7dfeb64  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000106172
0xf78ddd035d6f1ba74d754fbe942281fb49764e9f0f76ae080d29302448ecb17b198 days 2 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000099492
0x260405750465fc81437d3208ceffe6e6843b9c065aabc5f72d35ac0ef4c7bf42198 days 20 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000123725
0xec13a0b7de4234b8c385d2f56d95d3089beeb8c754062d1d55cdbef09ae6a9aa198 days 20 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000024745
0xad2e7fe24fdabb1d588710e100405a98e128ed225051484240df43eb96234cdf198 days 20 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.0000024809
0xc132fccbd09796c3d86568c3a63ca1dda1bc285ce41287a4697fe8f9f5e75c66198 days 23 hrs ago0xae7168deb525862f4fee37d987a971b385b96952  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.00025007
0x354b48a720fd20a1793b3575011b2b792143624a08e97e444e872658f8c47bb3201 days 6 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000154104
0x9bafa5a695b06802c168b2ffe88684532d1cc8ef91cff8e50cc091ad38c5a802201 days 6 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000747016
0x5b4e09ca42fe37911100e04bbfa89fec1e447f423b400dac53a2313813fdbbcc204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0x5c1132ae816e88ddb4c50cb89c10ce92bd4a1c34bd303c1c0a12a37174017bbd204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0x6b20ee1783ee83bc421a0e3f320741d04bcd69ae947a9af2a5f8b4acb2febad6204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0xb95b6195d63046dcaff340cf715be8677e0d78f1e2baa2e9d79fcfaad5da24eb204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000461928
0x57a4c04069538f2fd815a4d0bca54409f385345c179d1519ac0178e333ad9cbe204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0x0eb849c76259349923ba7e449dfe93ff606ef71c58754f7e2d7dd753d594eaf9204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0x903b6d10af505e41289ea8da3cc64440bcb64258391a0d4e024b15a4c9efb84a204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000461928
0x903ee4f70863d3f01421ce1e0597005263234870101a03ebbc8ff99fe14683f4204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0x7e41a96b9a760b6872295215dc96abd2fc9a6e8af80ac37860a0c925eae394f7204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000461928
0x5fbac6a36a30c94ae3dd98dc2c35e1b585ffb281dea1917f1e9a54ad3868d99e204 days 4 hrs ago0x00a2e902c36ad55a96c3f4806a237971581a8458  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.000462312
0x1464571825c9433c1e8411cc790cf738abaeb05dede302f2b61e391017f8aacc204 days 4 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.002120376
0xd05f1c7248624abf611132f4b28f529d56b2471e1c88c7fb2aad5d1093643edc204 days 4 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.002119608
0xe0873240d462725e4767024d323194c7a6fcfebb9a7c18ca105b113381439d03204 days 4 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.00211884
0x4e201820200586bdec61f63f98fc9b368ccfedbfc17d82b888ae309040882cd4204 days 4 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.002119608
0xc78c27132b2931ad788af04c8e9295f5c4f406ba8a5c65dc7ee16c204dbca0cc204 days 4 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.002119608
0x4fd814908f709aa395bb71152013da4adfc761dfd47a004f3ce12834a1bab8bf204 days 4 hrs ago0x00b7c96ebbab9ac0712862cd6d4faa074306692d  IN   0xd95a6aa3e20397211e487b231211e16790a21ac90 Ether0.002119608
[ 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
0x354b48a720fd20a1793b3575011b2b792143624a08e97e444e872658f8c47bb34487999201 days 6 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90xf9f476c4bf206371bfef0e40b7a27f14de4548074.49371 Ether
0x5b4e09ca42fe37911100e04bbfa89fec1e447f423b400dac53a2313813fdbbcc4469936204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90xc73f7e0c9e2c9642609cfe2f151cd62b3e8bdc5f2.01 Ether
0x5c1132ae816e88ddb4c50cb89c10ce92bd4a1c34bd303c1c0a12a37174017bbd4469935204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x873351e707257c28ec6fab1adbc850480f6e06339.6315 Ether
0x6b20ee1783ee83bc421a0e3f320741d04bcd69ae947a9af2a5f8b4acb2febad64469934204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x3dba737ccc50a32a1764b493285dd51c8af6c27816.75 Ether
0xb95b6195d63046dcaff340cf715be8677e0d78f1e2baa2e9d79fcfaad5da24eb4469934204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x58bb2bdbd832f00e6a2e35df893101478dd60e404.02 Ether
0x57a4c04069538f2fd815a4d0bca54409f385345c179d1519ac0178e333ad9cbe4469933204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x28ea054cb54228a82684fd452a3d1d801c15350e4.745 Ether
0x0eb849c76259349923ba7e449dfe93ff606ef71c58754f7e2d7dd753d594eaf94469902204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x3bf7d434ad38e217424fc870e43ea08820c34b624.02 Ether
0x903b6d10af505e41289ea8da3cc64440bcb64258391a0d4e024b15a4c9efb84a4469901204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x2def3ab422cea5ef1c94da108581cfac2b37366710.888 Ether
0x903ee4f70863d3f01421ce1e0597005263234870101a03ebbc8ff99fe14683f44469900204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x002759b2de8bc7442b2d1feb5dc58ea962150a1a16.75 Ether
0x7e41a96b9a760b6872295215dc96abd2fc9a6e8af80ac37860a0c925eae394f74469892204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x00ea2ac35eb385edb04558e19ff4054197c4f9f46.5 Ether
0x5fbac6a36a30c94ae3dd98dc2c35e1b585ffb281dea1917f1e9a54ad3868d99e4469888204 days 4 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x00ea2ac35eb385edb04558e19ff4054197c4f9f412 Ether
0x726991f678e09eb2f8b029a784e758cd656f0844f5b9ca7305b9a91ec7d95bb84427366211 days 1 hr ago0xd95a6aa3e20397211e487b231211e16790a21ac90x00ea2ac35eb385edb04558e19ff4054197c4f9f43.82653 Ether
0xa724dafff4a1048aec01cda4a172fbd29909845a816b649f57a206f66912d5754427348211 days 1 hr ago0xd95a6aa3e20397211e487b231211e16790a21ac90xc73f7e0c9e2c9642609cfe2f151cd62b3e8bdc5f0.17007 Ether
0xa7b5380885bfca24db977e405165077e3a8b1f76b621fc9c3a52d7b4a4bfecea4403026214 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90xc4aac3fdc37e826a8cb71175d709b225636d21b74.71006004 Ether
0x7fae95f163875326410a17e5bebfb14fc3e1cc7ebb59115e7d4ca0d16253be344403026214 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90xf9f476c4bf206371bfef0e40b7a27f14de4548074.38312 Ether
0x95c90b6c6b6b13a3eec57e0c3a8b45cbaac269e4b9e575552c5a08c66753e30e4394360216 days 8 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x002759b2de8bc7442b2d1feb5dc58ea962150a1a15.67398 Ether
0x5542c9dae7e8ed256512d11c1dd4ed96d51d3ac58fb70717cbf915ab0cdd7ec54378185218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x2def3ab422cea5ef1c94da108581cfac2b37366710.18809 Ether
0xd975067e6dc2c604199a66aeaff0ce93d0f66875f3509a94a939e8849c4f7cdc4378184218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x28ea054cb54228a82684fd452a3d1d801c15350e4.44044 Ether
0x3f192f69ada7c87066957b7ac2bc8b542db2942021ecf836deec35595c87348a4378182218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x3bf7d434ad38e217424fc870e43ea08820c34b623.76176 Ether
0x9e382d81ffebe8464904b1b6caf45cb5396f88c925c6e392dc15697970c781954378180218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90xc73f7e0c9e2c9642609cfe2f151cd62b3e8bdc5f1.88088 Ether
0xd1c093c11b28e9f786244cc77c152fb1bf42c3faec2269e1e958164aa5e0102d4378177218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x3dba737ccc50a32a1764b493285dd51c8af6c27815.67398 Ether
0xd6801ce138bb8e2860955859d7d4c4919e105f70d0ba1c7329b7b0373008c63f4378177218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x00ea2ac35eb385edb04558e19ff4054197c4f9f46.07367 Ether
0x52bb4fe7c2fc8f374d9b74f5357c506c31e4e7891221d576a7339f397691d7d54378176218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x873351e707257c28ec6fab1adbc850480f6e06339.01254 Ether
0xef19ba24b66ec51cf68ac705bd8dd652c4c3b98463e290f1f8b4926e8bc9c1044378173218 days 22 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x58bb2bdbd832f00e6a2e35df893101478dd60e403.76176 Ether
0x3f7d8335f04273e0e4a4f18bdfff813503dc78fdabaf629ad7cd057206e4f0c14378090218 days 23 hrs ago0xd95a6aa3e20397211e487b231211e16790a21ac90x00b7c96ebbab9ac0712862cd6d4faa074306692d0.2 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity), ConstantOptimizerSubtraction (low-severity) Solidity compiler bugs.

Contract Source Code Verified (Similar match)
Note: Displaying similar matching verified source code at contract 0xC16ba0Bf101682e0E7fcBD0B7BC160A8E2E59471(excluding Constructor Arguments if any)
Contract Name: Wallet
Compiler Version: 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 txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.