Manuel Araoz пре 8 година
родитељ
комит
7e7193ae61

+ 11 - 0
contracts/MultisigWallet.sol

@@ -13,6 +13,17 @@ import "./DayLimit.sol";
  * Wallet(w).from(anotherOwner).confirm(h);
  */
 contract MultisigWallet is Multisig, Shareable, DayLimit {
+
+  struct Transaction {
+    address to;
+    uint value;
+    bytes data;
+  }
+
+  function MultisigWallet(address[] _owners, uint _required, uint _daylimit)       
+    Shareable(_owners, _required)        
+    DayLimit(_daylimit) { }
+
   // kills the contract sending everything to `_to`.
   function kill(address _to) onlymanyowners(sha3(msg.data)) external {
     suicide(_to);

+ 2 - 0
migrations/1_initial_migration.js

@@ -1,3 +1,5 @@
+var Migrations = artifacts.require("./Migrations.sol");
+
 module.exports = function(deployer) {
   deployer.deploy(Migrations);
 };

+ 1 - 0
package.json

@@ -7,6 +7,7 @@
     "babel-preset-es2015": "^6.18.0",
     "babel-preset-stage-2": "^6.18.0",
     "babel-preset-stage-3": "^6.17.0",
+    "babel-register": "^6.23.0",
     "ethereumjs-testrpc": "^3.0.2",
     "truffle": "^3.1.1"
   },

+ 1 - 1
scripts/test.sh

@@ -2,6 +2,6 @@
 
 testrpc &
 trpc_pid=$!
-node_modules/truffle/cli.js test
+truffle test
 kill -9 $trpc_pid
 

+ 2 - 0
test/BasicToken.js

@@ -1,5 +1,7 @@
 const assertJump = require('./helpers/assertJump');
 
+var BasicTokenMock = artifacts.require("./helpers/BasicTokenMock.sol");
+
 contract('BasicToken', function(accounts) {
 
   it("should return the correct totalSupply after construction", async function() {

+ 1 - 0
test/VestedToken.js

@@ -1,5 +1,6 @@
 const assertJump = require('./helpers/assertJump');
 const timer = require('./helpers/timer');
+var VestedTokenMock = artifacts.require("./helpers/VestedTokenMock.sol");
 
 contract('VestedToken', function(accounts) {
   let token = null

+ 1 - 1
contracts/test-helpers/BasicTokenMock.sol → test/helpers/BasicTokenMock.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import '../token/BasicToken.sol';
+import '../../contracts/token/BasicToken.sol';
 
 
 // mock class using BasicToken

+ 1 - 1
contracts/test-helpers/DayLimitMock.sol → test/helpers/DayLimitMock.sol

@@ -1,5 +1,5 @@
 pragma solidity ^0.4.4;
-import "../DayLimit.sol";
+import "../../contracts/DayLimit.sol";
 
 contract DayLimitMock is DayLimit {
   uint public totalSpending;

+ 1 - 1
contracts/test-helpers/InsecureTargetBounty.sol → test/helpers/InsecureTargetBounty.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import {Bounty, Target} from "../Bounty.sol";
+import {Bounty, Target} from "../../contracts/Bounty.sol";
 
 
 contract InsecureTargetMock is Target {

+ 1 - 1
contracts/test-helpers/LimitBalanceMock.sol → test/helpers/LimitBalanceMock.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import '../LimitBalance.sol';
+import '../../contracts/LimitBalance.sol';
 
 
 // mock class using LimitBalance

+ 1 - 1
contracts/test-helpers/MultisigWalletMock.sol → test/helpers/MultisigWalletMock.sol

@@ -1,5 +1,5 @@
 pragma solidity ^0.4.4;
-import "../MultisigWallet.sol";
+import "../../contracts/MultisigWallet.sol";
 
 contract MultisigWalletMock is MultisigWallet {
   uint public totalSpending;

+ 1 - 1
contracts/test-helpers/PausableMock.sol → test/helpers/PausableMock.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import '../lifecycle/Pausable.sol';
+import '../../contracts/lifecycle/Pausable.sol';
 
 
 // mock class using Pausable

+ 1 - 1
contracts/test-helpers/PullPaymentMock.sol → test/helpers/PullPaymentMock.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import '../payment/PullPayment.sol';
+import '../../contracts/payment/PullPayment.sol';
 
 
 // mock class using PullPayment

+ 1 - 1
contracts/test-helpers/SafeMathMock.sol → test/helpers/SafeMathMock.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import '../SafeMath.sol';
+import '../../contracts/SafeMath.sol';
 
 
 contract SafeMathMock is SafeMath {

+ 1 - 1
contracts/test-helpers/SecureTargetBounty.sol → test/helpers/SecureTargetBounty.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import {Bounty, Target} from "../Bounty.sol";
+import {Bounty, Target} from "../../contracts/Bounty.sol";
 
 
 contract SecureTargetMock is Target {

+ 1 - 1
contracts/test-helpers/ShareableMock.sol → test/helpers/ShareableMock.sol

@@ -1,5 +1,5 @@
 pragma solidity ^0.4.4;
-import "../ownership/Shareable.sol";
+import "../../contracts/ownership/Shareable.sol";
 
 contract ShareableMock is Shareable {
 

+ 1 - 1
contracts/test-helpers/StandardTokenMock.sol → test/helpers/StandardTokenMock.sol

@@ -1,7 +1,7 @@
 pragma solidity ^0.4.4;
 
 
-import '../token/StandardToken.sol';
+import '../../contracts/token/StandardToken.sol';
 
 
 // mock class using StandardToken

+ 1 - 1
contracts/test-helpers/VestedTokenMock.sol → test/helpers/VestedTokenMock.sol

@@ -1,6 +1,6 @@
 pragma solidity ^0.4.4;
 
-import '../token/VestedToken.sol';
+import '../../contracts/token/VestedToken.sol';
 
 // mock class using StandardToken
 contract VestedTokenMock is VestedToken {

+ 3 - 0
truffle.js

@@ -1,3 +1,6 @@
+require('babel-register');
+require('babel-polyfill');
+
 module.exports = {
   networks: {
     development: {