Skip to content

Commit

Permalink
update multi-sig wallet contract
Browse files Browse the repository at this point in the history
  • Loading branch information
cybercoder2009 committed Jul 5, 2018
1 parent 8e59810 commit c974d55
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions example/wallet/wallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pragma solidity ^0.4.10;

contract multiowned {

// TYPES
// TYPES

// struct for the status of a pending operation.
struct PendingState {
Expand All @@ -22,7 +22,7 @@ contract multiowned {
uint index;
}

// EVENTS
// 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.
Expand All @@ -35,7 +35,7 @@ contract multiowned {
// the last one is emitted if the required signatures change
event RequirementChanged(uint newRequirement);

// MODIFIERS
// MODIFIERS

// simple single-sig function modifier.
modifier onlyowner {
Expand All @@ -50,7 +50,7 @@ contract multiowned {
_;
}

// METHODS
// METHODS

// constructor is given number of sigs required to do protected "onlymanyowners" transactions
// as well as the selection of addresses capable of confirming them.
Expand Down Expand Up @@ -131,7 +131,7 @@ contract multiowned {
return address(m_owners[ownerIndex + 1]);
}

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

Expand Down Expand Up @@ -211,7 +211,7 @@ contract multiowned {
delete m_pendingIndex;
}

// FIELDS
// FIELDS

// the number of owners that must confirm the same operation before it is run.
uint public m_required;
Expand All @@ -233,15 +233,15 @@ contract multiowned {
// uses is specified in the modifier.
contract daylimit is multiowned {

// MODIFIERS
// MODIFIERS

// simple modifier for daily limit.
modifier limitedDaily(uint _value) {
require(underLimit(_value));
_;
}

// METHODS
// METHODS

// constructor - stores initial daily limit and records the present day's index.
function daylimit(uint _limit) {
Expand Down Expand Up @@ -278,7 +278,7 @@ contract daylimit is multiowned {
// determines today's index.
function today() private constant returns (uint) { return now / 1 days; }

// FIELDS
// FIELDS

uint public m_dailyLimit;
uint public m_spentToday;
Expand All @@ -288,7 +288,7 @@ contract daylimit is multiowned {
// interface contract for multisig proxy contracts; see below for docs.
contract multisig {

// EVENTS
// EVENTS

// logged events:
// Funds has arrived into the wallet (record how much).
Expand All @@ -313,7 +313,7 @@ contract multisig {
// Wallet(w).from(anotherOwner).confirm(h);
contract Wallet is multisig, multiowned, daylimit {

// TYPES
// TYPES

// Transaction structure to remember details of transaction lest it need be saved for a later call.
struct Transaction {
Expand Down Expand Up @@ -384,7 +384,7 @@ contract Wallet is multisig, multiowned, daylimit {
super.clearPending();
}

// FIELDS
// FIELDS

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

0 comments on commit c974d55

Please sign in to comment.